Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Advice on Stepper - Encoder Setup

Hi all,

 

I am using phidget stepper motors and encoders to create a vending machine style XY axis. I would like to have several buttons on the front panel that will correspond with an encoder value for both the x and y encoders.

 

I am wondering what the best way to do this would be? In order to have a button click send the desired values to then have the stepper motor move to those values. What is the best way to set this structure up (in terms of loops and passing these constants?)?

 

Ex. 4 locations, (1,1),(1,2),(2,1),(2,2), each one has a button. When the corresponding button is clicked, the motors will move until the encoders read the desired value.

 

Thank you,

0 Kudos
Message 1 of 2
(2,064 Views)

Likely, to pass the constants, you can use something like a notifier, which will send the value to as many places as you want. Then, you can have a loop that moves the motor until you hit that setpoint. It would be sort of a loop within a loop. One to read the notifier, which sends its value to an internal loop that will do the actual motor control until it hits the setpoint and exits.

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 2 of 2
(1,983 Views)