Following this paper, I am now using NEMA 17 stepper motor, a microstep driver and myRIO to operate a stepper motor. However, after I develop a VI that's exactly the same to the one in the paper above, my stepper motor only vibrates and does not turn. I think my wire connections between the 4 wires in the stepper motor and the microstep driver is correct. Other wire connections between myRIO, stepper motor, driver and the battery are in good conditions too.
The thing that I don't understand is which pin do I use in myRIO, as shown below, to connect the motor driver pins in blue part (ENA-, ENA+, DIR-, DIR+, PUL-, PUL+).
Which pin in myRIO should I use? I am a beginner and I don't really understand what is the function of each different pin, perhaps anyone can provide some links on this? The VI I used is attached below.
Very basics: Digital control signals (PULse, ENAble, DIRection) have high and low state. If you connect 0V to "-" terminal and +5 V to "+" terminal, it is ON state - Direction will be clockwise, Enable will tell driver to turn on. If there is no difference (both 5V, This driver recommends to keep "+" terminal at 5V and you change voltage on "-"), terminal will say opposite: anticlockwise direction, turn motion off
PULse is continuously running pulses, they determine speed of rotation. 100 Hz = 100 steps/s, check driver and motor specs for range.
They do not control ENAble state from program and connected ground to "-", 5V to "+". Motor will stop if you stop running PULses for it. Normally you would switch this line on or off to start/stop motion.
So your program should generate continuous pulses at DIO8 (PWM0) and switch line DIO9 to change direction.
As the simplest tutorial of myRIO basics this is fine, but for general control of the stepper motor it is super expensive overkill. I did not know this is worth an article.