0% found this document useful (0 votes)
128 views

M238 - CANopen Documentation PDF

This document provides an example of setting up CANopen communication between an M238 PLC and an OTB device. It describes configuring the CANopen fieldbus with 500 kb/s baudrate. The example reads the fallback mode of the OTB's output 0 to 7 using the SDO_Read4 function block from the CIA405 library. It also configures PDO 1 to control the OTB output 0 and read the OTB input 0 status. Instructions are provided on configuring the hardware addresses for the OTB and software configuration in the M238 project.

Uploaded by

mesquitanm
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views

M238 - CANopen Documentation PDF

This document provides an example of setting up CANopen communication between an M238 PLC and an OTB device. It describes configuring the CANopen fieldbus with 500 kb/s baudrate. The example reads the fallback mode of the OTB's output 0 to 7 using the SDO_Read4 function block from the CIA405 library. It also configures PDO 1 to control the OTB output 0 and read the OTB input 0 status. Instructions are provided on configuring the hardware addresses for the OTB and software configuration in the M238 project.

Uploaded by

mesquitanm
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Getting Started Package

Examples

M238: Setting up of the CANopen fieldbus


Specifications: The goal of this example is to present a simple CANopen configuration and to work with communication function blocks. Description of the application: The configuration of the application is composed of a M238 PLC and of one OTB device. The communication between the two devices is ensured by CANopen. This example shows the configuration of the CANopen fieldbus and the setting of the PDO and the SDO to exchange some data between the M238 and the OTB. It is proposed to read the fallback mode of the OTB output 0 to 7. For this example, the library CIA405 was used in order to program with the SDO_Read4 function block. Description of the configuration: For the configuration of the OTB, it is possible to configure the hardware as following: 2 as slave address and a baudrate in automatic detection. For the configuration of the OTB, please refer the instructions in the OTB user manual. Concerning the software configuration, please find below the instructions. Parameters: CANopen bus
Baud Rate 500 Kb/s

OTB device
EDS Device address OTB1CODM9LP EDS file 2

Configure the PDO 1 to control the OTB output 0 and to read the status of the OTB input 0.

Double click on CANbus icon in the Device window:

Author : A. Krebs

Getting Started Package

Examples

Double click on the OTB icon in the Device window:

Description of the read / write function blocks: This function allows to read objects on CANopen FB Input description - Network number : not used - Start the read request (rising edge) - Time out in ms - Device address - Channel number : not used - Index number of the object to read - Sub Index of the object to read FB Output description - Request activate - True If FB is in error - Data value of the object - Number of byte read - Error number

Author : A. Krebs

Getting Started Package

Examples

This function allows to write objects on CANopen FB Input description - Network number : not used - Start the write request (rising edge) - Time out in ms - Device address - Channel number : not used - Index number of the object to write - Sub Index of the object to write - Number of byte to write FB Output description - Request activate - True If FB is in error - Error number

Author : A. Krebs

You might also like