machine running hour meter help.

2004sk4

Member
Join Date
May 2005
Location
Georgia
Posts
172
I have a micrologix 1100 plc. I am having problems with the hr counter i am using to keep up with the machine running.

The setup is as followed

i have a machine input turn on a rto 6 min timer.

When the dn bit is activated i am using the add function.

F8:0 +0.1+ F8:0 This also reset the timer.

I have noticed that sometime my f8:0 # is 12.1223 instead of 12.1. On the machine in question i feel that the hr meter is inaccurate to the actual machine run time.


What could be causing this and what could i do to prevent this.

Thanks
 
If you ONLY ever add 0.1 to F8:0 and, at some time later F8:0 contains more than one decimal place it looks to me (and I am sure there are far more knowledgable persons here) that there is some form of inaccuracy in the F8:0 location. Can you add 1 insted of 0.1 and then either divide your result by 10 at the last moment or scale the displayed value by a factor of 10 ? Maybe this will reduce/eliminate the error.
 
I tried the above statement and it seem to be working perfectly. It just kinda bugs me why the other way didn't work.

thanks for your help
 
You are counting in decimal, and adding a decimal point value to a 4 decimal point or greater value, you enter .1, it looks for a binary near fit maybe, .1024

The mathematics of it are over my head but I hope you see how the PLC may interpret it.

I know with the value you state its near .1010 I surrender
 
There are certain numbers which cannot be represented exactly in floating point format. 12.1 just so happens to be one of those numbers. Its because of the way floating point formats are represented in binary and the problem is systemic to all computers.

See http://www.plctalk.net/qanda/showpost.php?p=211445&postcount=8

One way to avoid totalizing these errors is to use a long 32 bit intenger, something that is supported by your ML1200. Totalize either 1/10 or 1/100th hour units in the long and then divide it by 10 or 100 to get your float with decimals. Be aware that the time you are counting is the timer preset + however long the scan takes to return to the timer once the preset time actually elapses. Over long periods of time this can produce signficant errors. If thats an issue let me know because there are tricks to solve that problem.


Here is a tool to see exactly how floating point numbers are represnted in binary. http://babbage.cs.qc.edu/IEEE-754/32bit.html
 
Just as a reality check, how accurate do yo need this time?

An error of .0223 seconds every 6 minutes = .223 seconds per hour. 0.223 x 24 = 5.35 seconds per day, x 365 = 1,953.48 seconds per year. That = 0.542 hours per year. If you are monitoring run times for machine maintenance etc. this is undoubtedly greater than the accuracy needed!

Sometimes we loose sight of the forest.
 
The solustion works perfectly.

The timer are being used for oil change and machine pm's only.

Thanks everyone
 

Similar Topics

Any advice on below issue? ➢ IFix 5.0 with USB Hardware Dongle License Standalone application connected to RX3i PLC units via Ethernet (bridged...
Replies
1
Views
1,617
Gems and Gents, Does anyone know if it is possible to have Tristation 5.0 and Tristation 5.2 installed on the same machine? Whenever I install...
Replies
0
Views
1,127
I'm sure there are some protections on this, but I want to start moving some projects to Advanced HMI (not sure of all the limitations). I'm...
Replies
5
Views
2,180
I have two laptops that I use for RSLOGIX. One is an older Dell with windows 7 pro, and the newer Dell has windows 10. Everything works great on...
Replies
5
Views
2,008
I once heard there was a rule for running conduit containing 480V into the side of a machine at a horizontal angle. If it comes straight down from...
Replies
4
Views
1,816
Back
Top Bottom