12-08-2010 12:41 PM
Is there a way to stop a stimulus profile through a procedure?
Let's say we have configured an Alarm to trigger a procedure. This Alarm is used to monitor a physical E-stop button wired to a digital input. When the state of this channel goes low, we want to call a procedure to set all outputs (digital and analog) to safe conditions (generally low). So far this is pretty straight forward. But let's say this alarm occured during a test (the running of a stimulus profile). How do we stop the stimulus profile from the procedure to prevent it from re-enabling any of these outputs?
Thanks
Damien
Solved! Go to Solution.
12-08-2010 01:20 PM
Yes, there is a way to do this. There is a channel in the System Channels section called Generator Engine State. The channel value corresponds to the state of the profile engine. It is a writable channel, so you can set it from a Procedure to change its state. The values are:
0: Idle
1: Running
2: Stopped
3: Paused
So I would set the channel to 2 or 3 depending on whether you want to continue running the profile from the same location later, or just stop it completely.
12-08-2010 01:29 PM
Thanks Jarrod!
03-13-2013 01:47 PM
Hi, the generator engine state doesn't seem to work for the new (2011) stimulus profiles. Is there a new signal that we can access to stop stimulus profiles externally like getting an alarm or user button to do so? Thanks.
03-14-2013 11:28 AM
Hi Harris,
The channel still exists. What do you mean it doesnt work? Is it not displaying the correct state?
Ryan
03-14-2013 11:33 AM
03-15-2013 04:28 PM
So in procedures that you wrote in older versions of veristand, the channel is being updated appropriately and behaving appropriatly (even when runnning in 2011). However, new procedures are not able to modify the channel? Or the correct response is not being generated?
Ryan
03-15-2013 04:30 PM
Hi Ryan,
The mutated/legacy profiles still operate like you mentioned; it changes generator engine state to 1 when running, and I can set it to 0 to shut it down. When the new stimulus profiles / real-time sequences run, the generator engine state is unaffected an ineffective; it stays at zero all the time.
03-19-2013 06:54 PM
Hi Harris,
Ryan is out this week. Just a quick question, why aren't you setting the values to 2 or 3 like Jarrod recommended. I'm not fully familiar with the properties of this channel but 0 might completely shutdown the stimulus profile until you redeploy. Can you try 2 to stop the current stimulus? Let me check into this a little more.
Thanks,
Kyle Hartley
03-19-2013 07:10 PM
Hi Kyle,
Sorry that I wasn't clear. The Generator Engine State doesn't seem to reflect the state of the new stimulus profiles at all. It's always zero. Therefore, it has no effect regardless of what number I set it to. It appears that the new stimulus profiles aren't tied to the Generator Engine State system channel. That is why I cannot use it.