94 Mentor ll User Guide
www.controltechniques.com Issue Number: 12
The Drive will respond with an acknowledgement, either:
ACK if the message is understood and implemented,
or
NAK if the message is invalid, the data is too long, or the BCC is
incorrect.
If a value sent is outside the limits for a parameter, the Drive will respond
with NAK.
Reading data
The Drive will send any data to the host, provided that the request is
valid. The format of a data request message is:
Host request:
reset -
address -
parameter -
end
For example, to find the speed set point 01.17 of Drive number 12, send:
TheDriverepliesinthefollowingform:
start -
parameter -
5 characters of data -
end -
BCC
The reply first confirms that the data sent is the speed reference 1
(01.17); the five characters immediately following give the present
setting as a percentage of full speed. The first character is either + or -,
to indicate direction of rotation; the remainder is the numerical value.
The message reads, reverse at 47.6% of full speed in this example.
Repeat Enquiry
The negative acknowledgement NAK (Control-U) can be used at a
keyboard to cause the Drive to send data repeatedly for the same
parameter. It saves time when monitoring the value of a parameter over
a period of time.
Next Parameter
To obtain data from the same Drive for the next parameter in numerical
order, send the positive acknowledgement ACK (Control-F). The Drive
will respond by transmitting the data relating to the next parameter in
sequence.
Previous Parameter
To obtain data from the same Drive for the previous parameter in
numerical order, send backspace BS (Control-H).
Invalid Parameter Number
If the host sends a parameter number which the Drive does not
recognize, e.g. 1723, the Drive will respond with EOT.
Block checksum (BCC)
To ensure that data received can be verified, a block checksum is
attached to the end of each command or data response. The BCC is
automatically calculated by the sending logic and is derived in the
following manner.
First, a binary exclusive-OR is performed on all characters of the
message after the start-of-text command parameter.
Forexample,ifthemessagetobesenttoDrivenumber14is:
“set speed reference 1 to 47.6% of full speed in reverse”
It is sent as:
Each of the separate digits
0117 - 0476 and Control-C
is represented by a hexadecimal character and calculated in binary as
shown in the table. The XOR is shown progressively for each character.
The final XOR, underlined, is the BCC provided that its equivalent
decimal value exceeds 31.
As the ASCII characters from hex 00 to 1F are used only for control
codes,theBCChastoexceedthevalueof31decimal. Wheneverthe
XOR produces a (decimal equivalent) number less than 32, 32 is added.
Thus, in the previous XOR example,
010 1100 = 44 decimal, so that the BCC is the character 44
for which the ASCII character is =,
Thus the complete message to set the speed of Drive number 14, say, to
47.6% in reverse is as shown in the example message on the previous
page.
Using Mentor on a network with other CT Drives
Unlike some other Control Techniques products such as the Unidrive or
the MD29 card, the Mentor does not support the Group Addressing
feature. It is important therefore that when a Mentor is on the same
networkasDrivesthatdo support group addressing, the Drive address
defined in parameter 11.11 must not have a zero in it - in other words,
choose an address of 11 or greater, and exclude the numbers 20, 30, 40
etc. This will ensure that messages sent to the Mentor are not
accidentally recognised by other Drives as being group commands.
CONTROL ADDRESS PARAM CONTROL
EOT 11220117 ENQ
Control
-D
Control
-E
CONTROL PARAM DATA CONTROL BCC
STX 0117-0476 ETX
,
Control
-B
Control
-C
Reset EOT (Control-D)
Serialaddress 1144
Start of text STX (Control-B)
Not included in BCC calculation
BCC calculation starts here
Parameter 0117(Menuno.andparameterno.)
Reverse - (a minus sign)
476 0476
End of message ETX (Control-C)
finally, BCC, calculated as shown
Character ASCII Character XOR
menu 0 011 0000
1 011 0001 000 0001
parameter 1 011 0001 011 0000
7 011 0111 000 0111
- (minus) 010 1101 010 1010
0 011 0000 001 1010
4 011 0100 010 1110
7 011 0111 001 1001
6 011 0110 010 1111
ETX 000 0011 010
1100