Examples:
MBA= ,2,2,12,array[]
Request the status of discrete inputs 2-13 (result is stored in array[])
MG@IN[1002]
Requests the status of input 2 (result is transmitted via serial port or
ethernet)
Packets:
The command MBA=,2,2,12,array[] results in the following packets being sent, when one RIO is the master,
and another RIO is the slave, communicating over handle A, port 502(Modbus). Assume digital inputs, in
descending order from 15-0 are: 0,1,1,1,0,0,1,1,0,0,1,1,0,1,1,1.
Request
Response
Field Name
(hex)
Field Name
(hex)
Function 02
Function
02
Starting Address High
00
Byte Count
02
Starting Address Low
02
Inputs Status 9-2
CD
Quantity of Inputs High
00
Inputs Status 13-10
0C
Quantity of Inputs Low
0C
1
st
Byte of Response Word
bit 7 6 5 4 3 2 1 0
Input
# 9 8 7 6 5 4 3 2
Value 1 1 0 0 1 1 0 1
2
nd
Byte of Response Word
bit 15 14 13 12 11 10 9 8
Input
# X X X X 13 12 11 10
Value 0 0 0 0 1 1 0 1
Note: bits in the response marked 'X' are not valid input response data, but are instead 0's that fill the
remainder of the byte. Inputs report back a 0 when active and a 1 when inactive
On the master RIO, array[0]=205 and array[1]=12 after the MBA= ,2,2,12,array[] command is issued
20 Chapter 3 Communication
RIO-47xxx
Содержание RIO-47**0
Страница 2: ......
Страница 93: ...RIO Dimensions RIO 471xx Units in centimeters RIO 47xxx Appendix 87...
Страница 94: ...RIO 472xx Units in millimeters 88 Appendix RIO 47xxx...
Страница 107: ...Internal 56 64 Zero Stack 53 RIO 47xxx Index 101...