LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Asking idea on restarting everything in a Flat Sequence Structure

Hello everyone,

 

I am doing phone chip testing with 8960 and labview.  

 

The thing I am working on right now is to restart the phone if it failed during the testing.

 

I have three frames in a flat sequence structure, the first two are for start up (with parameters I need), the third one contains a while loop,

inside which is my testing code, I am going to put my restart code there.

 

For that restart code, I am not sure wheather it is the best way (Or only way) to copy the subvis in the first and second frames into the loop (since my restart procesure is exactly as one for start), or I could have some tricky methods to do it.

 

My dummy code is in attachement, the really one is having a lot of wires, which prevent me from rushing into my idea.

 

Any idea is well appreciated!

 

 

Thanks,

 

+Kunsheng Chen

 

 

 

 

Download All
0 Kudos
Message 1 of 4
(3,476 Views)

PLEASE DO NOT UPLOAD BMP FILES BY SIMPLY CHANGING THE EXTENSION. Changing the extension does NOT change the file format.

 

There, now that I got that off my chest...

 

You should look into state machines.  Do not use the sequence structure for what you're doing.

Message 2 of 4
(3,474 Views)

smercurian_fc is right,

 

Your best option is to go with a state machine. That way, when you want to restart, you just jump to the state which has all your startup code in it. 

There's a built-in state machine template VI in Labview under File > New >  VI > From template > Frameworks > Design patterns > Standard State machine

 

Also, this is an excellent resource for learning about state machines. 

 

Good luck!

Misha
0 Kudos
Message 3 of 4
(3,423 Views)
There's also the JKI state machine.
0 Kudos
Message 4 of 4
(3,404 Views)