- Create a "Standard project" and select CODESYS Control Win V3 as the device.
- Define the target system by means of the Network scan.
- Open the Library Manager and add the following libraries:
CAA Net Base Services
- Create a global variable named gvlSetting.
Adapt gvlSetting as follows:
Adapt the IP address and the port to your system.
Create a new POU named TcpServer and adapt it as follows:
Create a new POU named TcpClient and adapt it as follows:
Adapt the POU PLC_PRG as follows:
- Load the project to the controller and start it.