10-07-2016 06:40 AM
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??
Solved! Go to Solution.
10-07-2016 08:14 AM
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.
10-07-2016 09:52 AM
thanks, that should work for me