From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Control 2 Axes at Once

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Motion Control

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example shows the simplest way to control 2 axes on the same board at the same time. 

 

Description

This VI shows the simplest way to control 2 axes on the same board at the same time. Using this program, you can control the acceleration, velocity and target position while the program is executing.

 

Requirements

software

  • LabVIEW 2012 (or compatible)
  • NI-Motion 14.0 (or compatible)

 

Steps to Implement or Execute Code

  1. Choose the correct board ID and Axis.
  2. Run the VI to execute the program.
  3. Any change to the acceleration, velocity or target position controls will update the motor during execution.

 

Additional Information or References

Front Panel

2.PNG

 

Block Diagram 

1.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Regards,

Chris L
Applications Engineer
National Instruments

Certified LabVIEW Associate Developer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.