LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the "Single Step (callable as SubVI)" setting in the...

What is the "Single Step (callable as SubVI)" setting in the State
Diagram Editor good for and why would I want to use it?

First of,

I love the State Diagram Editor! This thing is way cool!

Now my question:
I have read the help and gone through the tutorial and examples.

I am lost as to why anyone would want to use the setting

Edit>>>Execution Mode>>>Singel Step (Callable as SubVI)

If I understand it correctly, it will cause the indicated VI to only
execute one state and then return. The state that executes is the next
state that would have executed after the last time it was called.

I have watch this run in execution highlighting and it to only seems
to be good if I want a called sub-VI to execute d
ifferently each time
I call it and the action it takes is dependent on the state it was in
last time it was called.

Has anyone seen an example or used this setting in a meaningful
manner?

Is this suposed to be a wrapper for a autoinitializing action engine?

Anyone want to "flip on the light" for me?

Ben
0 Kudos
Message 1 of 2
(2,449 Views)
Glad to hear you like it! 🙂 The single step behavior is useful if
you want to make an LV2 style global that has state behavior. So,
your use case of putting an "auto-initialize" in the global would be a
good example - but there are more uses. In some sense the LV2 style
global acts a little like an "object", and if the behavior of that
object depends on what you did to it last, then state behavior can be
useful.

The feature was added primarily to facilitate writing functional VIs
that simulate the behavior of real objects.

Does that make any more sense?

cheers!
- kevin
Message 2 of 2
(2,449 Views)