LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

best combination of loops?

Solved!
Go to solution

hi, i am currently working on a labview program which moves an XY stage and then aquires information on the optical spectra for each point, i have made the program for the XY stage and the program to get data from the OSA, but am unsure what the best loop combination to synchronise the 2 programs together...so essentially the stage to move 1 step ( 1 itteration of a while loop) and then stop... the 2nd program initiates and takes data...and then the stage moves 1 more step..take data...etc for a set defined number of steps.

 

waht is the best way to go about this?

 

thank you very much

asiri  

0 Kudos
Message 1 of 4
(2,640 Views)
Solution
Accepted by topic author Radioman00
Well, without knowing anything more, a for-loop would do what you want. However, that's the simplistic answer, and there's usually more to the story, depending on what you're actually doing and how you want the system to behave. For instance, it may be that a state machine is the better router to take.
Message 2 of 4
(2,621 Views)

I agree with Saverio.

 

Investigate the use of a state machine.  It may provide ease to implementadditional features in the future.

 

R

Message 3 of 4
(2,616 Views)
thank you very much guys, i've been reading into state machines and it def does seem like the way foward 🙂
0 Kudos
Message 4 of 4
(2,587 Views)