LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change direction of a linear motor + encoder

I would like to move a linear motor with an encoder and change its direction when the counter value reaches a specific number through MyRIO. At the moment I have this block diagram.

 

194951_Motor Adapter Snippet.png

0 Kudos
Message 1 of 3
(636 Views)

Hi luna,

 

use a shift register in this while loop to define the direction, based on the result of your encoder reading comparison…

Best regards,
GerdW


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

Hi Gerd

I should read the encoder counter value and then compare it with another value? It makes sense to use a threshold?  

0 Kudos
Message 3 of 3
(596 Views)