How Can I Address Multiple Nodes with NI-Industrial Communications for CANopen?

Updated May 11, 2018

Reported In

Hardware

  • PCI-8531
  • PXI-8531
  • NI-9881

Software

  • CANopen Library Toolkit

Issue Details

I am using NI-Industrial Communications for CANopen to communicate with nodes on a CANopen bus using the PCI-8531, PXI-8531 or NI 9881 C Series module. How can I communicate with multiple nodes on the bus simultaneously?
 

Solution

NI-Industrial Communications for CANopen VI’s such as NMT Write.vi, TPDO Create.vi, RPDO Create.vi, or SDO Create.vi have a Node ID input terminal. Using 0 will send a message to every node on the bus. If you want to communicate with multiple nodes but not all nodes on the bus, you will need to open connections to each of them and send the message. In the example below, all nodes on the bus are set into a pre-operational state at once with the CANopen NMT write VI. After that, SDO data is read from node 4 and 3.


Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your comuter, and drag the file onto your LabVIEW diagram.

WAS THIS ARTICLE HELPFUL?

Not Helpful