04-27-2015 02:31 PM
I am using a USB-6009 DAQ and want to control a stepper motor. I bought a cheaper stepper driver (TB6560) that uses the standard enable, direction, and pulsed signal. I found a great example that is exactly what I need but am having issues. The example is found here:
https://decibel.ni.com/content/docs/DOC-35115
For the step signal output it has a PFIO line which I am not as familiar with. When running the program at a low pulse frequency I do not get the pulsed output from the DAQ. Additionally when I stop the program an error shows that the physical channel does not match the I/O type required for the virtual channel. Can anyone help clarify how to get this stepper motor driver working? Everything is connected properly because I can simply connect the 5V out to the pulse input on the controller and it steps.
04-28-2015 01:03 PM
do you have a scope of any kind that you can use to monitor the output of the 6009 to make sure the PWM is actually outputting?
You might also consider moving this forum post to the DAQ section of the forums since it is soley an issue with the 6009 outputting the correct commands. You will get more views and hopefully resolve your issue faster.
04-28-2015 02:04 PM
04-28-2015 03:33 PM
Thanks for clarifying Dennis. Can I use the software timed digital outputs? Will this just limit me to sending a given amount of pulses at a given frequency without having faster feedback to control the motor? This may work as I want to simply move the stepper motor to a given position. Feedback would be nice so I can compensate for backlash but I can probably deal with that.
04-28-2015 05:45 PM
04-29-2015 03:01 AM
It probably would be much easier to use a stepper control board such as the FlexMotion. Another solution would be to use a stepper controller with USB or serial interface.
Both solutions will provide precise timing. If the jitter is in the range of milli-seconds you will not be able to run stepper clock outputs beyond a few hundred steps per second. With a stepper motor with 200 full steps per revolution this will result in just a few turns (maximum) per second when you use the driver in full step configuration which usually is not a good choice - you will have a lot of vibrations. It is better to use 4, 8 or 16 microsteps, the motor will run much smoother (the drawback is that the torque will decrease) - but the maximum speed will be lower, too.
Also, you always have to "ramp" the step clock when accelarating and de-accelarating the motor, you cannot start and stop it at full speed. All motor control boards and external controllers have routines for this. If you are using a DAQ board (or anything else with general purpose digital outputs) you have to write your own routines. It even gets more difficult if you have to monitor simple feedback devices such as limit switches. In many cases you will have to find a reference position (with a reference switch) and you have to write your own routines to find the ref position. Stepper controllers have these routines in their firmware.