Tcp c – IDEC MicroSmart Pentra User Manual

Page 92

Advertising
background image

9: M

ODBUS

TCP C

OMMUNICATION

9-4

W

EB

S

ERVER

CPU M

ODULE

U

SER

S

M

ANUAL

FC9Y-B1278

4.

Configure the requests of the Modbus TCP Client.

A maximum of 255 requests can be entered in one request table. Specify the Modbus TCP servers with the remote host
numbers. After all requests are configured, click OK button to close the dialog box.

Choose to use Request Execution Devices and Error Status data registers. When using Request Execution Devices and
Error Status data registers, enter the first number of the devices.

5.

Download the user program to the CPU module.

Now, programming for the Modbus TCP client is complete. Details about parameters and valid values are as follows.

Function Code
The MicroSmart accepts eight function codes as listed in the table below:

Function Code

Data Size

Slave Address

MicroSmart as Modbus Slave

01 Read Coil Status

1 to 128 bits

000001 - 065535

Reads bit device statuses of Q (output), R (shift
register), or M (internal relay).

02 Read Input Status

1 to 128 bits

100001 - 165535

Reads bit device statuses of I (input), T (timer contact),
or C (counter contact).

03 Read Holding
Registers

1 to 64 words

400001 - 465535

Reads word device data of D (data register), T (timer
preset value), or C (counter preset value).

04 Read Input Registers

1 to 64 words

300001 - 365535

Reads word device data of T (timer current value) or C
(counter current value).

05 Force Single Coil

1 bit

000001 - 065535

Changes a bit device status of Q (output), R (shift
register), or M (internal relay).

06 Preset Single
Register

1 word

400001 - 465535

Changes word device data of D (data register).

15 Force Multiple oils

1 to 128 bits

000001 - 065535

Changes multiple bit device statuses of Q (output), R
(shift register), or M (internal relay).

16 Preset Multiple
Registers

1 to 64 words

400001 - 465535

Changes multiple word device data of D (data register).

Advertising