From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview statechart module external trigger from data acquisition error

Solved!
Go to solution

I have a 2 loop vi where one is the data acquisition loop from a DAQ instrument and the second is a loop to execute my statechart from.  I want to react to a data acquisition device error if it occurs by transitioning out of my current state in my state diagram and enable custom unique case error handling.  My state diagram is a synchronous one and the send external trigger.vi funciton will not work with it.  How do I accomplish this?  In addition, there is some confusing literature on the matter in http://zone.ni.com/reference/en-XX/help/372103F-01/lvscconcepts/sc_c_callervi/ at the bottom of the page it says "Note  Sending triggers to synchronous statecharts is optional. If you do not send triggers, LabVIEW sends the NULL trigger to the statechart. If you do send triggers to a synchronous statechart, you can send these triggers from only the caller VI." 

 

Is it possible to do this and if so how with the synchronous statechart??

 

0 Kudos
Message 1 of 3
(3,002 Views)

id,

As you've discovered, the Send External Trigger function only works with asynchronous state charts.  If you want to use a trigger you will need to let the loop executing the State Chart know when the device error occurs and then pass the trigger into the Run StateChart function instead of the NULL trigger.

 

I have done something similar using an action engine.  Second loop updates a the action engine when something happens.  The state chart keeps checking the action engine to see if an event has occured.

0 Kudos
Message 2 of 3
(2,985 Views)
Solution
Accepted by topic author id

thanks, that should work for me

0 Kudos
Message 3 of 3
(2,975 Views)