How to control one task then another

Supporting 2.7 and 3.2+
Post Reply
Saylerjen73
Fresh meat
Posts: 2
Joined: Wed Nov 30, 2022 5:52 pm
Contact:

How to control one task then another

Post by Saylerjen73 »

Hi, I am wondering how I can do one task, have that finish, then do another.

For example, I want to change the 'setTargetPosition' then after it finished, have it move back.
step motor example code.png
Example code
(85.95 KiB) Not downloaded yet
Thank you!
jdecoux
Labview Developer
Posts: 161
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: How to control one task then another

Post by jdecoux »

To detect when your motor is done moving, you can either poll stepper0.getIsMoving() in a loop, or you can set up the stopped event handler to handle the event asynchronously (see setOnStoppedHandler for a brief example in the API).
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest