Ethernet
network
read
and
write
commands
TCP_MBUS_MSG
Paramet
Type
Meaning
er
EN
TCP_MBUS_MSG enable bit
Read and write request bits, each new read and
First
BOOL
write request must be triggered by a pulse
Destination IP address, MODBUS over TCP
IP
STRING
fixed port 502
RW
BYTE
Operation command: 0--read, 1--write
Select the data type for reading and writing, 0000
to 0xxxx--switch output
DWOR
Addr
10000 to 1xxxx--switch input
D
30000 to 3xxxx--analog input
40000 to 4xxxx--holding registers
The number of communication data (number of
bits or words), the maximum amount of data that
Count
INT
can be read/written by each MBUS_MSG
instruction of the Modbus master is 120 words
Data pointer, if it is a read command, the data
read back is placed in this data area; if it is a
DataPtr
INT
write command, the data to be written is placed
in this data area
Done
BOOL
Done bit, read and write function done bit
Error code, only when the Done bit is 1, the
error code is valid, the error code is as
follows:
0 = no error
1 = response checksum error
2 = not used
3 = Receive timeout (no response from slave)
4=Request parameter error (slave address,
Modbus address, count, RW)
5=Modbus/Freeport not enabled
6=Modbus is busy with other requests
Error
BYTE
7=response error (response is not the
requested operation)
8=esponse CRC checksum error
101=Slave does not support the requested
function
102=Slave does not support data address
103=Slave does not support this data type
104=Slave device failure
105=Slave accepted the message, but the
response was delayed
106=Slave is busy and rejected the
message
42
Need help?
Do you have a question about the MAT-LC-C Series and is the answer not in the manual?