From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Stepper Driver TB6560

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.

 

 

0 Kudos
Message 1 of 6
(4,880 Views)

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.

0 Kudos
Message 2 of 6
(4,858 Views)
The PFI0 on the 6009 is clearly described as an input in the manual. Impossible to get an output from that. It doesn't have a counter output at all. The 6009 is a poor choice as it only has software timed digital outputs.
0 Kudos
Message 3 of 6
(4,853 Views)

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.

0 Kudos
Message 4 of 6
(4,847 Views)
There is no 'given frequency' with software timing. You have to use delay/wait statements that are only precise to several milliseconds and because of the os, subject to jitter. If that is sufficient, then go for it.
0 Kudos
Message 5 of 6
(4,844 Views)

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. 

Message 6 of 6
(4,836 Views)