3-6. input port query (20bh) – IAI America TTA User Manual
Page 20
-20/85-
4-3-6.
Input Port Query (20BH)
Function: Query input ports.
Data name
Data range (value)
Data size
[bytes]
Cumulative bytes
[bytes]
Endian Sign
extension
Unit
Description Remarks
Big Little Yes No
Command
Header '!'
1
1
Station 'XX(h)'
2
3
Message ID
'20B(h)'
3
6
Query start port
number
'XXXX(h)' 4
10
Be sure to specify “Category head port
number + Multiple of 8.”
Number of query
ports
'XXXX(h)' 4
14
The number of ports will be limited based on
the send/receive buffers.
SC 'XX(h)'
2
16
CR 0Dh
1
17
LF 0Ah
1
18
Normal response
Header '#'
1
1
Station 'XX(h)'
2
3
Message ID
'20B(h)'
3
6
Response start port
number
'XXXX(h)' 4
10
Number of response
ports
'XXXX(h)' 4
14
The number of ports will be limited based on
the send/receive buffers.
Input port data (*1)
'XX(h)'
2
16
8 bits from the head input port
Remaining input port
data
Data indicated by *1
for the number of
remaining data
MAX
16382
MAX
16398
Remaining input port data = 2 bytes x (Max
8192 – 1) = 16382 bytes
SC 'XX(h)'
2
MAX
16400
CR 0Dh
1
MAX
16401
LF 0Ah
1
MAX
16402
Error
respon
se
Error response
format
Refer to the error
response format.
10 10
(Note 1) Add H (or h) at the end of each data expressed in hexadecimal notation. If there is no H or h at the end, the data is considered a decimal.
(Note 2) Data enclosed in single quotation marks indicates an ASCII code. Data is a hexadecimal ASCII code if (h) is added before the closing quotation mark, or a decimal ASCII code if (d) is
added before the closing quotation mark.