CY545 Stepper System Controller
www.ControlChips.com
© 2002 Cybernetic Micro Systems
Chapter 4 - Command Summary
16
Command Formats
The CY545 supports several different command formats, which can be split into two major
categories,
ASCII
format and
Binary
format. Most examples in this manual will illustrate ASCII
formats, and we believe this will be the most popular mode of operation. The main advantage to
Binary format is a savings in the number of characters needed to represent a parameter value,
so Binary format commands will usually take fewer characters than ASCII format commands.
However, Binary format commands are more difficult for humans to read, and if the CY545 and
host computer become unsynchronized in Binary mode, due to a faulty data count, it is
extremely difficult to resynchronize the two without a hardware reset.
ASCII Command Format
ASCII format commands all start with the ASCII command letter that selects that command. If
the command also has parameters, the command letter must be followed by a space, then the
parameter value. Multiple parameters, such as those used by the Loop command, may be
separated by a space or comma. Our examples will generally use a comma. All ASCII
commands end with the ASCII carriage return character, shown as “<cr>” in the following
examples. Commands without parameters, such as the Go command, use only the command
letter, followed immediately by the carriage return. For example:
G<cr>
Go command, no parameter
I<cr>
Initialize command, no parameter
Commands with parameters may use two formats for the parameter values in the ASCII mode,
a decimal format, consisting of the digits 0 to 9, or a hex format, consisting of the digits 0 to 9,
letters A to F, and an “H” suffix. Hex parameters must start with a digit. For example:
R 135<cr>
Rate command, single decimal parameter
R 87H<cr>
Same parameter value, but in hex form
R ABH<cr>
Illegal parameter, no digit to start
R 0AB<cr>
Illegal parameter, no H suffix
R 0ABH<cr>
Parameter value ok
D 12345<cr>
16 bit parameter value in decimal
D 1A3BH<cr>
16 bit parameter value in hex
L 37,27<cr>
Loop command, multiple parameters
L 23H,27<cr>
Parameter formats may be mixed
Parameter values may be entered with any number of digits, but the command will limit the
value to a single byte if the range of the parameter is only one byte. For example:
R 0ABCH<cr>
Value is taken as 0BCH = 188
R 350<cr>
Value is taken as 94 = 350 - 256
Sixteen bit parameters are limited to 65535 (0FFFFH), and eight bit parameters are limited to
255 (0FFH), while the 24 bit parameters, used for position and step counts, are limited to
16777215 (0FFFFFFH). All arguments are unsigned integers.