format
6
Serial
communications
protocol
6.1
ANSI
communications
protocol
6.1.1
Introduction
Mentor MP supports an ANSIx3.28 type comms protocol as supported
Advanced parameter
descriptions
Serial
comms
by previous Control Techniques products with some modification to
allow access to 32 bit parameters. This chapter describes the
implementation of the protocol for Mentor MP.
character (Ctl D) is returned.
The checksum is derived by exclusive ORing the message byte together
significant digits required to represent the value of the parameter. The
maximum length is 12 digits including the sign and decimal point if
present. The data field always starts with a sign, minus sign for negative
numbers, or a plus sign for zero and positive numbers. The field may
contain a decimal point, but this will not be before all the numbers in the
field or after all the numbers in the field. The following examples
demonstrate some possible data fields.
1.
The maximum length is 12 characters.
2.
The field may contain leading spaces, but not after any other
character.
3.
A sign character is optional. No sign indicates positive.
4.
A decimal point is optional. This can appear at any point in the data
field, but not before the sign or before 10 numbers (i.e. the value
written should not have more than 9 decimal places). If the decimal
point is not in the same position as used by the parameter some
accuracy may be lost or extra decimal places added (i.e. if +1.2345
is written to a parameter with one decimal place the result is +1.2, if
+1.2 is written to a parameter with three decimal places the result is
+1.200). It should be noted that parameters can only have 0, 1, 2, 3,
4, 5, or 6 decimal places.
5.
The data field can contain up to 10 numbers, but the value even
ignoring decimal points must not exceed the range –2
31
to 2
31
-1.
If the parameter is written successfully an Acknowledge character (Ctl F)
is returned. If the parameter does not exist, the value written exceeds
the allowed parameter range or the data field rules are not obeyed an
Not acknowledge character (Ctl U) is returned.
The checksum is derived by exclusive ORing the message byte together
excluding the STX and the checksum, i.e. Checksum = M1 ^ M2 ^ P1^
P2 ^ D1 ^ D2 ^ ......
Dn ^ ETX. The checksum is an unsigned 8 bit value
and if the checksum is less than 32 then 32 is added to the calculated
checksum.
204
Mentor MP Advanced User Guide
www.onxcontrol.com
Issue Number: 4