10-2 Modbus TCP Master Function Details
The Modbus TCP Master Function can be used by executing Modbus TCP instructions in the user
program.
10-2-1
Modbus TCP Instruction Type
The Modbus TCP instruction type and function are as follows.
Instruction
ModbusTCPCmd
ModbusTCPRead
ModbusTCPWrite
For details on Modbus TCP instructions, refer to the NJ/NX-series Instructions Reference Manual (Cat.
No. W502).
10-2-2
Modbus TCP Instruction Function
This section describes Modbus TCP instruction functions.
Instruction
ModbusTCPCmd
ModbusTCPRead
ModbusTCPWrite
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User's Manual (W506)
Sends general commands to the Modbus TCP slave and receives responses.
Sends read commands to the Modbus TCP slave and receives responses.
Sends write commands to the Modbus TCP slave and receives responses.
The ModbusTCPCmd instruction sends Modbus commands of the specified proto-
col data unit (PDU) to the specified Modbus TCP slave and receives responses.
The ModbusTCPRead instruction sends read commands to the specified Modbus
TCP slave and receives responses. The following four Modbus commands can be
sent by the ModbusTCPRead instruction.
•
Output read
•
Input read
•
Retained register read
•
Input register read
The ModbusTCPWrite instruction sends write commands to the specified Modbus
TCP slave and receives responses. The following four Modbus commands can be
sent by the ModbusTCPWrite instruction.
•
One output write
•
One retained register write
•
Multiple output write
•
Multiple retained register write
10 Modbus TCP Master Function
Function
Function
10
10-3