MMG
TQI-021/1
17
4. Structure of the command sent to the device
Address:
Determines to which device the command is sent by the computer. The device interprets
the command only if the value of item 051:Adr is equal to this byte. If the value of this
byte is = 00H, the device executes the command independently of the value of 051:Adr.
Type of message
56H -
"V"
asking software version of the device. No info byte.
44H -
"D"
reading definition of item.
Info byte = serial number of item.
52H -
"R"
reading the value of an item.
Info byte = serial number of the item.
57H -
"W"
data value modification.
1. Info byte = serial number of the item.
Further info bytes depending on type:
- bits: the bits in
1 byte
.
- byte:
1 byte
integer number
- selector:
1 byte
, the serial number of the selection
- character string:
10 byte
, the first byte is the code of
the first character.
- floating point:
4 byte
, IEEE single precision
(PASCAL single type) number, first is the LOW
byte of the mantissa
49H -
"I"
restart of the device as it would be switched off and on.
Info bytes:
Cold
character string means cold start at the same
time.
Adr=1
character string means that at the time of
initialization the value of item 051:Adr
becomes
01
.
5. Structure of the answer message given by the device
Device address:
Always matching with value of item
Adr.
Message type:
ERROR ( 00..1FH ):
0 = errorless state
In this case the
ERROR
byte is followed by info bytes depending on the received
command. Their description can be read at the answering message starting with
STATUS
byte.
1 = undefined command
Info byte = received command code
2 = command refers to unused item
Info byte = item number
3 = value of the item cannot be modified
Info byte = item number
4 = length of the message is illegal
Info byte = received length byte
5 = must wait to access item
Info byte = item number
6 = item is not accessible