Note
The hexadecimal codes are combined in the fields described above when multiple
options are active at the same time. For example an error response message from
instrument address 5 would have an ADDR code of C5
H
(80
H
+ 40
H
+ 05
H
).
18.2.2 Termination
Message termination is possible in two ways. For normal communications that do not involve checksums use
either a CR LF (ASCII 13, ASCII 10) as a terminator or a semicolon (‘;’ ASCII). There is no start-of-message
delimiter.
To use a checksum the message is framed as:
SOH <Message> CRC EOT
where:
SOH (1 byte): 01
H
CRC is a 4 character hexadecimal field comprising the 16 bit CRC checksum. The CRC uses the
16 bit CCITT polynomial calculation and includes only the contents of the “Message” section of the
transmission.
EOT (1 byte): 04
H
18.2.3 Error Handling
If a command cannot be processed and a reply was requested, the ERROR bit in the ADDR field is set and
the DATA field is set to an error message. This 2-byte error message is formed by adding a major and minor
error code. For example, the error 0204
H
corresponds to a major error of 0200
H
, and a minor error of 04
H
).
Error Code Error Description
0100
H
Parsing Error The error occurred when interpretting the incoming message.
0101
H
Address error An error occurred when parsing ADDR into a number.
0102
H
Command error An error occurred when parsing CMD into a number.
0103
H
Reg error An error occurred when parsing REG into a number.
0104
H
Chan error The internal channel string is longer than the maximum (9).
0105
H
Delimiter error The colon delimator is not present.
0106
H
Data error The data string is longer than the maximum (200)
0108
H
Framing error The message is too long for the buffer.
0200
H
CRC Error There was a problem with the checksum (CRC).
0201
H
CRC Parse Error The CRC code could not be parsed from the message.
0202
H
CRC Error The CRC code does not match that of the message. The message
was corrupted.
0300
H
Register Error REG is not valid, or does not exist on this device.
0400
H
Read Error There was an error reading from the register.
0401
H
Permission error You do not have permission to read this register.
0402
H
Unknown type error Internal error: Register type is not known to RinCmd.
0403
H
No type data error Internal error: Unable to read the registers data structure.
0404
H
Command error The CMD is not valid for this register type.
0405
H
Bad data error The stream data is not valid.
0406
H
Null register error The register cannot be found.
0407
H
Buffer size error The string reply will not fit in the transmission buffer.
0408
H
Snprintf error A function within the library has failed to run correctly.
74 C500-600-2.0.3