Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Initializing Motion Controllers

4 ratings | 3.75 out of 5
Print
Before running a motion control program, you must initialize the motion controller. One way to initialize the controller is to use the special utility that is included with each version of National Instruments motion control software: pcRunner for ValueMotion controllers or FlexCommander for FlexMotion controllers. However, you can also initialize the controller programmatically. The motion control LabVIEW VI libraries include special VIs for initializing the controller that you can run prior to running other programs. To initialize the controller programmatically in development environments other than LabVIEW, you have to write special routines, as outlined below.

Below is a recommended list of FlexMotion functions you should execute--in the order you should call them--for system-level and per-axis initialization. This recommended list covers the minimum areas of initialization for basic motion control. You can add additional functions to this list for enhanced system configuration requirements.

System Configuration
    1. Clear Power Up Status (always required)
    2. Configure Axis Resources
    3. Enable Axes
Motion I/O Configuration
    4. Configure Inhibit Outputs
    5. Set Limit Input Polarity
    6. Set Home Input Polarity
    7. Enable Limits
    8. Enable Home Inputs
Per-Axis Configuration
    9. Configure Step Mode & Polarity (stepper axes only)
    10. Load Counts/Steps per Revolution
      a. Load counts for servo axes.
      b. Load steps for open-loop stepper axes.
      c. Load counts and steps for closed-loop stepper axes.
    11. Load All PID Parameters (servo axes only)
    12. Set Stepper Loop Mode (stepper axes only)
Initialize Trajectory Parameters (Per-Axis)
    13. Set Operation Mode
    14. Load Following Error (closed-loop axes only)
    15. Load Velocity
    16. Load Acceleration/Deceleration
Establish a Position Reference (Per-Axis)
    17. Find Home (requires configured and enabled limit and home inputs)
    18. Find Index (closed-loop axes only)
    19. Reset Position

At power-up, all axes are automatically stopped, or they are killed when the axis circuits are disabled (when the motor is off). You must always execute a Clear Power Up Status function before attempting to initialize or control the FlexMotion controller. This power-up state is for safety and cannot be bypassed by saving custom defaults. If you use the Enable Auto Start function to specify an onboard program to start when the controller boots, the power-up state will be cleared automatically so the onboard program can run. A power cycle also resets velocity override back to 100%.


4 ratings | 3.75 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).