Page 3
Legal Notices The Odot Automation brand and any trademarks of Odot Automation System Co., Ltd. (hereinafter referred to as " Odot Automation") and its affiliated companies mentioned in this guide are the properties of Sichuan Odot Automation or its affiliated companies. All other brands are trademarks of their respective owners.
Page 4
Note is used to indicate hazards that are not related to personal injury. Please note The installation, operation, repair and maintenance of electrical equipment is restricted to qualified personnel. Odot Automation does not assume any consequences arising from the use of this information. 4 / 168 http: // www.odotautomation.com...
Page 5
A qualified person is a person who has the skills and knowledge related to the manufacture and operation of electrical equipment and its installation, and who has been trained in safety to detect and avoid the associated hazards. Personnel qualifications Only those who are properly trained, familiar with, and understand the contents of this manual and all other relevant product documentation are authorized to use this product.
Page 6
outside. B. Use firewalls to protect the control system network and separate it from the rest of the network. C. If remote access is required, use a VPN (Virtual Private Network) tunnel. D. Restrict access to development and control systems through physical means, operating system capabilities, etc.
Page 7
About this manual Document scope This guide describes the design parameters of the C4374 programmable controller and CODESYS programming examples, and provides an overview of the C4374 product features, function descriptions, configuration methods, wiring diagrams, and installation details. An introduction to the Modbus communication protocol is also attached.
Page 8
hazardous area. Failure to follow the instructions may result in the loss of the protection provided by the device, which may result in serious consequences such as death, personal injury, or damage to the device. Warning Loss of control · The designer of any control scheme must take into account the possibility of a failure of the control path and provide a way for certain critical control functions to return to a safe state in the event of a path failure and after a path failure.
Page 9
NEXPECTED DEVICE OPERATION HE RISK ASSESSMENT SHOULD INCLUDE THE POSSIBILITY OF COMMUNICATION FAILURES BETWEEN THE LOGIC CONTROLLER AND ANY EXPANSION MODULES " " F THE MODULE OUTPUT SIGNAL KEEP CURRENT DOES NOT MATCH YOUR APPLICATION REQUIREMENTS WHEN THE EXPANSION BUS IS FAULTY OTHER SCENARIOS SHOULD BE USED TO ENSURE THAT THE APPLICATION CAN COPE WITH THE BUS ERROR EVENT...
Page 10
Version information The following changes have been made to the document: Date Version Modifications Author 2024-12-02 V1.0 Release version 10 / 168 http: // www.odotautomation.com TEL: +86-0816-2538289...
Page 11
Software downloads If you need to download the device description file or IO Config software, please log in to the official website of Odot Automation: www.odot.cn, select the corresponding product page on the support and service page, and click Download. To download Codesys software, please log in to the www.codesys.cn page to download it.
Page 12
in the following places: places with dust, oil fumes, conductive dust, corrosive gases, and flammable gases; Do not expose to high temperatures, condensation, wind and rain; Vibration and shock will also cause damage to the product; Failure to follow the instructions may render the protection provided by the device null and may result in minor bodily injury or damage to the device.
Page 13
Assumption of Risk The company shall not be liable for casualties, property damage or other related losses caused by the use of the equipment. All risks are borne by the user. 13 / 168 http: // www.odotautomation.com TEL: +86-0816-2538289...
1 Product Overview 1.1 Brief introduction The C4374 programming environment is Codesys, which follows the IEC61131-3 international standard programmable logic controller, supports ladder diagram (LD), instruction list (IL), structured text (ST), function block diagram (CFC/FBD), sequential function chart (SFC) five programming languages, user program storage supports 4 Mbytes, data memory supports 4 Mbytes, and supports up to 5 task states.
1.2 Selection Table Serial Model Description of the function State number CT-1218 8-channel digital input PNP/24V active Published CT-121F 16 channels of digital input PNP/24V active Published CT-1228 8-channel digital input NPN/0V active Published CT-122F 16-channel digital input NPN/0V active Published 32 channels of digital inputs, PNP/24V active, CT-124H...
Page 20
/± 20mA ,16-bit differential inputs CT-3713 3-channel RTD input RTD-PT100 Published CT-3723 3-channel RTD input RTD-PT1000 Published Published CT-3716 6-channel RTD input RTD-PT100 Published CT-3726 6-channel RTD input RTD-PT1000 4-channel RTD input RTD-PT100, with isolation CT-3734 Published between channels 4-channel RTD input RTD-PT1000, with isolation CT-3744 Published...
Page 21
24V/8A CT-730F 18-channel field power distribution module 18*0VDC Published 18-channel field power distribution module CT-731F Published 18*24VDC CT-732F 18-channel field power distribution module 18*PE Published 18-channel field power distribution module CT-7339 Published 9*24VDC/9*0VDC 18-channel field power distribution module CT-7346 Published 6*24VDC/6*0VDC/6*PE 21 / 168 http: // www.odotautomation.com...
1.3 LED Indicator The user can easily check the power status of the PLC and I/O modules, the operating status of the I/O modules, and the number of I/O channels through the LED status indicator. Detailed indicator status refers to individual adapters or IO modules. WARNING OSS OF CONTROL •...
WARNING NEXPECTED DEVICE OPERATION • C ONNECT THE RAIL TO THE FUNCTIONAL GROUND OF THE MOUNTING DEVICE AILURE TO FOLLOW THE INSTRUCTIONS MAY RESULT IN THE LOSS OF THE PROTECTION PROVIDED BY THE DEVICE WHICH MAY RESULT IN SERIOUS CONSEQUENCES SUCH AS DEATH PERSONAL INJURY OR DAMAGE TO THE DEVICE...
1.4.3 Protective grounding on the backplate (PE) Protective Grounding (PE) is connected to a conductive backplate by a heavy-duty conductor, typically a copper braided cable with the maximum allowable cable cross- section. There is a metal shrapnel on the back of the module for effective grounding with the guide rail, and the metal shrapnel is connected to the PE inside the terminal block of the adapter module.
1.5 Wiring Use a push-in connection to connect single wires or crimp terminal (ferrule) wires without any additional tools. Users save time on cabling and guarantee a secure connection regardless of wiring experience. The module has a wiring harness fixed end, which is used to fix the cable when the IO module is connected to a multi-strand cable.
• F (2A) OR RELAY OUTPUT WIRING USE A CONDUCTOR WITH A CROSS SECTIONAL AREA (AWG20) OF AT LEAST SQUARE MILLIMETERS AND A TEMPERATURE RATING OF AT 80°C (176°F). LEAST AILURE TO FOLLOW THE INSTRUCTIONS MAY RESULT IN THE LOSS OF THE PROTECTION PROVIDED BY THE DEVICE WHICH MAY RESULT IN SERIOUS CONSEQUENCES SUCH AS DEATH...
NEXPECTED DEVICE OPERATION • D O NOT EXCEED ANY OF THE RATINGS SPECIFIED IN THE NVIRONMENTAL AND LECTRICAL HARACTERISTICS TABLE AILURE TO FOLLOW THE INSTRUCTIONS MAY RESULT IN THE LOSS OF THE PROTECTION PROVIDED BY THE DEVICE WHICH MAY RESULT IN SERIOUS CONSEQUENCES SUCH AS DEATH PERSONAL INJURY OR DAMAGE TO THE DEVICE...
Page 28
OF THE ASSEMBLER OF THE SYSTEM AILURE TO FOLLOW THE INSTRUCTIONS MAY RESULT IN THE LOSS OF THE PROTECTION PROVIDED BY THE DEVICE WHICH MAY RESULT IN SERIOUS CONSEQUENCES SUCH AS DEATH PERSONAL INJURY OR DAMAGE TO THE DEVICE 1.6.1.3 Install correctly The DIN rail lock can be mounted safely and reliably on a 35 mm DIN rail.
Page 29
③Top view of horizontal installation ④Horizontal mounting (rail vertical) WARNING OSS OF CONTROL • T HE BUCKLE OF THE MODULE MUST BE STUCK IN PLACE OTHERWISE IT MAY CAUSE MODULE TO BE DISCONNECTED • T HE CLIPS OF THE MODULE MUST BE SNAPPED IN PLACE OTHERWISE THE MODULE MAY FALL •...
Page 30
1.6.1.4 Power module use The power module needs to be added according to the actual number of I/O modules, and the placement position of the power module is between the I/O modules, and the specific slots are not fixed, so the drawing designer needs to consider the installation position of the power module in advance.
1.6.2 disassembly When disassembling the module, need to manually open the rail lock on the upper side of the module, and for the adapter module, also need to open the rail lock counterclockwise. WARNING NEXPECTED DEVICE OPERATION • T HE MODULE DOES NOT SUPPORT HOT SWAP FUNCTION AND WHEN REMOVING OR REPLACING THE MODULE...
1.6.3 Installation clearance When installing or removing modules, minimal clearance must be maintained. Warning NEXPECTED DEVICE OPERATION • I NSTALL THE DEVICE THAT DISSIPATES THE MOST HEAT ON TOP OF THE CABINET TO ENSURE PROPER VENTILATION • D O NOT PLACE THE DEVICE NEXT TO OR ON TOP OF A DEVICE THAT MAY CAUSE OVERHEATING •...
1.6.4 Incorrect installation A. The left buckle of the device is not locked on the guide rail. B. After the installation is completed, the buckle on the upper side of the module is not pressed to the locking rail, or the pressed position is not pressed in place. C.
1.7 Power supply Dangerous IRE HAZARD • F OR THE MAXIMUM CURRENT CAPACITY OF THE POWER SUPPLY ONLY THE CORRECT WIRE SIZE IS USED AILURE TO FOLLOW THE INSTRUCTIONS MAY RESULT IN THE LOSS OF THE PROTECTION PROVIDED BY THE DEVICE WHICH MAY RESULT IN SERIOUS CONSEQUENCES SUCH AS DEATH PERSONAL INJURY...
1.8 Ventilation requirements NOTE • IO MODULE PLEASE INSTALL IN THE CONTROL CABINET WITH DOOR LOCK CONTROL >IP20); CABINET HOUSING PROTECTION • T HE INSTALLATION SHOULD NOT BE PLACED UNDER THE COMPONENTS WITH LARGE HEAT GENERATION AND THE SURROUNDING VENTILATION AND HEAT DISSIPATION SPACE SHOULD BE LARGE ENOUGH AND THERE SHOULD BE A SEPARATION OF MORE THAN MM BETWEEN THE BASIC UNIT AND THE EXPANSION UNIT...
ARNING S THIS PRODUCT CANNOT BE DISPOSED OF WITH OTHER HOUSEHOLD WASTE WHEN THE END USER INTENDS TO DISPOSE OF THIS PRODUCT THE PRODUCT MUST BE TAKEN TO AN APPROPRIATE FACILITY FOR RECOVERY AND RECYCLING • D O NOT DISPOSE OF IT DIRECTLY IN THE TRASH •...
2 Module parameters 2.1 Technical parameters General parameters Power supply: 19.2-28.8VDC (Nominal: 24VDC) System Power Protection: anti-reverse protection Power Consumption 135mA@24VDC Internal Bus Supply Max.2.0A@5VDC Current Isolation System power to field power: isolated Power supply: 19.2-28.8VDC ( Nominal: 24VDC ) Field Power Field Power Current Max.
Page 39
Protection Area Maximum Expansion 1K Bytes Module Input Maximum Expansion 1K Bytes Module Output Bitwise Operations 0.10us Cycle Word Operation 0.10us Cycle Double Word 0.27us Operation Cycle Minimum Program Run Cycle Supported (external battery required) Communication parameters Communication 3*RJ45 , 1*RS485 , 1*CAN interface Network protocols Modbus RTU, Modbus TCP, EtherCAT, CANOpen...
2.2.1 Reset button Press and hold for 5s during operation to reset the configuration parameters of the C4374 device to its initial state. 2.2.2 DIP switch 1. Dial to the middle to stop the PLC program. 2. Dial to the top to run the PLC program.
2.2.4 LED Indicators ① Power indicator (green) ② Module Status Indicator (Red/Green) ③ Device Operation Indicator (Red/Green) ④ Network Status Indicator (Green/Red) ⑤ IO Operation Indicator (Green/Red) ⑥ IO Error Indicator (Green/Red) PW Power Indicator Definition (Green) The system power supply is normal The system power supply is abnormal STA Module Status Definition...
Indicator (Green/Red) I/O initialization is normal I/O initialization is abnormal IER IO Error Indicator Definition (Green/Red) I/O communication is normal Double Flash I/O communication is abnormal 2.2.5 OLED Displays information such as device name, IP address, APP, IAP version number, and error code.
2.3 Wiring 2.3.1 Ethernet interface LAN1/LAN2 support switch function, 10Mbps/100Mbps adaptive rate, it can be used as Modbus-TCP and IO Config interface. Speed Network Speed Indicator (Green) ON: 100Mbps OFF: 10Mbps Link/Act Link status indicator, Active indicator (Orange) 44 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
ON: Connected OFF: Not connected Flash: Active connection SHIELD RJ45 Crystal head shield interface RJ45 Interface pin definition: Definition Description Transmitter Signal Positive Transmitter Signal Negative Receiver Signal Positive Receiver Signal Negative 2.3.2 RS485 Interface The device wiring uses 4PIN terminals, the pins definition as follows: Definition Description RS485 A+...
Page 46
It is powered by 24V DC and uses 3PIN terminals. The system power pins are defined as follows: Definition Description System power positive System power negative Protect Earthing The field power pins are defined as follows: Definition Description Field power positive Field power negative Protect Earthing 46 / 168...
3 IO Config Software 3.1 IO-Config Software Installation Double-click the icon to click Install, in the pop-up window you can choose to configure the language of the software, English and Chinese Simplified are optional, select the English, click OK. In the pop-up window, confirm the installation directory in turn, click 'Next', check the Create 'Desktop icon', click 'Next', and click 'Install'.
3.2 Software interface Menu Bar: The menu of IO Config software。 Toolbar: Commonly used user menus. Project Window: Displays the currently established projects. Properties Window: Displays the specific parameters of the current project. Main Window: Basic Information: it can view the module name, module number, hardware version, software version, module description, current consumption, and device manufacturer of the module.
Menu Description Search Device A new window pops up to search for devices by network or serial communication Device Update A new window pops up for the C4374 device and I/O module firmware upgrade Option Menu Description Configuration It can modify the software display language, software interface...
the version number of the configuration software A new window pops up, an abnormal About Help - About exit reminder, WIN7 sp1/XP system Exceptions Exceptions versions below please install Microsoft patches. 3.2.3 Properties window Displays the currently established projects. 3.2.4 Properties window The Properties window displays the specific parameters of the current item.
Page 52
I/O module (module name, module number, module description, number of submodules) 52 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
3.2.5 Main window Basic information: It can display the module name, module number, hardware version, software version, module description, current consumption, and equipment manufacturer of the PLC and I/O modules. Process data: Displays the channel information of the I/O module for online monitoring of the channel data.
Page 54
Configuration Parameters: Displays the module parameters of the PLC and I/O modules, and the module parameters that can be modified. Address Table: Displays the storage area where the input and output channels of the I/O module are located. 54 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Installation information: It can display the module description, current consumption, module size, residual current, and product pictures of PLC and I/O modules. 3.2.6 Message window Displays the real-time information of the current operation, and displays all operation log records such as creating a new project, uploading, downloading, modifying 55 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
E. Search for the device. F. Firmware Upgrade. 3.3.2 Communication interface The C4374 uses the Ethernet interface as the communication interface for uploading and downloading I/O modules, uploading and downloading I/O modules, modifying the parameters of mounted I/O modules, online testing, and firmware upgrades.
I/O modules are viewed in the same way. 3.3.4 Modify the configuration parameters The configuration parameters of the C4374 and I/O modules can be modified in the 58 / 168 http:// www.odotautomation.com...
Page 59
IO-Config software. C4374 parameters must be modified with the help of IO-Config software. Use C4374 PLC, CT-121F, CT-222F and other modules to demonstrate the configuration of module parameters. The C4374 uses the Ethernet configuration interface, click Search for Devices, and follow the steps shown below to upload the device.
Page 60
Then modify the parameters of the module. After the settings are complete, right-click the C4374 device in the project directory bar – "Download Configuration". The configuration parameters of the C4374 device and I/O module can be modified. 60 / 168 http:// www.odotautomation.com...
'Ctrl +S' to save the entire configuration project file. 3.3.5 Online Debug First, search for the device and upload the project, right-click on the C4374 device, and select Online. The I/O module real-time data can be monitored in the "Process Data"...
Note: For digital input modules, it can right-click on the module and manually add the 'Counting Submodule'. After the addition is complete, you must download the configuration again. 3.3.7 Device firmware upgrade Open the IO-Config software, click Search for Devices, and follow the steps shown below.
'Start Upgrade' and wait for the upgrade to complete. The above is the process of firmware upgrade, and the I/O module can be upgraded using this method. 3.3.8 Data export Right-click on 'C4374 Device' and select 'Export Address Table'. 63 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 64
In the pop-up window, select the file format, output file directory, and file name, and then click Confirm. Export Document After creating the project, right-click on the C4374 device and select Export Document. 64 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 65
In the pop-up window, select the file format, output file directory, and file name, and then click Confirm. 65 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
4 Programming software(Codesys) 4.1 Programming software installation The CODESYS V3.5.19.70 programming software can be downloaded from the CODESYS website or installed according to the software installation package provided by the company. The SP19 version is used as an example for installation and demonstration.
Page 67
After the download is complete, double-click the installation package and follow the steps in the pop-up window: 67 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Double-click the generated shortcut, run the Codesys programming software, and select "Tools – Device Repository" in the menu toolbar. In the pop-up window, click Install, select the device description file of the C4374 (including the C4374 device and the IO module), and click Open.
Page 72
In the menu bar, select File - New Project, select the standard project in the pop-up window, set the project name and location, and click OK. 72 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 73
In the pop-up window, select C4374 as the device and click OK. At this point, the project was established. The first time install Codesys and create a project for compilation, which will find a lot of missing items, the solution is to open the library manager, click "Download Missing Libraries - Select All - Download", wait for the download to complete, and...
Page 74
The introduction of the Codesys software interface is shown in the figure below, and the function introduction is detailed in the "PLC Comprehensive Development Tool - CODESYS Basic Programming and Application Guide". After the project is created, right-click C4374 and select Add Device. 74 / 168 http:// www.odotautomation.com...
Page 75
Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding. 75 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 76
Select the "empty" slot, and insert the corresponding module according to the hardware configuration, and the functions of the module are listed in the selection table. Double-click the module and select I/O Mapping to view the corresponding I/O address, set the mapping relationship, and set the Always Update variable to Enable 1. 76 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
4.3 Download & Monitor Double-click Device (C4374), select Communication Settings, enter the IP address of the C4374 module (the IP address of the module can be viewed through the LCD display), and press Enter to activate the device. After the device is activated, compile, download, and run the program.
5 Example demonstration 5.1 Control demand Project Name: Part of the process of sewage treatment plant (sump to regulating tank); Project function: The external sewage is automatically replenished to the sump tank, and the water in the sump is sent to the regulating tank through the pumping pump for further sewage treatment.
Project Analysis: Combined with the actual situation of the C4374 module, it is demonstrated, and according to the selection table: the CT-121F module is selected to connect the DI signal (high level signal) of the collection tank and the pump, the CT-222F module outputs the DO signal of the collection tank and the pump, and the CT-3168 is connected to the analog signal of the collection tank;...
Page 81
After the project is created, right-click C4374 and select Add Device. Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding. Select an empty slot and insert the corresponding CT-121F, CT-222F, and CT-3168 modules based on the hardware configuration.
Page 82
Double-click the module and select I/O Mapping to view the corresponding I/O address, set the mapping relationship, and set the Always Update variable to Enable 1. Right-click on C4374, select Add Device, select EtherCAT - Master - EtherCAT Master, and click Add Device.
Page 83
Double-click Device (C4374), select Communication Settings, enter the IP address of the C4374 module (the IP address of the module can be viewed on the LCD screen), and press Enter to activate the device. Double-click EtherCAT Master, select General, and in EtherCAT NIC settings, click Browse, select the corresponding network adapter, and click OK.
Page 84
Right-click on the EtherCAT Master, click on the scan module, and the pop-up window will display "Scan device not available: stack unavailable!" Please log in first" Close the window, select the PLC Device, click "Compile", compile without error, click "Login to", click Yes, and then click "Start". 84 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 85
Right-click EtherCAT Master, click Scan Devices, it can view the IO modules mounted on CN-8033 and its back, and click Copy All Devices to the project. If the pop-up window shows that the device is not located in the device library, click Tools - Install Device Repository to install the device description file of CN-8033.
Page 86
Log out of the PLC and select I/O Module --Module I/O Mapping to modify the address mapping relationship and set the Always Update variable to enable 1. Considering the user's usage habits, FB blocks are often called in the process of program writing, and this time the analog input is used to build the block and the ST language is used to write.
Page 87
language, and click Add after the setting is complete. Next, the main program is written according to the control requirements. 87 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
5.4 Program download and monitoring Once the program is compiled, downloaded, and run, it can be monitored online. 88 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
6.1 Modbus TCP Client Topology diagram Hardware configuration: C4374+CT-121F+CT-222F+CT-3168+CT-4154+CT-5801; CN-8031+CT-121F+CT-222F+CT-3234+CT-4238; First, open the Codesys software and click New Project. Then select the C4374 device, if can't find the device, refer to the installation device 89 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 90
OK. After the project is created, right-click C4374 and select Add Device. Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding. 90 / 168 http:// www.odotautomation.com...
Page 91
Select the "empty" slot, and insert the corresponding module according to the hardware configuration, and the functions of the module are listed in the selection table. 91 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 92
Double-click the module and select I/O Mapping to view the corresponding I/O address, set the mapping relationship, and set the Always Update variable to Enable 1. Right-click on C4374, select Add Device, select Ethernet Adapter, and click Add Device. 92 / 168 http:// www.odotautomation.com...
Page 94
Double-click Device (C4374), select Communication Settings, enter the IP address of the C4374 module (the IP address of the module can be viewed through the LCD display), and press Enter to activate the device. Double-click Ethernet, select General, click "Browse" at the network interface, select the corresponding network adapter, and click OK.
Page 95
Double-click the Modbus TCP Master and select General to set the Modbus TCP response timeout period and socket timeout period, and it is recommended to select the automatic reconnection function. Double-click the Modbus TCP Slave and select General, the IP address of the slave CN-8031 module is 192.168.40.100, the response time and the port number.
Page 96
The parameters of the slave CN-8031 module can be viewed in IO Config software. Select CN-8031 and click the address table to view the address mapping of the I/O modules mounted. Double-click the Modbus TCP Slave, select the Modbus slave channel, click Add Channel, set parameters such as the channel access type and length, and click OK after the configuration is complete.
Page 97
Select Modbus TCP Slave IO Mapping to view the mapped address of the established channel on the C4374 device and set the Always Update variable to Enable 1. 97 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 98
After the parameters are configured, compile and download the program. After the configuration is downloaded, can monitor the status of the slave device online. 98 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
6.2 Modbus TCP Server Topology diagram Hardware configuration: C4374+CT-121F+CT-222F+CT-3168+CT-4154; First, open the Codesys software and click New Project. Then select the C4374 device, if can't find the device, refer to the installation device description file, and click OK. 100 / 168 http:// www.odotautomation.com...
Page 101
After the project is created, right-click C4374 and select Add Device. Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding. 101 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 102
Select the "empty" slot, and insert the corresponding module according to the hardware configuration, and the functions of the module are listed in the selection table. 102 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 103
Set the Always Update variable to enable 1 (or use the bus cycle task if not used in any task). Right-click on C4374, select Add Device, select Ethernet Adapter, and click Add Device. 103 / 168 http:// www.odotautomation.com...
Page 104
Slave Device”, and click Add Device. Double-click Device (C4374), select Communication Settings, enter the IP address of the C4374 module (the IP address of the module can be viewed through the LCD display), and press Enter to activate the device.
Page 105
Double-click Ethernet, select General, click "Browse" at the network interface, select the corresponding network adapter, and click OK. Next, the server is parameterized with a third-party client, which is simulated using the "Modbus Poll" software. 105 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 106
After the parameters are configured, select Modbus TCP Slave Device I/O Mapping to view the mapped address of the newly established slave device on the C4374 device, and set the Always Update variable to enable 1 (if not used in any task, use the bus periodic task).
Page 107
Next, open the client emulation software “Modbus Poll”, “Ctrl+N” create two Mbpoll windows, right-click in the blank space of the two windows to select “Read/Write Definition”, the Function of first window is selected“03 Read Holding Registers(4x)”, “Quantity” set to the length of the hold register set in Codesys; The Function of second window is selected “04 Read Input Register(3x)”,“Quantity”...
Page 108
After completion, go back to the Codesys software, download and log in to the C4374 device again, and the error will disappear after the TCP client is connected. Back to Modbus Poll software, click “Connection--Connect” or use the shortcut key F3 to connect, in the pop-up interface set the “Connection”...
Page 109
Go back to the Codesys software and see that all the devices are working fine. Set the prepared value in the Codesys software, select "Debug - Write Value", or use the shortcut key "Ctrl+F7" to write, and the value change can also be monitored in the Modbus Poll software;...
6.3 Modbus RTU Master Topology diagram Hardware configuration:C4374+CT-121F+CT-222F+CT-4154+CT-3168+CT- 3724+CT-5801; CN-8011+CT-121F+CT-222F+CT-3234+CT-3134; First, open the Codesys software and click New Project. 111 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 112
Then select the C4374 device, if can't find the device, refer to the installation device description file, and click OK. After the project is created, right-click C4374 and select Add Device. Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding.
Page 113
Select the "empty" slot, and insert the corresponding module according to the hardware configuration, and the functions of the module are listed in the selection table. 113 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 114
Double-click the module and select I/O Mapping to view the corresponding I/O address, set the mapping relationship, and set the Always Update variable to Enable 1. Right-click C4374, select Add Device, select "Modbus—Modbus Serial Port— Modbus COM", and click Add Device to close the "Add Device" window.
Page 115
Select Modbus Master COM Port, on the Add Device page, select Modbus Slave and click Add Device. It can use the IO Config software to view the communication configuration parameters of the CN-8011 module, select CN-8011, and click Configure Parameters. 115 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 116
Double-click Modbus COM, select General-Serial Port Configuration, set the baud rate to 9600, parity: None, data bit: 8, stop bit: 1. Double-click the Modbus Master COM Port, select General, set the transmission mode to RTU, set the response timeout and frame interval time, and select Auto Restart Communication.
Page 117
Double-click the Modbus Slave COM Port, select General, and set the Modbus slave address to 4 to modify the response timeout. It can use the IO Config software to view the address mapping relationship of the CN- 8011 module, select CN-8011, and click the address table. 117 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 118
Configure parameters based on the address mapping table. Select "Modbus Slave COM Port—Modbus Slave Channel—Add Channel", set the channel name, access type, length and other parameters, and click OK after the configuration is complete. After all channel parameters are configured, as shown in the following figure. 118 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 119
Select Modbus Slave COM Port—IO Mapping to view the mapping address of the newly established channel on the C4374 device, and set the Always Update variable to Enable 1. After the parameters are configured, first log in to the C4374 device. Then compile the downloader. 119 / 168 http:// www.odotautomation.com...
Page 120
Select “Modbus Slave COM Port—IO Mapping” to view the data of the CN-8011 module. 120 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
6.4 Modbus RTU Slave Topology diagram Hardware configuration: C4374+CT-121F+CT-222F+CT-3168+CT-4154 First, open the Codesys software and click New Project. Then select the C4374 device, if can't find the device, refer to the installation device 122 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 123
OK. After the project is created, right-click C4374 and select Add Device. Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding. 123 / 168 http:// www.odotautomation.com...
Page 124
Select the "empty" slot, and insert the corresponding module according to the hardware configuration, and the functions of the module are listed in the selection table. 124 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 125
Set the Always Update variable to enable 1 (or use the bus cycle task if not used in any task). Right-click C4374, select Add Device, select "Modbus—Modbus Serial Port— Modbus COM", and click Add Device to close the "Add Device" window.
Page 126
Select Modbus COM, in the Add Device window select “Modbus serial device— Modbus Serial Device”, click Add device. Next, the parameters of the slave and the third-party master are set up, which is simulated using the Modbus Poll software. Double-click Modbus COM, select Universal-Serial Port Configuration, set the baud rate to 9600, parity: None, data bit: 8, stop bit: 1.
Page 127
After the configuration is complete, click Modbus Serial Device I/O Mapping to view the mapped address of the newly established slave device on the C4374 and set the Always Update variable to Enable 1.
Page 128
Next, open the third-party master simulation software "Modbus Poll", “Ctrl+N” create two Mbpoll windows, right-click and in the blank space of the two windows select “Read/Write Definition”, the "Slave ID" of the first window is set to 1, select “Function” as “03 Read Holding Registers(4x)”, “Quantity” set to hold register length in Codesys;...
Page 129
After completion, return to the Codesys interface, download and log in to the C4374 device again, at this time, the bus is not running, and the error will disappear after connecting to the Modbus RTU master. Go back to the "Modbus Poll" software, press "F3" to connect, set the type of "Connection Setup"...
Page 130
Let's verify the communication, the first step, in “Modbus Serial Device I/O Mapping” double-click to modify the preparatory value of the input register 5134, “Ctrl+F7” to write. Back to the "Modbus Poll" software, it can see that the value of Mbpoll2 has been successfully modified.
Page 131
Back to the Codesys software, it was found that the value of the first WORD of the hold register was modified to 871, indicating that the communication was normal. 131 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
First, open Codesys, click New Project, set the project name and file location, and click OK. Then select the C4374 device, if can't find the device, refer to the installation device 132 / 168 http:// www.odotautomation.com...
Page 133
OK. After the project is created, right-click C4374 and select Add Device. Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding. 133 / 168 http:// www.odotautomation.com...
Page 134
Select the "empty" slot, and insert the corresponding module according to the hardware configuration, and the functions of the module are listed in the selection table. 134 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 135
Double-click the module and select I/O Mapping to view the corresponding I/O address, set the mapping relationship, and set the Always Update variable to Enable 1. Right-click on C4374, select Add Device, select EtherCAT - Master - EtherCAT Master, and click Add Device.
Page 136
Double-click Device (C4374), select Communication Settings, enter the IP address of the C4374 module (the IP address of the module can be viewed on the LCD screen), and press Enter to activate the device. Double-click EtherCAT Master, select General, and in EtherCAT NIC settings, click Browse, select the corresponding network adapter, and click OK.
Page 137
Right-click on the EtherCAT Master, click on the scan module, and the pop-up window will display "Scan device not available: stack unavailable!" Please log in first". Close the window, select the PLC Device, click "Compile", compile without error, click "Login to", click Yes, and then click "Start". 137 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 138
Right-click EtherCAT Master, click Scan Devices, it can view the IO modules mounted on CN-8033 and its back, and click Copy All Devices to the project. If the pop-up window shows that the device is not located in the device library, click Tools - Install Device Repository to install the device description file of CN-8033.
Page 139
The factory alias address of the CN-8033 module is 0, it can set the alias address through the module hardware dial code, or set it in the Codesys software, select the scanned CN-8033, write 2 in the alias address, click Assign Address, click Copy to Project.
Page 140
Select the module, click Module I/O mapping, it can monitor the module status online, select CT-222F, modify the value on the right side of the preparatory value, and click "Debug - Write Value" to write the value to CT-222F. 140 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
6.6 CANOpen master function Topology diagram Hardware configuration: C4374+CT-121F+CT-222F+CT-4238+CT-4154;CN- 8021+CT-121F+CT-222F+CT-3168+CT-4154; First, open Codesys, click New Project, set the project name and file location, and click OK. 141 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 142
Then select the C4374 device, if can't find the device, refer to the installation device description file, and click OK. After the project is created, right-click C4374 and select Add Device. Find "IO Modules" in the pop-up window, select it, click Add Device, and don't need to close this page after adding.
Page 143
Select the "empty" slot, and insert the corresponding module according to the hardware configuration, and the functions of the module are listed in the selection table. 143 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 144
Double-click the module and select I/O Mapping to view the corresponding I/O address and set the mapping relationship. Set the Always Update variable to enable 1 (or use the bus cycle task if not used in any task). 144 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 145
Right-click Device (C4374), select Add Device, select "Fieldbus-CANbus-CANbus", and click Add Device, and don't need to close the "Add Device" window. Select the CANbus, in the Add Device window select “CANopen—CANopen Manager—CANopen Manager”, click Add device. 145 / 168 http:// www.odotautomation.com...
Page 146
Select CANopen Manager, select Fieldbus - CANopen - Remote Device - CN-8021 CANopen Adapter in the Add Device window, and click Add Device. If do not find the CN-8021 module, click Tools - Device Repository - Install, select the configuration file of the CN-8021 module, and click Open to complete the installation of the configuration file.
Page 147
It can use the IO Config software to view the communication configuration parameters of the CN-8021 module. Double-click on CANbus, select "General", and set the baud rate to 500K. 147 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 148
Double-click the CN-8021 CANopen Adapter and select General to configure the node ID number of the module. Select PDO to view the PDO mapping of the module, including receiving PDO (master to slave): this part is the process data from PLC to network adapter, generally including "digital output"...
Page 149
configured, which can be added as needed, and can be configured redundantly, but the configuration cannot be missing (the length of the configured process data can be greater than the actual length of the hardware, and cannot be less than), please refer to the CN-8021 module communication example for the specific configuration method.
Page 150
illustrate the address correspondence in Codesys software. The CT-222F module index is 0x6200, and the sub-indexes are 0x01 and 0x02, which correspond to the address in the figure below in Codesys. The CT-4154 module index is 0x6411, and the sub-index is 0x01~0x04, which corresponds to the address in the following figure in Codesys.
Page 151
The CT-121F module index is 0x6000, and the sub-indexes are 0x01 and 0x02, which correspond to the address in the following figure in Codesys. 151 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 152
The CT-3168 module index is 0x6401, and the sub-index is 0x01~0x08, which corresponds to the address in the following figure in Codesys. 152 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 153
Double-click the CN-8021 CANopen Adapter and select CANopen Address Mapping Table to view the address mapping of the module and set Always Update variable to Enable 1. 153 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
Page 154
After the parameters are configured, download and log in to the device. 154 / 168 http:// www.odotautomation.com TEL: +86-0816-2538289...
7 Appendix 7.1 Modbus-RTU protocol introduction Only need to understand that Modbus has 8 important function codes corresponding to 4 areas: 4 for reading, 2 for writing a single bit or register, and 2 for writing multiple bits or multiple registers. (Address description uses PLC address) 7.1.1 Modbus storage area The storage area of the controller (or Modbus device) involved in Modbus is identified by 0XXXX, 1XXXX, 3XXXX, 4XXXX.
Page 157
Start Start Addre Function High Number Low Number Address Address Code of Coils of Coils High 0x11 0x01 0x00 0x13 0x00 0x25 xxxx Function: Read the 0XXXX status of the slave output coil. Note: The start address of the coil of some equipment is 00000, which corresponds to the address 00001 in the equipment, which is sequentially extended.
Page 158
Slave response format: functio Byte DI 10196- address 10204- 10212- n code count 10203 10211 10217 0x11 0x02 0x03 0xAC 0xDB 0x35 xxxx Function: Slave machine returns to input coil 1 XXXX state (3) Read output/holding register Function code:03H Master inquiry message format: High functio Register start...
Page 159
Register Register High functio start register address start address register n code address number high number 0x11 0x04 0x00 0x08 0x00 0x01 xxxx Function: Read the value of slave station input register 3XXXX. Note: In some devices, the register start address 30000 corresponds to the address 30001 in the device, and it is extended sequentially.
Page 160
sequentially extended. Disconnect mark=FF00,Set coil ON。 Disconnect mark=0000,Set coil OFF。 Example: The starting address is 0x00AC=172. Force the No. 17 slave coil 0172 to Response format: original text return Function: Force No. 17 slave coil 0172 ON to return the original text Coil function Coil address...
Page 161
Function code:0FH Master inquiry message format: coil coil func number number Coil Coil addr start start Byte tion of coils of coils state state address address count code high 20-27 28-29 high 0x11 0x00 0x13 0x00 0x0A 0x02 0xCD 0x00 xxxx Function: Force multiple continuous coils 0XXXX to ON/OFF state.
Page 162
This example: preset multiple holding register values of slave station 0x11, the starting address of the register is 0x0087=135, and the number of coils is 0x0002=2. Therefore, the function of this query message is: preset the values of 2 holding registers of the slave station of No.
7.2 Brief introduction of serial network topology 7.2.1 RS232 RS232 is one of the serial communication interfaces of industrial control, and it is widely used to connect computer serial interfaces and peripherals. RS232 uses a signal line and a signal return line to form a common ground transmission form. The three-wire connection method can realize full-duplex communication.
Receive data Receive data Data terminal is ready Signal ground Data ready Request to send Clear to send Ring alert Because the RS232 interface has the above-mentioned electrical characteristics, it could only realize point-to-point communication. The RS232 communication wiring diagram is shown in the figure: 7.2.3 RS422 The full name of RS422 interface standard is "Electrical Characteristics of Balanced Voltage Digital Interface Circuit", which defines the characteristics of the interface...
Page 165
The maximum transmission distance of RS-422 is 4000 feet (about 1219 meters), and the maximum transmission rate is 10Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate, and the maximum transmission distance is only possible when the rate is below 100kb/s. Only in a short distance can the highest transmission rate be obtained.
7.2.3 RS485 Since RS-485 is developed on the basis of RS-422, many electrical regulations of RS- 485 are similar to RS-422. For example, balanced transmission methods are adopted, and terminating resistors are required to be connected to the transmission line. RS-485 can adopt two-wire and four-wire methods, and the two-wire system can realize true multi-point two-way communication.
Page 167
connected by a "daisy chain" connection. Terminal resistors are required at both ends of the communication cable, and the resistance is required to be approximately equal to the characteristics of the transmission cable. impedance. In short-distance transmission, no terminating resistor is needed, that is, no terminating resistor is generally required below 300 meters.
Need help?
Do you have a question about the C4374 and is the answer not in the manual?
Questions and answers