Crimson Timer Help

carson

Member
Join Date
Feb 2011
Location
arima
Posts
22
Hi,
I want to create a "Down Timer" when a machine stops the timer should start, however the timer should sart @ 7:00 am ;stop @ 9:00 am;Start @ 9:15 am ;stop @ 11:00 am ; start @ 12:00 pm; stop @ 2:00 pm; start@ 2:15 PM Then finally stop @ 4:00 pm and reset at the end of the day.
 
Wouldn't it be easier to do the opposite and have a machine run timer? Since I'm guessing the times you are excluding are the times when it is acceptable for the machine not to run?
 
I Want to capture the downtime not really the run time .
The purpose of the display is to make operators more aware of their KPI's , where downtime is a measurable.
 
Yes, but you had identified the times that the machine will not be running leaving you with 7.5 hours of available run time. Instead of trying to make a timer that only runs when the machine is idle minus those specified times, if you make a timer that times when it runs during the day then 7.5-runtime = downtime.

I just thought the code would be a little easier that way.
 
Capturing downtime is an integral part of OEE, look into that a bit and I think you will come up with something that exactly fits your needs. Without knowledge of which PLC/HMI combination you have, we could only "guess" at solutions!
Good luck!!
 
I would lean toward using the event log to capture machine stops and starts and then do the math or reporting from that. I have used the event logs in Crimson to generate a lot of very cool and handy reports. With a little MS Excel savvy you can make all sorts of cool reports and charts and you can log a nearly infinite amount of information that way.

It might be possible using the clock in crimson to do the math you want to do. If I had this project I would do as TConnolly said but in the PLC. It is a lot easier and more accurate to accumulate up-time in (most) PLCs than in most HMI.

More info will yield better answers.
 
Last edited:
It would be more accurate in the PLC, but you can do this in the HMI. It takes a bit of programming in Crimson and you need to be familiar with the scripting language. I did it for a customer and It took me a few days. The key is to set up a trigger. Create an internal integer variable with the tag source as general using "GetSec(GetNow())". This causes the tag to update every second. Create a program and call that program in the trigger section of that variable to be called on the rise of the value by 1. So your program runs every second. In your program you have to detect the time in the day and accumulate your down time. Keep everything in seconds until you get the result you want and then convert to hours or whatever your need. Get to know all of the time and date functions, everything is there that you need. That are the key points. I would give you the program but it belongs to my customer and they paid me quite a bit to write it.
 
Last edited:
Hey Ken. Congratulations on post 11,000! (well you are at 10,999 but you'll hit it before I see you post again...Glad to see you've got hooked on the G3.

I have a use for this calculating the total on an upcoming project. I'm going to do it based off of a trigger instead of an event so the value would be in a tag inside the G3 instead of having to dig through the logs. This should make it a little more accurate than using the event long since...not that I'm saying it needs to be...

Let me stuff myself today and if I have any brain cells left I'll write up it up tonight. Otherwise I'll do it sometime this weekend.
 

Similar Topics

Hi, I want to create a "Down Timer" when a machine stops the timer should start, however the timer should not start before 7:00 am ;stop recording...
Replies
4
Views
3,176
Build error occurs with TON ladder logic command. Time Input expected on block. Using Integer Tag under Control Local, and then hard number 19...
Replies
2
Views
750
1- I set details creation to enabled and to the name of a saved widget and set a data element to the page. When binding the widget it makes a page...
Replies
5
Views
2,218
I have an older G310 - so stuck with Crimson 2, but although it is not nearly as cool, I'm doing ok with it. The issue I have is that I have a...
Replies
3
Views
2,488
Hello, I am new to the forum. I have been using the Redlion Crimson 3.0 software for about 3 years. I have never had any luck pausing a timer...
Replies
3
Views
1,870
Back
Top Bottom