12 Sample project
12.5 Going online and loading the program onto the PLC
84
XN-312-GW-EC gateway
07/20 MN050010-EN Eaton.com
12.5 Going online and loading the program onto the PLC
In order to be able to load a program onto the PLC and display and monitor
the states of a running program, the programming system must go online
with the PLC.
Before that, we will be creating a small sample program for our sample proj-
ect. The program will set the outputs on the XN-322-16DO-P05 and read the
inputs on the XN-322-4AI-PTNI.
The following screenshot shows one possible small sample program:
Figure 53:
Sample program in XSOFT-CODESYS-3
Follow the steps below with the loaded project and the sample program
above (or another one of your choice):
▶
Click on the "Create" / "Compile" menu option.
A binary file that can be run by the PLC will be generated using the
source code.
▶
Click on the "Online" / "Log in" menu option.
The following dialog appears.:
▶
Select the "Log in with download" option.
The "Update boot application" option will be enabled automatically. Leave
it enabled.
▶
Confirm by clicking on OK.
▶
Start the program by pressing function key [F5] or by clicking on the
icon in the toolbar.
→
Please note that data can only be shown and monitored in
XSOFT-CODESYS-3 if used in a program that is found on the
PLC.