LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of rotation not match with the action inside the loop

Solved!
Go to solution

Hello, 

 

This loop is a part of code. 

A motion control should be acquired inside the loop.

This controller moves a stage by limited distances (X). 

I can control the movement step through the terminal (step). 

if the step is something large the loop transfer to the next rotation number (i) before the controller finishes the current movement. For example, if I set the number of rotation to be 6. the loop rotation number (i) reaches 6 whereas the controller still in the second or third movement.

my question: How can I let the loop don't transfer to the second rotation step until all the code inside the loop finish. I used timing statements like the attachment, but it not helpful in all the cases. 

0 Kudos
Message 1 of 2
(866 Views)
Solution
Accepted by topic author BaJa_2020

Hi BaJa,

 

create a proper statemachine to control your device.

Send a move command, then read the current position and wait until the device has reached the target before you send the next command!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(827 Views)