12 Sample project
12.1 Establishing communications with the PLC
XN-312-GW-EC gateway 07/20 MN050010-EN
Eaton.com
79
12 Sample project
The following sections list the various product-specific and manufacturer-
specific object dictionary entries. There is a detailed description of the
objects for each XN300 slice module, as well as the representation of the
objects in the XN-312-GW-EC gateway CoE.
This sample project uses four XN300 slice modules running on the EtherCAT
gateway. The goal is to show which XN300 slice module data is transferred,
how, and with which data type. The following XN300 slice modules are used
in the sample project:
•
XN-322-8DI-PD
•
XN-322-16DO-P05
•
XN-322-4AI-PTNI
•
XN-322-8AIO-U2
12.1 Establishing communications with the PLC
To establish communications with the PLC from the PC, follow the steps
below:
▶
Use an Ethernet cable to connect your PC's Ethernet port to one of the
Ethernet ports on the PLC (ETH0 on XC300, for example). The default
setting for the IP address for ETH0 on XC300 is 192.168.119.248.
▶
Make sure that both Ethernet ports (the one on the PC and the one on
the PLC) are in the same number range. With a subnet mask of
255.255.255.0 and the default setting for the PLC Ethernet address, the
PC's IP address should be 192.168.119.... .
▶
Open the XSOFT-CODESYS-3 project. You may want to use the project
you already created in section
Section “11.2.1 Starting XSOFT-COD-
ESYS-3 and creating a new project”, page 70.
▶
Double-click on the "XC303" PLC in the "Devices" dialog box.
▶
Open the "Device/Communication tab" and click on the "Scan network..."
button.
The "Select Device" dialog box will appear and the PLC will be shown.
If the dialog box stays blank, this means that there is no Ethernet connection.
▶
Select the PLC and confirm with "OK."