![Galil Motion Control RIO-47 series
RIO-47100 Скачать руководство пользователя страница 26](http://html1.mh-extra.com/html/galil-motion-control/rio-47-series-rio-47100/rio-47-series-rio-47100_user-manual_558776026.webp)
The RIO will respond to a request with function code $01 followed by a byte count (in hex), which
describes the number of bytes of digital outputs being returned. The byte count can be calculated as
follows:
Equation 3.1:
If the remainder of this equation is not 0, the byte count is instead calculated by:
Equation 3.2:
After the byte count, the RIO will respond with a coil status using the amount of bytes calculated
above with values ranging from $000000-$FFFFFF. Each bit representing the state of a digital output
(1 or 0). The LSB of the first coil status byte refers to the output addressed by the request packet.
Coil
Addresses
Coil
Addresses
Coil
Addresses
0
Digital Output 0
8
Digital Output 8
16
Digital Output 16
1
Digital Output 1
9
Digital Output 9
17
Digital Output 17
2
Digital Output 2
10
Digital Output 10
18
Digital Output 18
3
Digital Output 3
11
Digital Output 11
19
Digital Output 19
4
Digital Output 4
12
Digital Output 12
20
Digital Output 20
5
Digital Output 5
13
Digital Output 13
21
Digital Output 21
6
Digital Output 6
14
Digital Output 14
22
Digital Output 22
7
Digital Output 7
15
Digital Output 15
23
Digital Output 23
Table 3.3: Digital output coil map
Function Code 2 ($02) - Read Discrete Inputs
Modbus function code $02 is a request to read discrete inputs. This will read digital inputs from an
RIO configured as a slave.
The RIO will accepts the following range request:
Starting Address Range: $0000-$0017 (referencing digital inputs 0-15)
Quantity of Inputs Range: $0001-$0018
The RIO will respond to a request with function code $02 followed by the byte count (in hex), which
describes the number of bytes of digital inputs being returned as calculated by Equation 3.1 or
Equation 3.2 on pg 26.
After the byte count, the RIO will respond with a input status using the amount of counts calculated
by Equation 3.1 or Equation 3.2 with values ranging from $000000-$FFFFFF. Each bit representing the
state of a digital input (1 or 0). The LSB of the first input status byte refers to the input addressed by
the request packet.
Coil
Addresses
Coil
Addresses
Coil
Addresses
0
Digital Input 0
8
Digital Input 8
16
Digital Input 16
1
Digital Input 1
9
Digital Input 9
17
Digital Input 17
2
Digital Input 2
10
Digital Input 10
18
Digital Input 18
3
Digital Input 3
11
Digital Input 11
19
Digital Input 19
4
Digital Input 4
12
Digital Input 12
20
Digital Input 20
5
Digital Input 5
13
Digital Input 13
21
Digital Input 21
6
Digital Input 6
14
Digital Input 14
22
Digital Input 22
7
Digital Input 7
15
Digital Input 15
23
Digital Input 23
Table 3.4: Digital input coil map
Chapter 3 Communication ▫ 26 RIO-47xxx Rev. 1.0r
byte count
=
quanitity of outputs
8
byte count
=
quanitity of outputs
8
+
1