Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6525 6501 digital output to step motor driver

Solved!
Go to solution

Hi,

I try to use USB 6501 and/or USB 6525 to output signals to step motor drive which controls the stepping motor. My questions are

1) Do I need USB 6525, I'm not sure the function of it(maybe as a relay).

2) Now I conneted input 5V to USB-6501 '+5V' pin and GND to 'GND' pin. On the other side(output side), I connected 'enable'(from motor drive) to P0.0; 'direction' to P0.1, and GND to GND.  Then I use signal express to test, the error says' missing input'.

3) I guess the next step is labview programming. Does anybody know any similar examples?

Any help would be appreciated!

0 Kudos
Message 1 of 41
(8,990 Views)

hygeia44,

 

Thank you for posting your question on the NI Formums. What type of signal input is your step motor expecting? Is it expecting a Pulse Width Modulated signal? I could better suggest some examples for controlling your step motor once I know what type of signal it is expecting. As far as which USB module would be better to use, it also depends on what signal the motor is expecting. If the motor does expect a PWM signal what is the period of the signal that the motor needs? 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 2 of 41
(8,975 Views)

Hi Aaron,

 

Thank you for your quick reply.  I checked the motor drive. It asks for logic level external input.

1) Is there anything about parallel port? Can USB 6525 acts as a parallel port which can output logic signal? Sorry, I am not quit understand what's parallel port.

2)How to connect USB 6501 and USB 6525, if I need both of them.

3)I guess it should be like 5VDC input to USB 6501 then output voltage to USB 6525(as input) , and then USB 6525 output logical signal?  Is that correct or I do not need USB 6501?

4)Do you know similar vi examples for this kind of application ?

 

Thank you!

 

Melody

0 Kudos
Message 3 of 41
(8,964 Views)
Solution
Accepted by hygeia44

Melody,

 

If the motor drive needs logic level external input I would recommend using the USB-6501 which is just a Digital Input/Output board. The USB-6525 does not have any digital outputs to control your motor drive. As I understand it you are simply trying to turn the motor drive on and off with a digital signal. It seems that you will also need to provide your motor drive with +5 Volts and GND. The USB-6501 has channels for +5V and GND. I have attached a shipping example that controls digital outputs using LabVIEW and DAQmx. This specific program can control 8 digital output lines, but it sounds like you will only need one. If you motor drive is just expecting a logic high to turn on and a logic low to turn off this example program will be able to turn on and off your motor. Just connect one of the digital output lines from the USB-6501 and then use the program to control that line. 

 

I really don't know any reason you would need to use the USB-6525 it seems to me that the USB-6501 will perform the action that you need. I hope this helps. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 4 of 41
(8,953 Views)

Hi Aaron,

Thanks so much for your example. I got the motor move now. But I still need to work on the direction and running time control and load cell data acquisition.

 

Melody

0 Kudos
Message 5 of 41
(8,945 Views)

Melody,

 

I am glad the example helped out. I would assume that the direction would be controlled with a digital signal as well, so modifying the code some will allow you to control the direction as well. As far as the run time control and data acquisition there are tons of examples in the NI Example Finder. It's under the Help menu in LabVIEW.

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 6 of 41
(8,941 Views)

Hi Aaron,

I have USB 6501, motor drive, and stepper motor.  I have 4 pins connection from USB 6501 to the motor driver which need logic output/input. Pin one for enable the motor(USB6501 output signal), Pin two for control the direction(USB6501 output signal), Pin 3 needs a logical number as the step count(USB6501 output signal), and Pin4 is the Output from the motor drive which monitor the preset step count(logic level), and then can stop the 'enable Pin1'.

I can control the first two pins now. My question is do you have an example has similar function of Pin3 and pin4?

 

Thank you!

 

Melody

0 Kudos
Message 7 of 41
(8,878 Views)

Melody,

 

If I understand correctly, Pin3 will need to be an output from the USB-6501. Is that signal going to be digital or analog? If it is a digital signal you could use the same program that write a logic level out to the digital port. For Pin4, that should be an input to your USB-6501. You said that it outputted a logic level or digital level is this correct? If I understand correctly about how the stepper motor works with Pin3 you can set a certain step (or distance) that you want to motor to go and Pin4 is just counting how many steps the motor has gone. If you have a location of a data sheet for the stepper motor I could look at it and it would help me out some. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 8 of 41
(8,863 Views)

Hi Aaron,

I attach a image of the vi file I have now. And here is the details.

line 1 ( one channel for all lines) is to control the ENABLE and DIRECTION pins on the driver board which need logic signals and it works well now.

Line 2 ( one channel for each line) is to control the RECOUNT pin on the drive which need a logic level from USB 6501. And I also need a indicator in the front diagram where I can input the step number.

Line 3 (Digital input).  The USB 6501 monitor the OUTPUT pin( on the drive board) logic level. While the step is in progress, it will be at logic 1. When completed with the step count, it will be at logic 0.

What I need next is to add one more step to control the CLOCK(frequency and speed for the motor) pin on the driver board. I didn't find the online info about this driver, so I just type some document I have here "A positive CLOCK pulse(logic 0,1,0) will advance the phase sequence one step. Note that the MAX external clock rate is 10 KHz. By using nested loops in the external controller software program, it is possible to vary the clock rate and perform various step sequences. This also eliminates the need for monitoring the OUTPUT pin since the number of steps performed is contained within the controllers program".

Please have a look at the VI and give some suggestion of how to control the CLOCK.

Thank you!

 

Melody

0 Kudos
Message 9 of 41
(8,808 Views)

Hi Aaron,

I found the document for my stepper  motor driver board.

 

Melody

0 Kudos
Message 10 of 41
(8,805 Views)