What are the network features in CoDeSys and how are they used?

Start with the data you need and its timing requirements
Hello friends. Networking in CODESYS is used to read remote I/O, send commands to drives, exchange data between PLCs and provide information to higher-level systems. These connections have different timing, data-model and security requirements.
CODESYS support for a protocol does not mean it is available on every PLC. Check the target hardware interfaces, runtime components, drivers and licence scope together. The physical port, protocol support and the device’s communication role are separate matters.
Why an Ethernet connection is not enough
Ethernet is a shared infrastructure; devices using the same connector do not necessarily speak the same protocol. High link speed is not a guaranteed response deadline. Ordinary TCP/IP latency can vary with network load and operating-system behaviour. Do not treat Modbus TCP as deterministic real-time networking simply because it uses Ethernet.
Fieldbuses and device roles
Modbus RTU: Commonly used over RS-485. Device address, baud rate, parity and register mapping must agree. RS-485 is the physical interface; Modbus RTU is the communication method.
Modbus TCP: Exchanges register and bit data over TCP/IP. The client initiates requests; the server responds. Select the correct role in CODESYS and define the target address, starting register, data quantity and polling interval. A manufacturer’s 40001-style reference may differ from the software’s zero-based address.
CANopen and PROFIBUS: Require suitable physical interfaces and target support. Configure device addresses, communication speed, device descriptions and data mappings. An Ethernet port does not establish direct support for these fieldbuses.
EtherCAT: An Industrial Ethernet solution used for cyclic I/O and motion control. Assess MainDevice/master support, connected-device support, the network interface and runtime timing together. PROFINET uses Controller/Device roles; EtherNet/IP uses Scanner/Adapter roles. Check support for the required role, rather than relying on the protocol name alone.
Device descriptions, topology and connection settings differ between PROFINET, EtherCAT and EtherNet/IP. EtherNet/IP is not another spelling of ordinary TCP/IP. After adding devices, map their I/O data to application variables; network visibility alone does not prove the mapping is correct.
OPC UA: sharing PLC data with higher-level systems
OPC UA stands for Open Platform Communications Unified Architecture. Its information models describe types and relationships alongside values. It is useful for integration with SCADA, HMI and data collection systems. CODESYS solutions provide server and client options; their scope depends on the target and licence.
For a server, configure exposed variables, read/write permissions and certificate trust. On the client, select the server address, authentication and required data. Check data types, update intervals and quality information. Do not directly substitute a conventional OPC UA client/server connection for a servo cycle network. Other models, such as PubSub, require separate assessment.
Network variables between PLCs
Network Variable Lists (NVLs) provide data exchange between PLCs on supporting targets. The common CODESYS NVL method uses UDP. Sender and receiver must have identical declarations and data layouts, with compatible list identifiers, ports and transmission settings. Creating the receiver list from the sender or its exported list reduces mismatch risks.
UDP packets can be lost. The receiver’s last stored value may be stale. An unchanged value is not proof of a healthy connection. Monitor data age, an incrementing sequence counter or a heartbeat. For commands lasting one cycle, design the acknowledgement mechanism the application requires; assess the task cycle separately from the network transmission cycle.
WebVisu and remote maintenance
WebVisu displays an operator interface from a supporting runtime in a web browser. The PLC control program does not execute in the browser. Check the WebVisu component, web server, access address and licence; configure HTTPS and user permissions.
Engineering access for downloads and diagnostics uses CODESYS Gateway and a target connection. This service is different from a network default gateway/router that routes packets between IP networks. Combine CODESYS security settings, authenticated access and network segmentation for remote maintenance. Use a controlled maintenance connection instead of exposing the PLC directly to the internet.
How to configure the network
Select the correct target device in the project and add the required communication component and device description. Set the device’s IP address and subnet mask according to the network plan. For example, a local test network using mask 255.255.255.0 could have PC 192.168.10.20 and PLC 192.168.10.10; first confirm these addresses are unused.
Next define the role, device addresses, data mapping, cycle time and timeouts. Specify how the PLC application handles connection errors and stale data. Placing several PLCs in one project does not automatically synchronise their program execution.
During commissioning and debugging, check the physical link, then addresses and protocol status. Compare raw data with the expected value. Also test cable disconnection, device restart and reconnection; prevent the application from trusting the last valid value indefinitely.
Editor’s note: A ping response does not prove the protocol is working. Reaching a PLC by ping does not validate Modbus register addresses, OPC UA permissions or PROFINET I/O mapping. Assess communication by whether the application receives the required data in the correct format and within the required time.
Related networking and CODESYS topics
What CODESYS is used for | Key features | Training resources
Ethernet questions | EtherCAT topology | What is a PLC? | PLCs and accessories
Sources
CODESYS — Fieldbus & Communication — Protocol stacks, configurators and diagnostics.
CODESYS — Industrial Ethernet — EtherCAT, PROFINET and EtherNet/IP support.
CODESYS — Network Variables — NVL structure, UDP and stale-data risks.
CODESYS — WebVisu — Browser-based visualisation and HTTPS.
Modbus Organization — Specifications — Modbus TCP, serial Modbus and Modbus Security.
OPC Foundation — OPC UA — Interoperability, information modelling and security.
NIST SP 800-82 Rev. 3 — OT Security — Security and operational requirements for industrial networks.