Timers In DeltaV

Basically, what I am trying to do is make it so that logic in a control module can only execute once every 30 seconds.

The logic switches from one instrument to a redundant instrument if the first goes bad.  So what I am trying to do is have a boolean toggle to "false" when that switch happens, so it can't happen again immediately in the other direction.  That part was not too difficult.  Now I need to have that boolean toggle back to "true" after 30 seconds so the logic can execute again if necessary.  


I am having a lot of trouble understanding all the different timer/counter blocks in DeltaV and how/when to use them.  Which one would be best for what I described above?

Some issues i've had: some of the timers will only continue counting if the input is true.  However, in my logic, the input will only be true for a split second, because my other action resets all the logic by toggling the boolean to false.  I need a "true" input into the timer/counter to start the time and have it continue counting even when the input changes to false.  Then, at 30 seconds, I need to to briefly change the output to true and then reset.

Hope this all makes sense...

6 Replies

  • Use the Set/Reset function block coupled with a condition block using the TIME_DURATION of the condition block as your timer.

    www3.emersonprocess.com/.../c_fblk_spec_reset_set_flip_flop.html

  • There are several ways to attack this but the first question is why do you only want the logic to execute every 30 sec? The easiest way would be to set the module execution rate to 30 sec. If you're wanting that time to be variable you could use a retentive timer because it doesn't stop timing if the input goes off as long as it was on for a user specified time first. You could also use the timed pulse since the output goes true when the input goes true and then times for a specified amount of time even though the input has turned off. You should refer to the timing diagrams in Books on Line for the various timer function blocks for more information.

  • In reply to Bruce Brandt:

    I don't think he want the module to only act every 30 seconds....he wants the module to identify a momentary change at any second and set/reset a bit after 30 seconds.  Perhaps I misread...

  • In reply to Bruce Brandt:

    This reminds me of my Boolean logic course in college.  I'd suggest you should start with a time diagram ( similar to the one in BOL for Retentive Timer)  showing the initiating signals and what additional triggers you may need, or not need.  Then you can simplify the problem as you visualize how these interact.  As Youseff suggests, the Flip flop can store the one shot trigger that then drives a timer (I'd use the retentive timer instead of a Condition Block), which resets the Flip Flop and itself on a 30 second time out.  But to avoid a spaghetti code mess, I recommend you step back and document the problem in some way so you can simplify the solution.

    And of course, you need to take some time to understand each of these blocks.  

    Andre Dicaire

  • In reply to Andre Dicaire:

    Youssef is right...

    I want the block to scan constantly for momentary changes.  And when a certain condition becomes true, I need it to act.  But I only want it to act once every 30 seconds.

    Let me play around with some things you guys said, and see how it works.

    Thanks for the help!

  • In reply to depthcharge623:

    Use S/R block with output connected to On delay timer. Set pulse will start the timer for 30 seconds. Connect timer output to Reset pulse.

    So, when the timer elapses, S/R block will reset & timer will be reset as well. The output of ON-delay timer can be used for further logic.

    Regards,

    Amod.