Command Protocol Description
The drive command protocol is similar to others in the industry. It is a master - slave protocol where the host computer is the master and the servo drive is the slave.
The command format is shown below:
Start Address Function Data Checksum End
: a a f f f d ... d c c <cr>
Each letter represents a single ASCII character. In the address, function, data, and checksum fields, the characters should all be ASCII hex values, i.e., they
should be in the range "0" through "9" and "A" through "F" (upper case only).
All commands begin with a colon (3A hex), and terminate with a carriage return (0D hex).
Host Command Description
The Address field is made up of two characters. These characters supply the address of the drive that the command is intended for. (As an example, a host
addressing drive #2 would have "02") The address field allows drive addresses from "00" through "FE", or 255 individual drives.
The Function field specifies the function number that is being commanded. Function numbers can range from "000" through "7FF", or 2048 possible functions.
The Data field provides any data necessary for the drive to implement the command, and can have a variable number of characters. When strings are used in the
data field, the ASCII character is represented by two ASCII hex characters. (For example, the "#" character is represented by "23".) For some commands, the data
field is not used.
The Checksum field contains an ASCII hex version of the 8-bit checksum of the Address, Function, and Data fields. The sum of the Address, Function, Data, and
Checksum field should result in a value of zero. When computing the sum, the characters of the Address, Function, and Data fields are summed with the 8-bit value
represented by the characters of the checksum field.
Drive Response Description
If the drive receives the host's command with a communication error (parity or checksum errors, for example), the drive does not respond. The host should assume
a communication error occurred if a response from the drive does not occur within a time-out period.
If the drive receives the command without a communication error, the response is in the same format as the host command.
The Address field contains the drive address, so the host can verify the proper drive responded.
The Function field of the response is the same as the command, unless the drive is unable to execute the command, in which case it generates an exception
function code. (Examples of exception causes are invalid function number, illegal data, etc.). An exception function code is generated from the command function
code by setting the most significant bit of the function code field. (Equivalently, it is generated by adding 800 hex to the command function code.)
The Data field contains data requested from the drive, if any. If an exception occurred, the data field is made up of two characters, which identify the type of
exception.
The Checksum field is generated in the same manner as in the host command, with the sum of the Address, Function, Data, and Checksum field set equal to zero.
Copyright © 1994-1999 Reliance Motion Control, Inc.