— 3 —
15. Shutdown ......................................................................................................................................................... 44
16. Logout ............................................................................................................................................................... 45
CODESYS Installation ...................................................... 46
1. Installation of the CODESYS ............................................................................................................................ 47
2. Installation of the Package ............................................................................................................................... 49
3. PC and CONPROSYS nano cable connection ........................................................................................... 50
Basic Programming ......................................................... 52
1. Nomenclature of CODESYS Components .................................................................................................. 53
1. Device window, Device Configuration window ................................................................................. 53
2. ST Editor window .......................................................................................................................................... 53
2. Format and programming of ST language ................................................................................................ 54
3. Basic programming procedure ...................................................................................................................... 56
1. Create a New Project ................................................................................................................................... 56
2. Connect controller from CODESYS ........................................................................................................ 57
3. Add I/O modules ........................................................................................................................................... 58
4. I/O Variable Definition ................................................................................................................................ 59
5. Create a program and build ..................................................................................................................... 60
6. Download and run program ..................................................................................................................... 61
7. Save the PLC program into ROM ............................................................................................................ 62
8. Delete the PLC program saved in ROM ............................................................................................... 64
9. If an error occurs under the CODESYS development environment .......................................... 65
4. Interface definition per model ........................................................................................................................ 66
1. Parameter ......................................................................................................................................................... 66
2. I/O Mapping .................................................................................................................................................... 66
3. Serial Port ......................................................................................................................................................... 68
Programing with CODESYS ............................................ 69
1. Serial Communication ........................................................................................................................................ 70
1. Device setting ................................................................................................................................................. 70
2. Create a Project.............................................................................................................................................. 70
3. Serial Communication Library setting ................................................................................................... 70
4. Create a transmission program ............................................................................................................... 71
5. Create a reception program ..................................................................................................................... 73
2. Modbus Master .................................................................................................................................................... 77
1. Device setting ................................................................................................................................................. 77
2. Create a Project.............................................................................................................................................. 77
3. Add Modbus Devices (When using Modbus TCP) ........................................................................... 78
4. Add Modbus Devices (When using Modbus RTU) .......................................................................... 81
5. Create a Project.............................................................................................................................................. 84
6. Create and build a program ..................................................................................................................... 86
7. Download and run program ..................................................................................................................... 87
3. Modbus Slave ........................................................................................................................................................ 88
1. Device setting ................................................................................................................................................. 88