VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

stop stimulus profile though procedure

Solved!
Go to solution

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  

0 Kudos
Message 1 of 16
(7,643 Views)
Solution
Accepted by topic author gt8860a

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.

Jarrod S.
National Instruments
Message 2 of 16
(7,634 Views)

Thanks Jarrod!

0 Kudos
Message 3 of 16
(7,631 Views)

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.

0 Kudos
Message 4 of 16
(6,741 Views)

Hi Harris,

 

The channel still exists.  What do you mean it doesnt work?  Is it not displaying the correct state?

 

Ryan

Applications Engineer
National Instruments
0 Kudos
Message 5 of 16
(6,725 Views)
Hi Ryan, The channel still exists but is only changing state based on the legacy profiles. The new profiles don't seem to affect the Generator Engine State as far as I can tell.
0 Kudos
Message 6 of 16
(6,723 Views)

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

Applications Engineer
National Instruments
0 Kudos
Message 7 of 16
(6,703 Views)

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.

0 Kudos
Message 8 of 16
(6,700 Views)

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

Kyle Hartley
Senior Embedded Software Engineer

0 Kudos
Message 9 of 16
(6,650 Views)

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.

0 Kudos
Message 10 of 16
(6,647 Views)