plc 5 - machine runtime

wthcomputer

Member
Join Date
Oct 2008
Location
Breckenridge
Posts
7
I need to be able to track machine runtime for 8, 12, 24 hour periods. I just need to track for how many minutes and input is on for a time period. I know how to diplay it on my hmi screens i just dont know what instructions to use to track it. TON timers only go upto so many sec. so that will not work. it is driving me nuts. please help someone. is there a timer that will go for a longer time?

thank you
 
Try using a free running 1 second timer and every time it completes, add 1 to a number if the machine is running. If this number is too high you can add a minute number to increment by one every time the seconds number hits 60.
 
Please use the seconds register from the PLC-5 BUILT IN REAL TIME CLOCK at S:23 to trigger a one-shot pulse every time it updates.
Use that one shot to increment your seconds counter.
You can also use the minutes register instead, if you like.

Using a free-running timer isn't a good idea at all if you want any kind of accuracy over the course of several hours.

The RTC is there for a reason, avail yourself of it... make life simple.
 
Even with a counter you still can't get much more than 9 hours.

You are going to have to use floating point numbers. But you need to be careful how you do that. If you set up a free running timer and use the timer DN bit to reset the timer then depending on how you go about it you can loose up to two times your scan speed every second in accuracy. That might not seem like much, but for a 10 ms scan, over 24 hours it can add up to nearly 30 minutes of inaccuracy per day!

The trick is to avoid resetting the timer because resetting the timer also resets the timer's time refernce value, which is the cause of the accumulated inaccuracies. You do this by subtracting one second from the accumulator each time you add 1 to the floating point total. This way the timer never times out and free runs without loosing accuracy.


We have discussed this topic several times. See this thread and it has links to lots of other threads on the topic.
http://www.plctalk.net/qanda/showthread.php?t=42185

A121708A.JPG
 

Similar Topics

Hello, As part of our project, we are using an M241 controller. This controller interfaces with an industrial computer and a router via a switch...
Replies
2
Views
104
Hi All, How do I set a password to PLC using Proficy machine software 9.5-9.8 or some other way? I as using Emerson CPE305 CPU. Thanks.
Replies
2
Views
351
An outside contracting firm designed a machine for our company. There are several devices connected through Ethernet/IP. This includes a Panel...
Replies
4
Views
192
Hi all, PLC machine vision is barely talked about anywhere yet it is very important PLC and Industrial automation topic. Like you see vision...
Replies
0
Views
1,057
My boss has come up with the idea of renting machines and charging on a per use / per hour basis, so I'm looking into it - just getting my feet...
Replies
14
Views
3,977
Back
Top Bottom