LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

statechart module vectoring to another state based on error within a state

Looking for a means to handle a typical labview error occurring in a state with the statechart module and then initiating a transition to another state to handle the error.  For instance if I have a state 1 which contains an action tab that has a Labview VI called in it.  If the Labview VI returns an error, I want to send an internal trigger to vector out of the current state and into antoher one called the errors handling state.   The ability to monitor the statedata error value and send an internal trigger within the same action tab does not appear to be possible because the "outputs" terminal can't be selected as both teh internal queue and statedata at teh same time.

 

Anybody know how to do this?  All examples in the tutorial, etc dont handle the errors...

0 Kudos
Message 1 of 6
(2,642 Views)

I'm not very clear as to what it is that you would like to perfrom in case of an error. But attached there is a simple VI that will show you how you could handle and error in a state machine. Obviously this is a very simple VI showing you how to trap and error. what you do with the error is up to you.

 

If you need addtional help, handling your error please be a little bit more clear. An attached VI always helps a lot in transfering your message across to us.

 

Hope this helps.

Message 2 of 6
(2,629 Views)

Thanks but the issue that I need help with has to do with the Labview Statechart Add on toolkit and its nuances for detecting an error in one state and then handling it in another.

0 Kudos
Message 3 of 6
(2,600 Views)

It's possible to expand the 'Outputs' tab to include multiple parameters. Just click and drag on the edge of the tab.

 

Mike Pool

 

0 Kudos
Message 4 of 6
(2,575 Views)

Mike, you would have to put in a guard transition to look at the statedata error cluster value in each state to do this.  Is there a way that an error can propagate up if it is inside of a substate or a region to the parent state?

0 Kudos
Message 5 of 6
(2,561 Views)

There's an example that ships with the Statechart Module titled "Error Handling Project" that does just that. I recommend using it as a guide.

 

Mike

0 Kudos
Message 6 of 6
(2,550 Views)