06-09-2010 04:28 AM
I want to use a USB-6009 DAQ to control two stepper motors concurrently. The speed of these two motors change during the time.
I have problem with writting the digital output to my DAQ. I've searched through the examples and tutorials in the ni website and on the web; but I haven't find a good tutorial about how to write on the digital output of DAQ. Specifically, because the digital output part in DAQ Assistant is too general and doesn't give me the option of programming, I need to know more in detail about DAQmx pallete parts rather than just the DAQ Assistant.
I also want to read from the same ports on the DAQ to check if my code does the digital output writing correctly.
Could you please help me with a good tutorial about how to make a vi using DAQ-mx pallete?
Your any kind of help in this regard is so appreciated.
06-09-2010
04:40 AM
- last edited on
09-14-2025
03:30 PM
by
Content Cleaner
This tutorial should help you:
There is a section for Basic Programming with DAQmx that shows how to use the native DAQmx VIs.
06-09-2010 06:50 AM
06-09-2010 12:20 PM - edited 06-09-2010 12:23 PM
uci wrote:I also want to read from the same ports on the DAQ to check if my code does the digital output writing correctly.
You cannot read from the same port that you use to write. With DAQ, you use either an AI (analog input) to read or an AO (analog output) to write. So you must first use a multifunction DAQ, one that has AIs and AOs on them. Wire an AI channel to the same place as your AO channel. Then you can write to the AO and then read the AI to confirm that the AO has done its job.
Ooops, I just noticed that you said "digital output". Same principle, just substitute AI with DI and AO with DO. I think some digital cards will allow you to read from a DO after it has been written. Then you would only need one wire and one channel. But not all cards do this. You will have to search for one that has this capability.
06-16-2010 05:47 AM
Thank you so much for your help.
Finally, I could write what I want on the DAQ card digital port. Now, the problem is that this output doesn't run my stepper motor. That's while exactly the same output runs the motor via parallel port. I think the problem is that the the digital output voltage of the DAQ card is about 5V while the parallel port's digital outpot is about 2V. And possibly the input voltage for my stepper motor driver should be around 5V. Do you know how I can change the voltage of the digital output from 2V to 5V? I didn't find any port for setting that in the DAQmx Write vi.
06-16-2010 12:14 PM
uci wrote:I think the problem is that the the digital output voltage of the DAQ card is about 5V while the parallel port's digital outpot is about 2V. ..... Do you know how I can change the voltage of the digital output from 2V to 5V?
Conflicting statements. The digital output should be about 5v. Parallel port output should also be about 5v. Typically the output will be between 4 and 5v. If the digital output is less than 4v, this means that it cannot produce enough current to drive the stepper motor. You will need some sort of driver circuit to produce the current necessary to drive the motor. Typically, most digital outptus will not be able to drive stepper motors. However, there is some DAQ cards with high current digital outputs, at least high enough to drive stepper motors. You could search NI site for them. Look at the specs for your stepper motor, find how much current it draws. Then look for a Digital Out card that can drive this current.
The other alternative is to build a driver circuit using a transistor. The digital out can turn on the transistor which will be able to drive more current (depending upon the transistor chosen). NPN transistors will invert the signal, so you could use two of them (invert then invert again), or a Darlington pair, to properly drive the motor.
06-17-2010
02:22 PM
- last edited on
09-14-2025
03:31 PM
by
Content Cleaner
Hi uci,
Tbob is correct. The USB-6009 can source up to 5V with a maximum of 8.5mA. The USB-6509 can source 100mA from one port with an external power supply. The Motion product line is completely devoted to driving motors and may have something to suit your needs. Hopefully this helps!