Command Format; Communication Protocol; Error Handling - Deprag ME 5600 Operating Instruction Booklet

Electronic torquemeter
Table of Contents

Advertisement

13.4 Command Format

All commands consist of two bytes. The first byte is always 40H (the @-character), The
second byte is an integer in the range [01H – 7fH].
Some commands have additianal parameters that are separated by spaces (ASCII-sign
20H). The parameters have one of the following formats:
Byte
A single byte with numeric values in the range [0 - ffH]
Integer
An ASCII coded integer (numbers 0 – 9, ASCII 30H – 39H).
e. g. 200 will be transferred as:
32H 30H 30H
Float
An ASCII coded floating point number. The decimal separator is a dot(ASCII
2eH)
e. G. 3.14 will be transferred as:
33H 2eH 31H 34H
Table 7:

Command Format

All commands or responses have to be terminated by 80H.

13.5 Communication Protocol

The commands are sent with all parameters as a string to the serial port. The commands
will be acknowledged by sending them back without parameters immediately, i. e. before
executing them.
Commands that are not applicable in the current state of the device will be ignored.
Likewise all transmissions that are not well-formed will be ignored without any response.

13.6 Error Handling

Transmissions from the serial port, that are not in the format specified above, will be ig-
nored.
If the format is correct, but the command is unknown or the parametes are invalid, an ap-
propriate error message will be returned.
The error message has the same format as the commands, with feH as command code.
Its parmeter is an error code describing the error. The error codes are listed in the follow-
ing table.
Error Message
@ feH 20H 01H 80H
@ feH 20H 02H 80H
@ feH 20H 03H 80H
Table 8:

Error Handling

Description
unknown command
invalid or missing parameter
command or parameter not valid in the current context (e.
g. setting or reading calibration values while the current
transducer type is HEADER)
39

Advertisement

Table of Contents
loading

Table of Contents