Mentor ll User Guide 93
Issue Number: 12 www.controltechniques.com
Control characters in Mentor II Drives
Serial Address
Each Drive is given an identity or address (parameter 11.11) so that only
the Drive that is concerned will respond. For security, the format is that
each digit of the two-digit Drive address is repeated, thus the address of
Drive number 23 is sent as four characters:
2233
The serial address follows immediately after the first control character of
the message.
Parameter Identification
For transmission by serial link (interface), parameters are identified by
the four digits representing the menu and the parameter number, but
without the decimal point, which is used in the text of this Guide for
clarity.Forexample,tosendmenu04,parameter26, write0426.
Data Field
Data to be sent or requested occupies the next five characters after the
parameter number. All of the operating parameters of the Drive are
numerical values, such as load, current, etc. The field for data is
variable in length up to five characters maximum (but see reference to
increased resolution on the previous page).No decimal point is used.
The state of bit-parameters is transmitted and received as real-value
data, of value 0 or 1. Again, the format is flexible so long as no more
than five characters are comprised, for example:
1
01
-andsoon.
Block Checksum (BCC)
To permit the Drive and the host to ensure that messages from one to
the other have not become corrupted in transmission, all commands and
data responses must be terminated by a block checksum character
(BCC,nextsection).
Structure of messages
Host to Drive
Messages from the host to the Drive are of two kinds:
a request for information,
or a command.
Both kinds must start with the control character EOT (Control-D) to
initiate the Drive to receive a new message. This is followed by the
serial address of the Drive receiving the message. The format of the
data and the choice of control character to terminate the message is
different for the two kinds.
For an information request, sending the parameter number followed by
ENQ instructs the particular Drive addressed to supply data relating to
that parameter.
For a command, a control character after the serial address tells the
Drive that the message is to be an instruction concerning its operational
parameters, and that the next part of the message will be a parameter
number and the instruction data. The instruction data occupies five to
nine characters, or ten for high resolution. An instruction message is
terminated by control character ETX followed by a block checksum
(BCC, next section).
Drive to Host
Messages from the Drive to the host are of two kinds:
a reply to a data request,
or acknowledgement of a message.
In reply to a data request, the start control character is STX, and is
followed by the parameter number to confirm the request from the host,
and then the five characters of data. The message is terminated by the
control character ETX and a block checksum (BCC).
Amessageisacknowledged by the control character ACK if
understood, or NAK if invalid, wrongly formatted or corrupt.
Multiple Drives
A message can be sent to two or more addresses simultaneously. If all
Drives are to respond to the same request or instruction, the message is
transmittedtoaddress0(zero).
Wide Integers - Serial Mode 4
Resolution
Some parameters can be set to a higher resolution than that displayed
or read by the serial interface. These are the real parameters with a
range of 65535.
If the user wishes to set variable to a higher resolution, six digits must be
written in the data field. Mentor II then recognizes the request for higher
resolution. For example, to set the speed demand to 47.65% of
maximum speed, transmit:
+04765
The wide integer (16-bit) parameters are 13.14, 15.60, 15.61, 15.62 and
15.63. If a wide integer is sent through the comms link (interface), the
data is formatted as five ASCII characters, without a “sign” in the data
field. All parameters can be written via the serial interface by means of
five ASCII characters if no sign is included. Refer to parameter 11.13,
Chapter 6 or 7, for further information.
Sending Data
Host command:
reset -
address -
startoftext -
menu and parameter -
1to5datacharacters -
end -
BCC
For example, the message to the Drive:
“change speed reference 1 of Drive number 14 to 47.6% in reverse”
would be sent as:
Character Meaning ASCII
code HEX
Keyedas
Control..
EOT Reset, or “Now hear this”, or
End of Transmission
04 D
ENQ Enquiry, interrogating the Drive 05 E
STX Start of text 02 B
ETX End of text 03 C
ACK Acknowledge (message
accepted)
06 F
BS Backspace (go to previous
parameter)
08 H
NAK Negative acknowledge
(message not understood)
15 U
CONTROL ADDRESS CONTROL PARAM DATA CONTROL BCC
EOT 1144 STX 0117-0476 ETX
,
Control
-D
Control
-B
Control
-C