Function Code 3 ($03)
Assume the status analog inputs on the Galil slave in descending order from 0-7 are as follows:
.4822, .9753, 1.4673, 1.9629, 2.4622, 2.9675, 3.4583, 3.9600
And that the command issued from the Galil Master is MBm=,3,2,4,array[]
The Modbus request and response packets would form as follows. Both responses for a slave
configured for MI 0 and MI 1 are shown:
Master Request
Slave Response
32-bit Floating Point (MI 0)
16-bit Integer (MI 1)
Field Name
Hex
Field Name
Hex
Volts
Field Name
Hex
Counts
Function
$03 Function
$03
Function
$03
Starting Address High
$00 Byte Count
$08
Byte Count
$08
Starting Address Low
$02 RegVal2 High
$3F
0.9753 RegVal2 High
$25
9600
Quantity of Registers High
$00
$79
RegVal2 Low
$80
Quantity of Registers Low
$04
$B0
RegVal3 High
$32
12904
RegVal2 Low
$00
RegVal3 Low
$68
RegVal3 High
$3F
1.4673 RegVal4 High
$3F
16160
$BB
RegVal4 Low
$20
$D0
RegVal5 High
$4C
19480
Reg Val3 Low
$00
RegVal6 Low
$18
With the slave MI 0 set, the Galil master's would have the following information stored in it's arrays:
array[0]=16249
array[1]=45056
array[2]=16315
array[3]=53248
With the slave MI 1 set, the Galil master's would have the following information stored in it's arrays:
array[0]=9600
array[1]=12904
array[2]=16160
array[3]=19480
Function Code 4 ($04)
Assume the status analog outputs on the Galil slave in descending order from 0-7 are as follows:
.5, 1, 1.5, 2, 2.5, 3, 3.5, 4
And that the command issued from the Galil Master is MBm=,4,2,4,array[]
The Modbus request and response packets would form as follows. Both responses for a slave
configured for MI 0 and MI 1 are shown:
Chapter 3 Communication ▫ 33 RIO-47xxx Rev 1.0r