GENESIS64 : Workflow : Delay with interrupt

With delay block in Workflow, we can delay time before doing something. But sometime, we need to exit delay if condition come true. The following tip make delay with interrupt.

The condition expression in red mark circle is

x=IF {{@rgs64:start.Value}}==0
THEN 1
ELSE IF totalseconds({{:ServerLocalTime}} – {{@rgs64:tmp.Value}}) >= 60
THEN 1
ELSE 0

Instead of using delay for 60 seconds, we can check interrupt condition (in this example, status of register “start”) every 1 second. Loop until duration pass 60 seconds or if “start” is 0 (OFF). And then go to next block. With this technique, we can make delay with interrupt.

Note:

  • Need to put timestamp into temporary variable (“tmp” in this example) before and after loop use to calculate duration in second , totalseconds({{:ServerLocalTime}} – {{@rgs64:tmp.Value}})
  • Variable “start” and “tmp” are created in Workbench > Platform Service > Unified Data Manager > Register. You can using OPC tags as well.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s