Description
This example demonstrates how to continuously acquire velocity measurements using the NI 9361.
Steps to Implement or Execute Code
- Change the Counter Physical Channels and Input Terminal as necessary.
Refer to the NI DAQmx Help for the valid channel names for the Counter module.
Block Diagram Steps:
- Create a Frequency Task to measure the speed of the encoder.
- Create an Angular Encoder Task to measure the position and direction of the encoder.
- Configure the Timing and Triggering for the Task.
- Start the Task.
- Read the Frequency and Position of the Encoder. Use the direction of the encoder in order to change the Frequency into a velocity measurement.
- Stop the task, clear the task, and Display errors (if any).
I/O Connections Overview:
For instruction on how to connect your signals to the NI 9361, refer to your device documentation.
Note:
This example is not valid for two pulse encoders, X2, or X4 encoding.
Requirements
Software
DAQmx 14.5
Hardware
NI 9361
Rob W.