Tcp c – IDEC MicroSmart Pentra User Manual

Page 90

Advertising
background image

9: M

ODBUS

TCP C

OMMUNICATION

9-2

W

EB

S

ERVER

CPU M

ODULE

U

SER

S

M

ANUAL

FC9Y-B1278

Modbus TCP Client Start and Stop
When request execution devices are designated in the Modbus TCP Client request table, internal relays as many as the
request quantity are allocated to execute Modbus TCP Client communication. The internal relays are allocated in the
order of requests. For example, when internal relay M0 is designated as the request execution device, M0 is allocated to
request No. 1, M1 to request No. 2, and so on. To execute a request, turn on the corresponding request execution device.
When communication is completed, the request execution device turns off automatically. When it is required to send
requests continuously, keep the corresponding request execution device on using a SET or OUT instruction.

When request execution devices are not designated, all requests programmed in the request table are executed
continuously.

Communication Completion and Communication Error
Modbus communication finishes when a read or write process is completed successfully or when a communication error
occurs. Communication error occurs when communication failure has repeated three times. When a communication
error occurs, the request is canceled and the next request is transmitted. When the error status data register is
designated, the communication status of each request can be confirmed.

Communication Error Data
When Error Status is configured in the Request Table from the Function Area Settings, the error data of each request can
be confirmed.

Modbus TCP Communication Request Table
A maximum of 255 requests can be configured in the Modbus TCP Client Request Table.

Notes:

• 10 bytes of the user program area are needed per each request.

• Request execution devices and error status data registers are allocated in the order of request numbers. When deleting a

request or changing the order of requests, the relationship of the request to the request execution devices and error status data
register is changed. If the internal relay or data register is used in the user program, the device addresses must be changed
accordingly.

Use a single DR for all

communication requests

Error data of each communication request

Unchecked

Error data, the remote host number (high-order byte) and error code (low-order byte), of each
request in the entire request table can be confirmed. Data registers as many as the quantity of
requests are reserved for storing error data. When an error occurs for a request, an error code is
stored to a corresponding data register.

Checked

A single data register is shared by all requests. When an error occurs for a request, an error code is
stored to the data register and the old value is overwritten.

Bit Allocation

Remote Host Number
(high-order byte)

1 to 255

Error Code
(low-order byte)

00h:Normal completion
01h:Function error
02h:Access destination error (address out of range, address+device quantity out of range)
03h:Device quantity error, 1-bit write data error
12h:Frame length error
14h:Slave number error
16h:Timeout error

Advertising