Example Code

Reading the linear Position with Balluff Encoder and CANopen

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

  • PXI CAN Interface Module

Code and Documents

Attachment

Description

 

Introduction

This VI´s shows, how to read the absolute linear Encoder Position from the Balluff Encoder (BTL5-H1...) with the National Instruments CANopen Library.

This is a reduced example for one positionsensor.

 

The first part reads the name of the device with a SDO, the second part reads the PDO continously.

 

Additional Notes

What you need to get started:

 

At least

 

for further Communication Possibilities click here.

 

#1: Open the attached Example

#2: Set the appropriate Interface, Baudrate nad Node ID

#3: Run the Example and see the position and the velocity

 

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