I need some help on a problem I am having. We have set up a PLC to track some production metrics on a piece of machinery (total time, run time, uptime %, target counts, actual counts, plus/minus).
The target count increments every 10.29 seconds and the actual increments based on a photoelectric sensor. The intent is to maintain a proper takt time for our production.
I let it run for a day...
-Target counts was 3236 (meaning that the actual total time was (3236*10.29)/60 = approx 9.25 hours). This is dead on.
-Actual counts was 3832. Once again, this was accurate.
-Plus/minus was 596. Once again, all good.
However, I had the following timer values showing on the screen:
-Total Time was 42925 (this is off a TMRA so it equates to 4292.5 seconds which is only a little over an hour). This value should in fact match the target counts multiplied by 10.29 then multiplied by 10 = 332984.
-Run time was 11062 (or 1106.2 seconds). Once again, this is way too low since the machine could have never produced 3832 parts in this amount of time. It simply is not possible.
-Uptime percentage is shown as 25.77053% which is correct mathematically, but based on two incorrect timer values.
I understand that the TMRA function requires two register locations, so I have spaced out all of my timers by two (T0, T2, T4, etc.). However, it seems like my timer accumulators are getting truncated, misformatted, wrapping around to zero, or something else.
Can someone please look at my program (see attached) and tell me what is going on? I will be hooking up to it with the computer tomorrow to do some more detective work.
Thanks in advance.
The target count increments every 10.29 seconds and the actual increments based on a photoelectric sensor. The intent is to maintain a proper takt time for our production.
I let it run for a day...
-Target counts was 3236 (meaning that the actual total time was (3236*10.29)/60 = approx 9.25 hours). This is dead on.
-Actual counts was 3832. Once again, this was accurate.
-Plus/minus was 596. Once again, all good.
However, I had the following timer values showing on the screen:
-Total Time was 42925 (this is off a TMRA so it equates to 4292.5 seconds which is only a little over an hour). This value should in fact match the target counts multiplied by 10.29 then multiplied by 10 = 332984.
-Run time was 11062 (or 1106.2 seconds). Once again, this is way too low since the machine could have never produced 3832 parts in this amount of time. It simply is not possible.
-Uptime percentage is shown as 25.77053% which is correct mathematically, but based on two incorrect timer values.
I understand that the TMRA function requires two register locations, so I have spaced out all of my timers by two (T0, T2, T4, etc.). However, it seems like my timer accumulators are getting truncated, misformatted, wrapping around to zero, or something else.
Can someone please look at my program (see attached) and tell me what is going on? I will be hooking up to it with the computer tomorrow to do some more detective work.
Thanks in advance.