CY545
[Logo].........

Chapter 04
Command Summary


CY545 Command Summary

The following is a list of CY545 commands, including the command letter and argument structure. Arguments without a suffix should be single byte numeric values up to 255, while arguments with a "16" suffix may be two byte numbers up to 65535, and arguments with a "24" suffix may be three byte numbers up to 16777215. Commands are entered as the single upper case ASCII letter, followed by a space, and the argument value. Multiple arguments may be separated by a space or comma. The command ends with a carriage return character. Commands without arguments simply use the command letter, followed directly by the carriage return.

 Command             Function 
 A  Pos24              At position, sets current step position.
 B  Bit                Bit set or clear of user selectable bits.
 C                     Set Continuous step mode.
 D  Del16              Delay for specified milliseconds.
 E                     Enter following commands to external memory.
 F  Rate               Specify First or starting step rate.
 G                     Go step. Starts relative mode stepping.
 H  Bit                Seek Home, using specified bit.
 I                     Initialize controller, perform software reset.
 J  Addr               Jump to byte address of current memory page.
 L  Cnt,Addr           Loop to byte address for specific count
 N  Num24              Set Number of steps for relative motions.
 O  Mode               Set Operating mode of CY545.
 P  Pos24              Step to specified absolute Position.
 Q                     Quit entering commands to external memory.
 R  Rate               Specify slewing or maximum step Rate.
 S  Slope              Specify acceleration/deceleration Slope value.
 T  Bit,Addr           Loop to address Til bit matches value.
 U                     Reserved command.
 V                     Reserved command.
 W  Bit                Wait for specified bit to match value.
 X                     EXecute external memory commands.
 Y  Addr16             Set external memory address pointer.
 Z  Cnt16,Addr         ZillionLoop to byte address for 16-bit count.
 +                     Select CW direction for relative motions.
 -                     Select CCW direction for relative motions.
 /                     Negate prefix used with Bit commands.
 ?  Cmd                Query specified command parameter value.
 0                     Stop execution of commands from memory.
 [Addr,Cnt,D1,...,Dn   Special HP-display support command.
 "String"              Display all characters between quotes.

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:

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:

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:

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.

Binary Command Format

The Binary format still starts with the ASCII command letter for each command. However, the format for parameters is quite different in Binary mode. The command letter is always followed immediately by a binary data count, representing the number of data bytes needed by the command. For commands without parameters, such as as the Go command, the data count is a binary value zero (not the ASCII character “0"). For commands with parameters, the data count represents the number of bytes needed to specify the parameter(s). This byte count must match the expected size of the parameters. For example, the Number command must always have a data count of three, for its 24-bit parameter, even if the most significant byte values are zero.

The Quit command, which ends the entry of commands into external memory, should not be followed by any data count. This command is immediately followed by the ASCII letter of the next desired command. Also, the Stop command must use the binary value zero, not the ASCII character “0", followed by a data count which is also zero.

All multi-byte parameters must be entered least significant byte first. For example, the Zloop command has a 16-bit count, followed by an 8-bit address, so it has a data count of three, with the data byte sequence being the LSByte of the count, the MSByte of the count, then the branch address. More examples are shown below. The data bytes are shown as hex values, with a space separating each one for clarity, but they are issued to the CY545 as single 8 bit values, without the spaces.

The following sections describe each of the CY545 commands. The commands have been organized into groups of related functions.

00 Contents ..|.. 01 Intro ..|.. 02 Pins & Packages ..|.. 03 Cmd Interfaces ..|.. 04 Commands..|.. 05 Motor Cmds
06 Bit Cmds..|.. 07 Memory Cmds..|.. 08 Prog Branch Cmds..|.. 09 Mode Cmds ..|.. 10 Misc Cmds
11 Circuits ..|.. 12 External Memory ..|.. 13 Thumbwheel Switch ..|.. 14 Output Display ..|.. 15 Proto Boards
16 Timing & Control ..|.. 17 Rate Tables ..|.. 18 Electrical Specs ..|.. 19 Examples ..|.. 20 Up & Running
Back to CY545 Data Sheet

© 1988 - 1999 Cybernetic Micro Systems, Inc. All rights reserved.
CY545 Manual 22MAR99