Ignition (Perspective Timer)

Is there any timer component in ignition Perspective to assign it a PLC tag?

What exactly are you trying to achieve and why are you not implementing the timer in the PLC?

I can do it in PLC side if there is no way in ignition side. I need a timer to change its value after specific time as PLC does. I am not sure Ignition has this ability or not. otherwise, I should add it to all PLCs units.

I need this time just for monitoring and report specific time of downtime event.

I would not necessarily do this directly in perspective as then it will execute per client you have open. Seems more appropriate in a gateway timer script/tag change script (where the tags determine the right time) depending on your version of Ignition.

1 Like

Here’s a simple way but others a may point out some good reasons why it’s not a good idea.

  • Tag1 is the tag being monitored.
  • Tag1Delay will turn on 2000 ms after Tag1.
  • Tag1Delay will turn off immediately Tag1 is false.

Setup:

  • Create Tag1Delay as an expression tag.
  • Set the expression to,
    {[~]Tag1} && ((now() - {[~]Tag1.Timestamp}) > 2000)

This is using the trick that OPC only (usually) updates the timestamp when the value changes so we can use that to calculate how long it has been in the current state.

Note that the timestamp most likely will update if the gateway is restarted and that would turn Tag1Delay off for 2000 ms. This may or may not be acceptable in your application.

I would not use this approach, despite the simplicity, since the change in the Timestamp is not guaranteed.

Better(IMO) options include:

  • Tag History
  • Transaction Groups (requires SQL Bridge Module)
  • Gateway Tag Change Script