Initialize Axis 1
The program initializeaxis1.ch below illustrates how Ch NIMotion for NI-NIMOTION is used. This program can be found in the directory CHHOME/package/nimotion/demos after installation of the Ch NIMotion package for NI-Motion, where CHHOME is the home directory in which Ch is installed.

After NI-Motion is installed and configured, the program is readily to run without compilation, which will give you a quick start on programming NI-Motion in Ch. The program will initialize the NI-Motion board installed in your machine. The initialization will set the first axis as a servo axis with an encoder for feedback.

View Source Online
Download Source

Move Axis 1
The program moveaxis1.ch below illustrates how Ch NIMotion for NI-NIMOTION is used. This program can be found in the directory CHHOME/package/nimotion/demos after installation of the Ch NIMotion package for NI-Motion, where CHHOME is the home directory in which Ch is installed.

After NI-Motion is installed and configured, the program is readily to run without compilation, which will give you a quick start on programming NI-Motion in Ch. The program will ask for input as to the target position wanted. It assumes the use of axis 1 and sends the target position inputed to the NI-Motion board. It then starts the axis moving. Once the axis has reached the targeted position, it then reads the trajectory information stored on the NI-Motion board and plots out the velocity and position versus time.

View Source Online
Download Source