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