Advantech ADAM-6050 18-Channel Isolated Digital I/O Modbus TCP Module ADAM-6050-BE Scheda Tecnica

Codici prodotto
ADAM-6050-BE
Pagina di 272
ADAM-6000 Series User Manual
224
B.1.2 Modbus Function Code Introductions
To full-fill the programming requirement, there is a series of function 
code standard for user’s reference…
Function Code 01
The function code 01 is used to read the discrete output’s ON/OFF status 
of ADAM-6000 modules in a binary data format.
Request message format for function code 01:
Example: Read coil number 1 to 8 (address number 00017 to 00024) from 
ADAM-6000 Modules
         01 01 00 17 00 08
Table B.1: Response Comment Structure
Code 
(Hex)
Name
Usage
01
Read Coil Status
Read Discrete Output Bit
02
Read Input Status
Read Discrete Input Bit
03
Read Holding Registers
Read 16-bit register. Used to read integer 
or floating point process data.
04
Read Input Registers
05
Force Single Coil
Write data to force coil ON/OFF
06
Preset Single Register
Write data in 16-bit integer format
08
Loopback Diagnosis
Diagnostic testing of the communication port
0F
Force Multiple Coils
Write multiple data to force coil ON/OFF
10
Preset Multiple Registers
Write multiple data in 16-bit integer format
Command Body
Station
Address
Function
 Code
Start 
Address
High Byte
Start Address
 Low Byte
Requested Number
of Coil High Byte
Requested Number
of Coil Low Byte