Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepping sequence in labview USB6008

Currently, I have on hand a USB6008. I need to  drive a stepper motor with through a darlington array for application in a solar tracker. The stepper motor is a 12V 4coil unipolar unit, and has 6 wires running from it. I need some guidance on writing a VI, so that when I have thw four coils of the stepper connected to the digital outputs of the USB6008, I can energize the coils in a proper stepping sequence.

 

At the moment, I am trying to perform just a full step movements, and I only need the motor to rotate cw/ccw. I would really appreciate some help or guidance in writing a VI that can automatically respond to the impulse of my sensors.

 

There will be a differential voltage fed to the analog inputs of the daq, acquired using DAQ mx, and this voltage will go through a comparator. I need the program to run continuously, and when one voltage is more than the other, the motor will be moved in one direction, and the other when it is the opposite situation. When the difference is zero, the motor should just hold its position. However, this part is secondary, and my first priority now is to generate the stepping sequence .

 

So, what I would like to know is, how I can create a VI that will keep running the sequence of digital outputs in the following manner

 

1000

0100

0010

0001

 

continuously whenever the motor is set to do so, and also able to run the sequence backwards. Thanks!

 

0 Kudos
Message 1 of 4
(3,553 Views)

Hi Y.Y,

 

The best way to achieve this is to use state machine design pattern.

I attached an example that you can modify it to suit with your application for your reference.

 

Regards, Kate

Download All
0 Kudos
Message 2 of 4
(3,535 Views)
HI Kate. Thanks so much for the example.. However, Im using Labview 8.5 and cant open the examples that you have just posted. Is there anyway I can modify the file to backdate, or to upgrade my version of Labview online? Thanks!
0 Kudos
Message 3 of 4
(3,533 Views)

Hi YY,

 

Please refer to attached file.

 

Regards, Kate

0 Kudos
Message 4 of 4
(3,527 Views)