SUMMARY OF REVISIONS The information below describes the reviews made in this manual. Version Revision Description 1.4.0 Information update and inclusion of PLC models PLC410, PLC500ED and PLC500MC. 1.0.0 First edition.
INTRODUCTION 1 INTRODUCTION This Application Note is intended to assist in the use of the CANopen protocol in WEG PLCs, models PLC410, PLC500, PLC500ED and PLC500MC. Throughout this document, the PLC500 is used as an example. However, the information presented is applicable to the other PLC models described above.
ODVA 1.4 IMPORTANT NOTICE ABOUT CYBERSECURITY AND COMMUNICATIONS WEG PLCs, models PLC410, PLC500, PLC500ED and PLC500MC, have the ability to connect and exchange information through communication networks and protocols. Although they have been designed and tested to ensure proper operation with other automation systems using the protocols mentioned in this manual, it is essential that the customer understands the responsibilities associated with information and cybersecurity when using this equipment.
CAN INTERFACE 2 CAN INTERFACE The CAN interface is shown in Figure 2.1 on page 2-1 for PLC500 and PLC410. The CAN interface pinouts are described in Table 2.1 on page 2-1. Figure 2.1: Indication of the CAN connector pins on the PLC500 and PLC410. Table 2.1: Description of the CAN interface.
CAN INTERFACE Table 2.2: Operation of the LED indicator of the CAN interface. CAN LED STATUS DESCRIPTION There is no configuration for the CANopen Master No configuration. communication in the application. CANopen Master communication configured CANopen Master communication GREEN application, and all elements are running without error/failure. without failure.
Page 9
4-1. NOTE! The RUW100 can be programmed using the Weg Programming Suite (WPS) software, but for the example presented in this application note, it is not necessary to use it. In other situations where network devices require external power, it is recommended that the network be powered at only one point, avoiding problems with voltage differences in the power supply between network devices.
PROJECT IN CODESYS 3 PROJECT IN CODESYS In this chapter, the steps for creating a project and adding the master and slave devices of the CANopen network in CODESYS are presented 3.1 PROJECT CREATION To configure and define a CANopen network, you must first create the project and include the PLC500 programmable controller.
PROJECT IN CODESYS 3.2 ADDING MASTER DEVICE In the next step, you must add the CANopen_Manager device. Right-click on the CAN network icon and select Add Device; a new window will open. Expand the CANopen and CANopenManager icons using the + symbol until the CANopen_Manager device appears, as shown in Figure 3.3 on page 3-2.
PROJECT IN CODESYS 3.3 ADDING SLAVE DEVICE Right-clicking on the CANopen_Manager icon adds the slave device to the CANopen network. In this case, the RUW100 with its corresponding firmware version is selected. Figure 3.5 on page 3-3 shows the steps for this configuration.
Page 13
PROJECT IN CODESYS Figure 3.7: Selecting the EDS file and successful device installation. NOTE! Electronic Device Description (EDS) is the file required to describe the slave device to the CANopen network master. The manufacturer must provide this file to allow the correct configuration of this device when the network slave option is available.
CANOPEN CONFIGURATION 4 CANOPEN CONFIGURATION In this chapter, the steps for configuring a CANopen network with a PLC500 master and a RUW100 slave in CODESYS are presented. 4.1 TERMINATION RESISTORS For the CAN network to function correctly, it is essential to use termination resistors. You can choose an external resistor or enable the internal resistor directly through CODESYS.
Page 15
CANOPEN CONFIGURATION By double-clicking on the CANopen_Manager icon, the screen shown in Figure 4.3 on page 4-2 is displayed. This screen is used to define the settings for the master device of the CANopen network. The master is addressed using the Node ID parameter, which must be between 1 and 127. In the Check and fix configuration option, CODESYS checks whether the CANopen network configuration is correct and suggests automatic corrections.
CANOPEN CONFIGURATION NOTE! The method of configuring the addressing and baud rate may be different for each slave device, depending on the type of product and the programming software. Configure the slave device according to the manual provided by the manufacturer. 4.3 PDO CONFIGURATION Variables and addresses configured for a slave must be programmed taking into account the master of that CANopen network.
Page 17
CANOPEN CONFIGURATION New PDOs can be enabled and configured with their respective COB-ID and transmission type. There are different types of PDO transmission that can be configured as follows: Acyclic – synchronous (Type 0): indicates that transmission should occur immediately after reception of a SYNC telegram, but not periodically.
Page 18
CANOPEN CONFIGURATION to 2000 microseconds, transmission type (Transmissiontype) to 255 and transmission period (Event time) to 100 milliseconds. The same configuration is done for the receiving PDO 2, except for its COB-ID, which is maintained. ATTENTION! Setting the Inhibit time to zero in a CAN network can lead to increased collisions, message loss, network congestion, and potential disruptions in system timing and performance.
Page 19
CANOPEN CONFIGURATION NOTE! For larger applications where a large data flow is required in the network, it is recommended to leave enabled only the PDOs that will be used. The receive and transmit PDOs 5...32 can be configured to map other objects. To map new objects in a PDO, use the Add mapping option, as shown in Figure 4.10 on page 4-6.
Page 20
CANOPEN CONFIGURATION Figure 4.12: Error selecting objects to a PDO due to exceeding the 64-bit size. To change the mapped objects of PDOs 1...4, you must first remove the objects using Delete or by right-clicking, as shown in Figure 4.13 on page 4-7.
Page 21
CANOPEN CONFIGURATION Figure 4.14: Adding a new reception PDO. The alignment of default settings between a CANopen slave device and its EDS file is crucial for reliable communication. If the default values specified in the EDS do not match those in the device’s firmware, it can lead to operational conflicts, such as PDOs not functioning correctly or communication failures.
MONITORING 5 MONITORING In this chapter, some methods for monitoring the CANopen network variables and diagnosing communication errors in CODESYS are presented. 5.1 VARIABLE MONITORING You can monitor the variables declared in the network through two methods. The first possibility would be to add them to the CODESYS program and monitor the values ...
MONITORING 5.2 COMMUNICATION ERRORS Network status monitoring can be done in Devices, indicating the status of each communication stage and reporting the status (Status). When encountering connection problems, as shown in Figure 5.3 on page 5- 2, check if the cables are properly connected, what is the status of the CAN LED on the PLC410, PLC500, PLC500ED, PLC500MC, and then review the settings made.
Page 24
MONITORING Figure 5.5: Indication of declared error on the CANopen network. To remove the warning, simply click on Acknowledge, as shown in Figure 5.6 on page 5-3. Figure 5.6: Recognizing declared error of CANopen Network. After acknowledging the warning also in the CAN tab and good network functioning, the device icons will be represented as in Figure 5.7 on page 5-3.
MONITORING 5.3 MONITORING USING FUNCTION BLOCKS The CANopen network can be monitored using the Function Blocks available in the CAA CiA 405 and 3S CANopenStack libraries in CODESYS. In the 3S CANopenStack library, the CANopenState Function Block obtains the CANopen network device status at each call.
Page 26
MONITORING The DEVICE_STATE variable is of type ENUM whose states are described in Table 5.1 on page 5-5. Table 5.1: Description of the states of the DEVICE_STATE variable. Name Value Description INIT Device is in boot up phase. RESET_COMM Device performs a reset communication. RESET_APP Device performs a reset application.
Page 27
BRAZIL WEG DRIVES & CONTROLS - AUTOMAÇÃO LTDA. Av. Prefeito Waldemar Grubba, 3000 89256-900 - Jaraguá do Sul - SC Phone: 55 (47) 3276-4000 Fax: 55 (47) 3276-4060 www.weg.net/br...
Need help?
Do you have a question about the CANopen PLC500 and is the answer not in the manual?
Questions and answers