CODESYS compliant PLCs (controllers)
- Name: PLCHandler
- Version 1.0.0.0
- Protocol: Proprietary CODESYS
- Interface: TCP/IP
- Runtime: .NET 4.8 (Windows)
- Configuration:
- Devices / Protocols
On this Page:
Overview
Communication with CODESYS compliant PLCs (controllers)
The TwinCAT communication driver is supported only in Windows Solutions.
Channel Configuration
Protocol Options
There is no channel configuration required for CODESYS PLC Handler Client channels.
The PLC Handler connection works only in Windows runtime since the protocol does not support multi-platforms. If you are using a MultiPlatform TargetPlatform, you can set up the PLC Handler channel to run remotely on a Windows machine. This ensures stable communication with the PLC while keeping the system compatible across different environments.
Info
The PLC Handler protocol uses the PLC Handler API provided by CODESYS. This protocol and its API require the CoDeSys tags to be exposed inside the PLC using the SymbolConfiguration method instead of the SymbolSet method. The latter will not work with this specific instance of CoDeSys communication because SymbolSet exposure is only available via OPC UA. To communicate with a CoDeSys device using SymbolSet, use our OPC UA protocol.
Node Configuration
Primary Station
Stations syntax: <PLCAddress> ; <PLCPort> ; <ProtocolName>;<MotorolaByteOrder>;<GatewayAddress>;<GatewayPort>;<GatewayPassword>;
<GatewayDeviceProtocol>;<LogonName>;<LogonPassword>
Where :
<PLCAddress> = Logical address or node name of the PLC. CODESYS protocol address can be specified. But be careful, as these addresses are automatically generated, they may change if the network configuration of the communication partners changes. Therefore configuring the device name should be preferred.
<PLCPort> = Tcp/Ip port number. If not specified, the default value 11740 is used.
<ProtocolName> = Communication protocol to the PLC; the most important settings are:
- Tcp/Ip (Level 4): TCP/IP Level 4 Protocol
- Tcp/Ip (Level 2): TCP/IP Level 2 Protocol
- Tcp/Ip (Level 2 Route): TCP/IP Level 2 Route
- Serial (RS232): Serial connection
<MotorolaByteOrder> = Byte order of the PLC.
<GatewayAddress> = If 'Tcp/Ip' is used as Gateway protocol: IP-Address or Hostname of the Gateway. If 'NamedSharedMemory' is used as Gateway protocol: Name of the shared memory on which the Gateway listens. If not specified, then the default name for the shared memory is used and it behaves identical to the protocol 'SharedMemory'. 'NamedSharedMemory' is for special use only.
<GatewayPort> = If 'Tcp/Ip' is used as Gateway protocol: Port number of the Gateway. Typical values: 1210 / 1217. All other configurations: Not evaluated
<GatewayPassword> = If the Gateway, which is used for the connection, protected by a Gateway password, than this can be entered here, to allow the PLCHandler to use this Gateway.
<LogonName> = If the user management is activated on the PLC, then the user name for the PLCHandler login can be specified here.
<LogonPassword> = If the user management is activated on the PLC, then the password for the PLCHandler login can be specified here.
Example: MY_PC_Name;11740;;False;localhost;1217;;;;;
Points Configuration
Choose the PLC Item that will communicate with the Project Tag. You can type the PLC Item name into the TextBox, or you can browse the PLC Items in the Cell Editor.
Troubleshoot
The status of the driver execution can be observed through the platform built-in diagnostic tools. Refer to the Using Diagnostic Tools topic in Devices Communication page.
Troubleshooting tips
In this driver, it is very important to enable the TraceWindow messages, as invalid addresses can cause all the communication block with the PLC to fail, the TraceWindow tool will display the first invalid address found on the block when the Device is enabled on the settings.
In order to have a quick view on the many communication blocks, open the ModuleInformation, navigate on the tree to find ControlLogix and then select Read Groups. Looking at the number and success and fail communication counters, you can easily identify if there is a block with error and then use the TraceWindow to locate the wrong address.
Codesys Simulated PLC - Installation and Getting Started
There is a software that can be used to program real PLCs or simulated ones, called CODESYS Control Win V3.
For more information on how to install and configure it, please refer to the Codesys documentation.
Driver Revision History
Codesys PLC Handler Driver Revision History | |
---|---|
Version | Notes |
1.0.0.0 | Initial release on new documentation standards |
In this section...