CANOpen Configuration
CanOpen is an open source communication protocol for industrial automation. It is used to control and monitor different devices such as servo drives, I/O modules, and sensors.
An EDS (Electronic Data Sheet) file is a text file that contains information about a CANopen device, including its features, communication settings, and device parameters. The EDS file is used by the master device (such as a programmable logic controller) to communicate with the slave device (such as a servo drive) using the CANopen protocol.
The master device is responsible for coordinating communication between the devices in a CANopen network. The slave device is any device that is connected to the network and follows the commands from the master device.
There are several important parameters to consider when loading EDS files for CANopen:
- Device profile: The device profile defines the functionality and capabilities of the device and is used by the master device to understand how to communicate with the slave device.
- Node ID: The node ID is a unique identifier assigned to each device on the CANopen network. The master device uses the node ID to communicate with the correct slave device.
- Bit rate: The bit rate determines the speed of communication between devices on the CANopen network. The bit rate must be set to match the capabilities of both the master and slave devices.
- Communication objects: Communication objects define the data that is exchanged between devices on the CANopen network. The objects must be defined in the EDS file to ensure that the master device knows what data is available from the slave device and how to access it.
- Vendor-specific parameters: Some devices may have vendor-specific parameters that must be set correctly in the EDS file in order for the device to operate correctly.
It is important to ensure that the EDS file is correct and up-to-date in order to ensure reliable communication between the master and slave devices. Improperly configured EDS files can result in communication errors and unstable system operation.
To understand and configure a CANopen network, it’s important to be familiar with the following terms:
- Node: A node refers to a single device in the CANopen network.
- Object Dictionary: The Object Dictionary is a database that contains information about the communication objects and parameters of each node in the CANopen network.
- PDO (Process Data Object): PDOs are messages that are transmitted between nodes in the CANopen network to exchange process data, such as control signals and sensor readings.
- SDO (Service Data Object): SDOs are messages that are transmitted between nodes to exchange configuration and status information.
- Bit rate: The bit rate determines the speed of communication between nodes on the CANopen network.
- Node ID: A unique identifier assigned to each node in the CANopen network. The node ID is used by the master node to communicate with the correct slave node.
- Master node: The master node is responsible for coordinating communication between nodes in the CANopen network.
- Slave node: A slave node is any node that is connected to the CANopen network and follows the commands from the master node.
- CANopen stack: A software library that implements the CANopen protocol and provides functions for configuring and communicating with nodes in the CANopen network.
- EDS (Electronic Data Sheet) file: An EDS file is a text file that contains information about a CANopen node, including its features, communication settings, and device parameters.
Function blocks used for canopen in the toolbox
-
co_init: This is the starting function of the CANopen protocol and sets the initial settings.
-
sync_producer: The synchronization producer is a functional block that periodically produces synchronization messages.
-
sdo_write: The SDO (Service Data Object) write functional block is used to configure and write data structures.
-
sdo_read: The SDO read functional block is used to read data structures.
-
nmt_request: The NMT (Network Management) request functional block performs requests necessary for network management.
-
emcy_producer: The EMCY (Emergency) producer functional block produces emergency messages.
How To Configure CanOpen
- Drag the CANopen Manager block onto your device.
- Determine your main device ID, device name, and baud rate, and set these three parameters. Then, press the “Upload Master EDS” button to upload the EDS file.
- Press the “Add New Device” button to load the slave device. Fill in the slave node ID and device name, and then press the “Upload Slave EDS” button. After determining your parameters, press the “Add Object to Dictionary” button. If you entered the parameters correctly, the objects will be added to the dictionary.