02-01-2006 04:01 AM
02-01-2006 04:07 AM
02-01-2006 05:21 AM
Hiii, Thomas
I dont know what is state machine, so can you please explain me about that??? and my question is about calling another vi from current vi, and after calling the another vi, from that another vi, i want to call the current vi, which is recursive mean one from another and another from one, recursive call...
Thank you,
Rujuta
02-01-2006 05:37 AM
In a statemachine you have different states, where something is done. To change the states you have different transition, which depend on results or user input or something similar.
In LV you basicall have a while-loop with a shift register. In the loop there is a case structure. So in each case you have program logic of a state. Basically I always use an enum-type to set the cases. This enum contains for instance four values: Init, ProcA, ProcB, End. So I first wire "Init" to the shiftregister, which is wired to the case selector. Then I do some initialising in the Init-case and wire a constant of this enum (set to ProcA) from out of this case to the shiftregister terminal on the right. So the next iteration ProcA is executed. There I do some processing. Based on this processing I wire either ProcA or ProcB to the shiftregister and so on.
So my thought was that you could call Vi A in a case, then call Vi B in another case and then call the case with Vi A again, but then switch to the case of let's say Vi C.
Let me know if I was not clear enough.
Thomas
02-01-2006 09:06 AM
02-02-2006 08:39 AM