11. Connection to other devices11.4 Modbus TCP11.4.2 Programming communication with Modbus TCPIn order to program these communications, you will need at least one system that ful-fills the functionality of a Modbus TCP client and that is able to send commands to thelower-level server.Since the easyE4 control relays can work with various Modbus TCP clients available onthe market, only standard-compliant Modbus TCP functions are supported.In other words, functions that are defined in a standardized manner in the Modbusstandard and are accordingly implemented at the protocol level in a standardized man-ner by all Modbus TCP stations. For more information, please refer to the MODBUSMESSAGING ON TCP/IP IMPLEMENTATION GUIDE V1.0b published by the ModbusOrganization.Connection:In order for the Modbus TCP server to work, the following ports must be opened:l Modbus TCP: Service—Port 502Port 502 is normally set by default. If it is not, make sure to set it when establishing aconnection.Ports that may need to be opened depending on the functionality being used:l DNS: UDP/TCP port 53 (only if using DNS)l DHCP: UDP port 67 for server / UDP Port 68 for clients (only if using DHCP)The Modbus TCP server implementation on the easyE4 will provide the following stand-ard functions:Function description FunctionCodeRead Coils Used to read outputs 0x01Read Discrete Inputs Used to read inputs 0x02Read Holding Registers Used to read output registers 0x03Read Input Registers Used to read input registers 0x04Write Single Registers Used to write to a register 0x06Write Multiple Registers Used to write to multiple registers 0x10There are two basic protocol data units (PDUs) for each of the function descriptionsabove:1. Request PDU (the Modbus TCP server must receive this PDU)a. Byte 0 contains the function code, which is used to identify the function thatis desiredb. The remaining bytes are function-specific2. Response PDU (the Modbus TCP server must send this PDU)546 easyE4 11/18 MN050009 EN www.eaton.com