LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to control looping

Solved!
Go to solution
I have a long program with many loops and structures. I want certain codes(which are now inside while+structure) to be executed just once as it is used to decide the device initialisation. And once if its initialised no need to repeat these codes. But the whole program to be repeated until a stop using a while loop.
0 Kudos
Message 1 of 7
(3,132 Views)
can you post your program here
0 Kudos
Message 2 of 7
(3,129 Views)

The best way is to use a 'State machine' framework.

Refer to NI help & website. Many example of State machine exist

0 Kudos
Message 3 of 7
(3,128 Views)

The program is too long.

The first stack deals with the filter.

The second stack deals with the camera. The camera initialisation part is in stack0- stack 1 to 10. In this part the camera initialisation, set shutter speed,get pixels etc need be executed only once.

 

 

0 Kudos
Message 4 of 7
(3,123 Views)
use a state machine architecture for developing complex applications like this. it will make the program readable and scalable
0 Kudos
Message 5 of 7
(3,116 Views)

Try to adapt your code to this kind of framework (State Machine): easy to maintain.

 

SimpleStateMachine.jpg

 

Note : The Enum must be a Strict Type def to make easier the maintenance

Message Edité par J.DECHET le 12-28-2009 11:23 AM
0 Kudos
Message 6 of 7
(3,114 Views)
Solution
Accepted by topic author malavi
for the time being, wire a true constant to the while loop which needs to be executed only once
0 Kudos
Message 7 of 7
(3,112 Views)