2 (0x02) read discrete inputs, 3 (0x03) read holding resgisters, Specification – Beijer Electronics NA-9379 User Manual
Page 11

NA-9379
Specification
Revision 1.02
FnBus PIO N/A
Page 11
3.1.2.
2 (0x02) Read Discrete Inputs
This function code is used to read from 1 to 2000 contiguous status of discrete inputs in a remote device. The Request
PDU specifies the starting address, i.e. the address of the first input specified, and the number of inputs. In the PDU
Discrete Inputs are addressed starting at zero. Therefore Discrete inputs numbered 1-16 are addressed as 0-15.
The discrete inputs in the response message are packed as one input per bit of the data field.
Status is indicated as 1= ON; 0= OFF.
•
Request
Field name
Example
Function Code
0x02
Starting Address Hi
0x00
Starting Address Lo
0x00
Quantity of Inputs Hi
0x00
Quantity of Inputs Lo
0x0A
•
Response
Field name
Example
Function Code
0x02
Byte Count
0x02
Input Status
0x80
Input Status
0x00
- In case of address 0x0015~0x0000 input bit value: 00000000_10000000.
3.1.3.
3 (0x03) Read Holding Resgisters
This function code is used to read the contents of a contiguous block of holding registers in a remote device. The
Request PDU specifies the starting register address and the number of registers.
The register data in the response message are packed as two bytes per register, with the binary contents right justified
within each byte. For each register, the first byte contains the high order bits and the second contains the low order bits.
•
Request
Field name
Example
Function Code
0x03
Starting Address Hi
0x08
Starting Address Lo
0x00
Quantity of Register Hi
0x00
Quantity of Register Lo
0x02
•
Response
Field name
Example
Function Code
0x03
Byte Count
0x04
Output Register#0 Hi
0x11
Output Register#0 Lo
0x22
Output Register#1 Hi
0x33
Output Register#1 Lo
0x44
- In case of address 0x0800, 0x0801 output register value: 0x1122, 0x3344.
PRELIMINARY