
—
Programing with CODESYS
—
CPSN-PCB271-S1-041 Reference Manual (Software)
—
102
—
6.
Create and build a program
This section describes how to create sample that performs 2-bit digital input / output from Modbus
Master.
In this program, the digital output data is copied from the Modbus variable to the I/O variable, and
the digital input data is copied from the I/O variable to the Modbus variable.
Create a Program
1
Double click the [PLC_PRG (PRG)] icon on the device window to open the “ST editor window”.
2
Write the following source code in “Program” under “ST editor window”.
DO0 := mDO0;
DO1 := mDO1;
mDI0 := DI0;
mDI1 := DI1;
3
Now, see whether you can execute [Rebuild”] in CODESYS [Build] menu to confirm the process
succeeds.
7.
Download and run program
1
Select [Online] - [Login] on CODESYS menu.
2
Click [Yes] in the download confirmation dialog.
3
Select [Debug] – [Start] and the program operation will start.
Summary of Contents for CONPROSYS nano CPSN-PCB271-S1-041
Page 21: ...21 CONPROSYS nano WEB Setting This section describes the product system and functions...
Page 49: ...49 CODESYS Installation This section describes the CODESYS installation procedure...
Page 118: ...Programing with CODESYS CPSN PCB271 S1 041 Reference Manual Software 118 5 END_CASE...
Page 122: ...Programing with CODESYS CPSN PCB271 S1 041 Reference Manual Software 122...
Page 133: ...133 Maintenance This section describes how to perform maintenance on the product...
Page 140: ...140 Appendix This section describes additional information of specification and the product...