LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to move a stepper motor?

My setup: Labview 7.0 with PCI-7342 controller card and NEMA size 23 stepper motor.

The dilema: I am new to both Labview and stepper motors and I need some basic flow instructions. All I want to do is to have a start and stop button on the panel. Start turns the motor CW and stop will halt it.

I have a test panel using the following block sequence:
Enable Axes
Configure Step mode and polarity
Load Counts/Steps per revolution
Start Motion
Stop Motion

Is this the right sequence of labview functions? I tried this code and nothing happens (of course). Can anyone just give me a quick description as to what Labview code blocks I need to start and stop a stepper motor?

Thanks,
Jeff
0 Kudos
Message 1 of 6
(3,392 Views)
First, make sure that you can get motion using MAX. Set board and axis configurations there and save them. Then use Interactive 1D to do a simple move. In Labview, all you should have to do is:
1. Initialize board if needed.
2. Set operation mode.
3. Load target position.
4. Start motion using Multistart or Blend.
0 Kudos
Message 2 of 6
(3,392 Views)
the motor needs more current and voltage than your labview card
has on its output. so you need an driver (and, as i recommend a
controler) (if you have time, you can build it yourself, if not,
buy one) in addition to your step-motor. I use the ST L298N and ST L297
if you have a controler, it has normaly inputs for step, direction,
half/fullstep, reset, enable.
you can use digital output lines to control these controler inputs.
i just had the same problem...it wasnt that easy for me as it looked... 😉
first idea is to run the step motor with oldschool hardware wires and
switches instead of labview ...


"sparafucile17" schrieb im Newsbeitrag
news:506500000008000000419E0000-1042324653000@exchange.ni.com...
> My setup: Labview 7.0 with PCI-7342 controller
card and NEMA size 23
> stepper motor.
>
> The dilema: I am new to both Labview and stepper motors and I need
> some basic flow instructions. All I want to do is to have a start and
> stop button on the panel. Start turns the motor CW and stop will halt
> it.
>
> I have a test panel using the following block sequence:
> Enable Axes
> Configure Step mode and polarity
> Load Counts/Steps per revolution
> Start Motion
> Stop Motion
>
> Is this the right sequence of labview functions? I tried this code
> and nothing happens (of course). Can anyone just give me a quick
> description as to what Labview code blocks I need to start and stop a
> stepper motor?
>
> Thanks,
> Jeff
0 Kudos
Message 3 of 6
(3,392 Views)
Thanks for your help.

I finally figured out what was wrong. I had actidentally configured the card as a servo motor. Not to mention that I did not initialize the card, so it didn't work after a cold-boot.

The interactive 1D helped a whole bunch! I didn't even know it was there. I had looked in MAX before, but didn't see where I could launch a test panel. But now I know what to do.

Thanks,
Jeff
0 Kudos
Message 4 of 6
(3,392 Views)
Thanks for your input, but I actually just had the card settings loaded wrong:

It was setup as a servo motor and I didn't initialize it.

But things are working great now!

Jeff
0 Kudos
Message 5 of 6
(3,392 Views)
I'm glad things worked out. Here is a vi that may be helpful. It initializes the board only if it needs to. This should be one of the first steps in your motion vi.
0 Kudos
Message 6 of 6
(3,392 Views)