You are on page 1of 3

Configure and Test a Stepper Motor - National Instruments Page 1 of 3

Improve your ni.com experience. Login or Create a user profile.

4 ratings: 4 out of 5 Rate this Document

Configure and Test a Stepper Motor


Hardware: Motion Control>>Controllers

Problem:
How do I configure my NI 73XX motion controller to control my stepper motor?

Solution:

1. Open the Measurement & Automation Explorer (MAX)

2. Navigate to your NI Motion Device


a. In the Configuration panel, expand the My System tree
b. Expand the Devices and Interfaces tree
c. Expand the NI Motion Devices tree
d. Expand the PCI-73XX tree
e. Expand the Default 73XX Settings tree

3. Configure your stepper settings


a. Go to the Axis Configuration option, under the desired axis (e.g. Axis 1)
b. In the Axis Configuration tab, set Type to Stepper.
c. In the Stepper Settings tab, select your Stepper Steps Per Revolution, Stepper Loop
Mode, Stepper Polarity, Stepper Output Mode, and Pull-in Tries

Note: For P-Command motors, select P-Command for Stepper Loop Mode

4. For now, disable your inhibit, home, and limit signals


a. Select the Motion I/O Settings option under the axis tree
b. Disable all the signals in this tab (Limit Filters, Forward Limit Switches, Reverse
Limit Switches, Home Switch, Forward Software Limit, Reverse Software Limit,
Inhibit Output)

5. Initialize your motion controller with your current MAX settings


a. Click on the Initialize button

http://digital.ni.com/public.nsf/allkb/9675C83F037811F68625727C0002A4A5 09-09-2013
Configure and Test a Stepper Motor - National Instruments Page 2 of 3

6. Test your stepper settings with your stepper motor


a. Expand the Interactive tree
b. Select 1-D Interactive
c. Set Stepper Loop Mode to Open Loop
d. Set Velocity, Acceleration, and Deceleration to values slow enough for your motor
to perform
e. Set Operation Mode to Relative Position
f. Set Target Position to the number of your Stepper Steps Per Revolution (as set
in step 2c)
g. Click the Start button
i. Your motor should move one full revolution. If the motor moves but goes over or
under one revolution, then most likely the Stepper Steps Per Revolution is
incorrect.
ii. Your motor should rotate in the forward direction (if Target Position is a positive
value). If the motor rotates in the wrong direction, then you may need to switch
either phase A and A- or B and B- (effectively reversing directions) leads from
your drive to your motor. (See KnowledgeBase 2DKB1MYJ: How Can I
Determine My Stepper Motor Wiring without the Stepper Motor Pinout?)

7. If you are using feedback in your motion system, proceed to step 8. If you are not using an
encoder, you are done configuring and testing your open loop stepper system.

8. Configure your feedback settings


a. Follow the instructions below if you are using a two-phase quadrature encoder for
feedback
i. In the Axis Configuration option, set Type of Feedback to Encoder
ii. Go to the Encoder Settings option
iii. Enter your encoder counts per revolution
Note 1: If you can kill your motor and rotate the motor manually, then you can
determine the correct encoder counts per revolution by following the steps in
KnowledgeBase 2FDCRSLT: Determining the Encoder Counts Per Revolution in
NI-Motion

Note 2: To increase feedback accuracy, NI motion controllers read every edge of


an encoder feedback signal. With a quadrature encoder, this results in four
edges (rising and falling on lines A and B) for every quadrature pulse of the
encoder. Thus, if your quadrature encoder is rated at 2000 quadrature pulses per
revolution, the controller will actually read 8000 edges per revolution – and each
of these is considered a “count”.

When setting the Encoder counts per revolution input in MAX, it is common to
mistake this value for the encoder’s physical resolution. Instead, this setting
needs to hold the corresponding number of counts read by the controller, which
is four times that resolution. (See KnowledgeBase 3QGEF7D3: Following Error in
a Motion System)
b. Follow the instructions below if you are using analog feedback
i. See KnowledgeBase 3VMMB7AJ: Analog Feedback with a Stepper Motor

9. Initialize your motion controller with your current MAX settings


a. Click on the Initialize button

10. Test your encoder settings


a. Go to the Main tab of 1-D Interactive
b. Set Stepper Loop Mode to Closed Loop
c. Set Velocity, Acceleration, and Deceleration to values slow enough for your motor to
perform
d. Set Operation Mode to Absolute Position
e. Click the Reset Position button to reset the Current Trajectory Data Position to 0.
f. Set Target Position to the number of your Stepper Steps Per Revolution (see step 3c)
g. Click the Start button
i. Your motor should move one full revolution
ii. The Current Trajectory Data’s Position should match the Target Position

11. Re-enable the inhibit, home, and limit signals that you will be using
a. Go to the Motion I/O tab
b. Enable the signals that you will be using and configure the correct polarity for each

12. Configure the rest of options in MAX as is necessary


a. Click on the Show Help button to display the MAX Help sidebar

http://digital.ni.com/public.nsf/allkb/9675C83F037811F68625727C0002A4A5 09-09-2013
Configure and Test a Stepper Motor - National Instruments Page 3 of 3

b. Use the MAX help for more information on the rest of the settings. Hover your mouse
over a setting to populate the MAX Help with a description.

Note: You do not need to configure anything in the Control Loop Settings tab for a
stepper motor.

13. Initialize your motion controller with your final MAX settings
a. Click on the Initialize button

Related Links:
KnowledgeBase 2DKB1MYJ: How Can I Determine My Stepper Motor Wiring without the Stepper Motor
Pinout?
KnowledgeBase 2FDCRSLT: Determining the Encoder Counts Per Revolution in NI-Motion
KnowledgeBase 3QGEF7D3: Following Error in a Motion System
KnowledgeBase 3VMMB7AJ: Analog Feedback with a Stepper Motor
KnowledgeBase 2U4GA0OV: How Do I get the 73xx Controller and UMI 7764 to Drive a Third Party
Stepper Motor?

Attachments:

Report Date: 02/07/2007


Last Updated: 07/01/2013
Document ID: 466HEDS4

Your Feedback! Poor | Excellent Yes No


Document Quality? Answered Your Question?
1 2 3 4 5
Document needs work? Please tell us why.

Please Contact NI for all product and support inquiries.

My Profile | RSS | Privacy | Legal | Contact NI


© 2012 National Instruments Corporation. All rights reserved.
| E-Mail this Page

http://digital.ni.com/public.nsf/allkb/9675C83F037811F68625727C0002A4A5 09-09-2013

You might also like