LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems Driving my Stepper Motor

Hey all,

 

I'm having some problems driving my stepper motor. It runs clockwise at an eighth step just fine but it doesn't run counter clockwise or at any other step size. I've looked at all the datasheets I can find and I believe I have it programmed correctly. I'm using a NI USB 6009 OEM board to connect to my PC, an Anaheim Automation MBC25081TB step driver, and a generic stepper motor with specs: 18 deg/step, 4-5VDC, and 0.5 A current rating and is 2-phase 4 wire bipolar. I'm sending signals to the driver using a digital waveform and the digital outputs of NI USB 6009 OEM board. I've attached my code to this post, please let me know if you have any ideas.

 

Thanks in advance.

0 Kudos
Message 1 of 13
(4,540 Views)

1chNsample ain't gonna fly

 

the 6009 is software timed only.  It has no buffer to store multiple points.  it outputs 1 sample and holds that until it sees another write.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 13
(4,496 Views)

@jordanr18 wrote:

Hey all,

 

I'm having some problems driving my stepper motor. It runs clockwise at an eighth step just fine but it doesn't run counter clockwise or at any other step size. I've looked at all the datasheets I can find and I believe I have it programmed correctly. I'm using a NI USB 6009 OEM board to connect to my PC, an Anaheim Automation MBC25081TB step driver, and a generic stepper motor with specs: 18 deg/step, 4-5VDC, and 0.5 A current rating and is 2-phase 4 wire bipolar. I'm sending signals to the driver using a digital waveform and the digital outputs of NI USB 6009 OEM board. I've attached my code to this post, please let me know if you have any ideas.

 

Thanks in advance.


That definitely sounds like a configuration issue. We don't know how you set jumper 1 (JP1) , position 1-2 (sourcing) or 2-3 (sinking). If set to sinking the inputs need to be pulled to 3.5-24V DC to be considered active. If your USB-6009 is configured to active drive then the maximum output voltage is 3.3V. You will then always be in eighth steps mode and in the same default direction.

Refer to this link for the output configuration.

 

Ben64

 

Ben64

0 Kudos
Message 3 of 13
(4,481 Views)

I have the driver set in JP1 position 1-2 which according to my datasheet is sinking. As to the USB 6009, I am not sure if it is active or not, is there a way I can check that? I am very new to labview so I don't know a whole lot

0 Kudos
Message 4 of 13
(4,450 Views)

Do as specified in the link I posted, drop a DAQmx Channel property node on your block diagram and select the Digital Output drive type property. You can select to read or write the property value by right clicking on it. Reading the property will tell you the actual setting.

 

Ben64

Message 5 of 13
(4,445 Views)

So I followed the link, turns out my USB 6009 is configured to an Open Collector at the moment, do I need to change it to an Active Drive?

 

Thanks for your help Ben64

 

0 Kudos
Message 6 of 13
(4,441 Views)

i just tried running it as a 1CH 1sample and it doesn't move at all now

0 Kudos
Message 7 of 13
(4,439 Views)

@ben64 wrote:

@jordanr18 wrote:

Hey all,

 

I'm having some problems driving my stepper motor. It runs clockwise at an eighth step just fine but it doesn't run counter clockwise or at any other step size. I've looked at all the datasheets I can find and I believe I have it programmed correctly. I'm using a NI USB 6009 OEM board to connect to my PC, an Anaheim Automation MBC25081TB step driver, and a generic stepper motor with specs: 18 deg/step, 4-5VDC, and 0.5 A current rating and is 2-phase 4 wire bipolar. I'm sending signals to the driver using a digital waveform and the digital outputs of NI USB 6009 OEM board. I've attached my code to this post, please let me know if you have any ideas.

 

Thanks in advance.


That definitely sounds like a configuration issue. We don't know how you set jumper 1 (JP1) , position 1-2 (sourcing) or 2-3 (sinking). If set to sinking the inputs need to be pulled to 3.5-24V DC to be considered active. If your USB-6009 is configured to active drive then the maximum output voltage is 3.3V. You will then always be in eighth steps mode and in the same default direction.

Refer to this link for the output configuration.

 

Ben64

 

Ben64


So what you're saying is that even with my USB 6009 configured as an Active Drive, I'll still be able to only move in 1/8 steps and only in one direction? I wouldn't be able to move both clockwise and counter-clockwise?

0 Kudos
Message 8 of 13
(4,434 Views)

Try this mod

Capture.png

that 6009 cannot use multiple samples it is on demand only (Where have I said it before)  Hence you get 1 step and keep repeating the same point.  To be honest unless you have some screwwy data (which you did not attach) you probably should be getting a DAQmx error


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 13
(4,433 Views)

Sorry, I should have had the correct default values set, here is my updated VI with your mod. I am just trying to have the motor go a couple of eighth steps clockwise, and then counter clockwise.

 

Edit: the lines in the digital data refer to MS1, MS2, On/Off, Clock and Direction inputs on the MBC25081TB driver. I have Direction connected to P0.0, Clock to P0.1, On/Off to P0.2, MS2 to P0.3, and MS1 toP0.4

0 Kudos
Message 10 of 13
(4,426 Views)