LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a Stepper motor with DAQ module

Hello, I'm a student in electronic technologies and I need some help figuring out how to control a stepper motor with a DAQ module (NI USB-6008). We're using the digital I/O. I will attach exactly what I need to be doing and the schematic we used. I can't seem to figure out why it won't work but I need some major help with LabView. I'm always lost in this class and have no idea what I'm supposed to do. My instructor does a terrible job of helping when asked so I'm going to forums for help. 

 

Please someone explain to me how I can do this. Thanks.

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

It looks like you need a specific set of 4 bits to be delivered to 4 digital outputs at (presumably) different time points.

  • How would you set 4 bits of a (presumably multi-bit) Digital Output at the same time?
  • How would you deliver sets of 4 bits at regularly-spaced time points?
  • You have a pattern of 4 sets of 4 bits. How would you organize these sets so you can rotate continously for, say, a minute?

Sometimes it helps to step back, look at the problem, and see how "What you Know" maps into "How You Can Use What You Know".

 

Bob Schor

0 Kudos
Message 2 of 4
(3,220 Views)

what does lab 10.x in your document mean?

Kudos and Marked as Solution == Thanks
0 Kudos
Message 3 of 4
(3,206 Views)

Just make 4x4 array of boolean and use index array to get 4 bit at a time. Then you just need to control the index , such as 0,1,2,3 for CW and 0,3,2,1 for CCW. To control speed just use wait.vi with numeric control in front panel. As for trigger(limit switch) just use select to control the index or the 4 bit logic to stop the stepper motor. It is the same when you want to make only 1 revolution.

 

The conclusion is to play with the index of the 4x4 array.With just that you can make any squence you want easily and you can even count how many angle the motor has move

 

If you want to smoothen the movement of stepper motor, you can use half step logic set rather than full step set.

 

Kudos and Marked as Solution == Thanks
0 Kudos
Message 4 of 4
(3,204 Views)