Count Down Timer Help


I am really excited!

I discovered the other day this software called ignition and being a production manager I can see the real potential of this software in our business. We have been working on a LEAN manufacturing program and I think I can use this software to help produce some excellent andon boards as well as visualise our maintenance on our machinery! So much potential!

Anywho, I set-up my notebook with ignition trial, got my arduino talking over modbus then decided to buy a little modbs i/o box from an electronics store which was very easy to setup in ignition. I have on the opc/gateway and designer analog inputs and digital inputs functioning well.

I want to put into place a trail on my production floor to monitor some key performance indications of not only downtime of the machine (machine stops) but monitor when the supplied raw materials cause issues with our machine. I am pretty confident what I have set up will work fine. Awesome!

Secondly I want the software to countdown from 44 seconds down to 0, set off an alarm when it gets to 10 seconds, then when it goes to zero, start counting back from 44 again.

This 44 seconds helps the operator time when more eggs need to be placed onto the machine to ensure that there is never any non production seconds. I am doing this to create some standard work timings for the operator to improve productivity.

I am pretty sure I need to put in an expression but really, can I get some help with this one to get me going? I would sure appreciate it.

I can’t wait to put this in and see what comes out! Looking forward to monitoring/logging the amps of the motor to check for maintenance problems, how many stops, make a little pushbutton box for the operator to help describe the causes of downtimes…the possibilities are endless!

Need to show the boss what can be achieved first!!!


I worked up a small example of how you could do this. At least the timer part. The sounding of an alarm should be fairly straight forward. For the timer I used a gateway timer script and two memory tags. An Int4 memory tag to keep track of the value and a boolean memory tag to keep track of the direction it the script should be counting. The script looks a little something like this

[code]direction =“Egg Timer/direction”).value
timer =“Egg Timer/Timer”).value

if timer<= 44 and direction == 0:
if timer == 1:
system.tag.write(“Egg Timer/direction”, 1)
newTime = timer - 1
system.tag.write(“Egg Timer/Timer”, newTime)

elif timer>=0 and direction == 1:
if timer == 43:
system.tag.write(“Egg Timer/direction”, 0)
newTime = timer + 1
system.tag.write(“Egg Timer/Timer”, newTime)[/code]

You could then trigger the alarm on a tag change script based on the Timer tag.

Also to spitball a few ideas to get your creative juices flowing:

  1. Have your pace takt timer run by the PLC. You can use Ignition to monitor the accumulated timer value and set alarms and indicators accordingly. Also, this lets you put the buzzer external to Ignition, so that if something bad happens to your HMI, the buzzer still works. :wink: If you need to change your target, it can easily be changed from Ignition.

  2. Whatever you use to say ‘this is the start of a cycle’, you can also use it to reset your timer.

  3. Consider a couple more timers to log the actual takt time and machine cycle time. This way you can trend or histogram your operation.