Automove Control Language (ACL) Version 3.
NOTICE All information contained in or disclosed by this document is considered proprietary by Asymtek. By accepting this material the recipient agrees that this material and the information contained therein are held in confidence and in trust and will not be used, reproduced in whole or in part, nor its contents revealed to others, except to meet the purpose for which it was delivered.
TABLE OF CONTENTS 1 INTRODUCTION ................................................................... 1-1 ACL and This Manual ................................................................. 1-1 Manual Conventions ................................................................... 1-1 Input Buffer ................................................................................. 1-2 Numeric Coordinate Systems .....................................................
Character Format.........................................................................5-1 Outputs to the Host......................................................................5-2 Exceptional Conditions ................................................................5-3 The Input Buffer and Handshakes ...............................................5-3 Escape Sequences......................................................................5-4 Hardwired DTR Handshake.......................................
Limitations................................................................................... 9-4 10 USING ACL VARIABLES .................................................... 10-1 What Are Variables? ................................................................... 10-1 How To Set Variables ................................................................. 10-1 How To Test Variables................................................................ 10-2 Indirection And Indexing ..............................
Table of Tables Table 1 - X-Y Commands .................................................................................................2-1 Table 2 - Third Axis Commands .......................................................................................2-2 Table 3 - Flow of Execution Commands...........................................................................2-2 Table 4 - ACL Variables Commands ................................................................................
1 Introduction ACL and This Manual The Automove Control Language (ACL) is a simple language for controlling Asymtek Automove Series of X-Y tables and motor controllers. A host computer is connected to the Automove hardware via an RS-232C cable. The host sends ACL commands, in ASCII (American Standard Code for Information Interchange), to the Automove hardware. Each command causes the Automove System to perform some simple action such as moving the carriage or actuating the Digital Outputs.
Input Buffer As they are received, ACL commands are put into a 256-byte input buffer. After the machine finishes processing one command, it fetches the next from the buffer. In order to prevent the host from sending characters too fast and thus overflowing the buffer, one of four input buffer handshakes must be implemented within the host. These are: Hardwired DTR, Xon/Xoff, Enq/Ack, and Software Checking. The host sets up the desired handshake by sending escape sequences to the Automove System.
Microstep Size, Resolution, and Maximum Travel The Automove X-Y tables are shipped with 1.8-degree stepping motors. This means that the motors have 200 full steps per revolution. (There are 50 physical poles on the rotor; four full steps cause a pole to rotate to the position formerly occupied by its neighbor.) By default the Automove System divides each full step into eight microsteps, giving 1600 microsteps per revolution. Each microstep on an Automove table produces nominally 0.
Command Syntax Each ACL command begins with a two-letter mnemonic; for example, MA for "Move Absolute". The mnemonic may be either upper case or lower case letters. In some commands the second character of the mnemonic is one of the following: < > = + - * / & ! | Depending on the command, the mnemonic may be followed by one or more numeric parameters The parameters must be separated from each other by at least one comma, space, or sign ("+" or "-") character.
Any ACL error causes the System to ignore all characters until the next semicolon ";" or letter "A" through "Z". Parameter Types Some commands, for example ES and OU, have string parameters. The syntax of string parameters is described with those commands in Chapter 3. Numeric parameters fall into two categories: fractional and whole numbers. Fractional parameters typically can be in the range -32768.0000 through +32767.9999.
Personality Parameters Many hidden aspects of the Automove System's personality can be changed via the PE ("Personality") command. The personality parameters are stored in the built in non-volatile memory and so are "remembered" even when you turn the power off. You can change such things as: arrow button speed and direction; Find Home speed; power-up values of calibration factors, resolution, travel limits, acceleration, and step rate; direction of motor rotation.
2 Summary of ACL Commands Table 1 - X-Y Commands Command Description Page No.
Table 2 - Third Axis Commands Command Description Page No. AZ Absolute Z Move 3-7 CZ Configure Z Axis 3-24 FZ Find Z Home Switch 3-31 MZ Move Z (relative) 3-46 OZ Output Z Position 3-54 PZ Set Power Level of Z Motor 3-58 SZ Set Z Position Counter 3-64 Table 3 - Flow of Execution Commands Command 2-2 Description Page No.
Table 4 - ACL Variables Commands Command Description Page No.
Table 6 - Digital Inputs Command Description Page No. MN Mid-move Digital Inputs Response 3-42 ON Output Digital Inputs State 3-49 WN Wait For Digital Inputs 3-74 Table 7 - Configuration and Miscellaneous Commands Command 2-4 Description Page No.
3 Detailed Descriptions of ACL Commands In the following descriptions, square brackets ("[" and "]") enclose optional parameters (i.e. those which may be omitted so as to receive default values). Angle brackets ("<" and ">") enclose the name of each parameter. The notation ESC.X stands for an escape sequence. The command parameters are shown separated by spaces.
AA , , Arc Absolute The Automove System moves the carriage in a smooth circular arc. The center of the arc is specified by and , in absolute Calibrated Units as affected by the SO, CF, and CR commands. The range of and is -32768.0000 through 32767.
Skipping occurs if either: the specified slew speed exceeds approximately 2200 microsteps per second; or the circumference of the arc (i.e. the actual distance traveled) exceeds 65535 microsteps. Note that other internal errors may cause small endpoint discrepancies even though none of the above conditions is exceeded and thus no microsteps are skipped. The actual final carriage position as given by the OA command may differ from the "ideal" position by several microsteps.
Antibacklash vectors are temporarily disabled during Continuous Path motion; see the BC command. AC [] Acceleration The value becomes the acceleration (in thousands of microsteps per second per second) used for subsequent AA, AR, MA, MR, and MT commands, as well as Continuous Path motion, the GO TO ORIGIN vector, and the FH backoff vectors. Usable values are in the range 10 through 65530. If a microstep is 0.001 inch, these correspond to accelerations in the range 0.
AD Abort Download Sequence Execution This command aborts any currently-executing Download Sequence(s), leaving the machine in the idle state. The System forgets any partially-executed Download Sequences which may have invoked other sequences via the XD, XI, XU, or XW commands, or may have been interrupted via the front panel or the Digital Inputs. Any remaining repeat counts are ignored. Normally, Download Sequences do not stop executing until the main sequence is finished.
The Arrow buttons cannot move the Z motor outside the range 0 through - 1 motor counts, where is the Z axis modulus as specified by the CZ command. In other words, there is no position counter wraparound as with the MZ ("Move Z Axis") command. In this respect the Arrow buttons are more like the AZ ("Absolute Z Axis Move") command. You can teach the Z axis position to the host computer in the same way that the OT ("Output Taught Point") command teaches X and Y. There are two techniques.
AS[] Auxiliary Speed This command selects an alternate servo routine which outputs “bump” changes on the AUX1 output bit each time either the X or Y stepper motors step. AT[] Arm Timer This command is used to determine if the machine is kept busy at all times in a benchmark test. If, during the test run, the buffer empties, a counter will be incremented once per parser cycle, indicating that a program was running too slowly to keep the machine constantly busy.
BC [] Begin Continuous Path This command denotes the beginning of a Continuous Path sequence. All ACL commands following this command, up until the next EC ("End Continuous Path") are part of this Continuous Path sequence. Any XY motion commands within the Continuous Path sequence are performed as a single move with one acceleration phase, possibly one slew phase, and one deceleration phase. The motion does not begin until the EC command is received.
Errors If a command not on the above list is encountered; or if an otherwise legal command causes an error such as a bad parameter, wrong number of parameters, or a travel limits violation; or if the 201st physical action command is encountered: the bad command is not executed. Instead, the error is logged and all remaining physical action commands until the EC are ignored. Then the System executes those physical action commands which preceded the bad command, plus all non-action commands.
Path Smoothness At high speeds the move sequence path must be smooth. In other words, the vectors and arcs must be arranged so that there are no sudden changes of direction. Where the direction must change substantially, an arc should be used. If this rule is violated (for example, a square with sharp corners) the stepping motors may slip, with a loss of the position reference.
Digital Inputs And Outputs The entire Continuous Path sequence is treated as though it were a single vector or arc, for the purposes of the following commands: MD, MM, MN, PD, and VM. For example, suppose an MD command has set up a Digital Outputs change which is to occur 1000 microsteps after the beginning of the move, plus another which is to occur 200 microsteps before the end. (The command might be: MD 1000, 2, 2, -200, 0, 2;.) The Digital Outputs will change 1000 steps after the beginning of the BC...
The entire BC...EC sequence is ignored if it occurs while the machine is in the Emergency Stopped state. If the STOP button is pressed (or an external Emergency Stop switch closes) during the motion, the motors stop immediately and the Home position reference becomes inaccurate. See the STOP button in Chapter 4 and the FH command in this chapter. Antibacklash vectors are temporarily disabled during a Continuous Path sequence.
(The SO and CF have been included to simplify the application.) The first MA leaves the carriage at 30000, 30000 microsteps. Then the SP "fools" the System into thinking it is at 0, 0 microsteps. Without stopping, the carriage moves another 30000 microsteps in each axis, then another 20000. The next example shows how to use patterns and Download Sequences to repeat a shape numerous times within one Continuous Path sequence. We assume that a fluid dispensing valve is connected to Digital Output bit 1.
is the identifying number of the Download Sequence to be defined; it must be an integer in the range 0 through 255, and it identifies which Download Sequence is to be created. is optional; if omitted it defaults to zero (i.e. Download Sequence 0 will be defined). If is outside the range 0 through 255 an error is logged and Downloading mode is not entered. Any existing Download Sequence stored under the specified number is erased when the BD command is executed.
All front panel buttons work normally during the execution of a Download Sequence. For example, PAUSE causes execution to be suspended until PAUSE is pressed again; STOP causes all motion to cease until a CS command is executed. Any ACL output commands (e.g. OA, OC, OS) send their outputs to the host, as usual. (Of course, if no host is connected, the outputs go into the "bit bucket".) ACL errors in the downloaded commands are logged as usual.
The amount of download memory not in use can be determined via the ESC.S2: command. The amount consumed by any particular Download Sequence can be determined via ESC.S5;n:, where n is the id. See Chapter 6. Each two-letter ACL mnemonic consumes one byte of download memory. The parameters to the AA and MA commands consume two bytes each if they are integers in the range 0 through 16383, and otherwise five bytes each.
Erasing a single Download Sequence can take as long as 1.5 seconds if the download memory is nearly full. The fastest way to re- download all of the sequences in the machine is to first erase all old sequences via ESC.!7:, then send the new versions of the sequences. Where long Download Sequences are involved, after the ED command your program should send an OE ("Output Error Code"), read the result back, and display it on the screen.
The SO ("Set Origin") command can also be used for translating a set of absolute moves, instead of BP. However, you may wish to use the "main" origin for other purposes; for example, to register the workpiece location on the platen, or account for different tool offsets. Patterns are also useful for performing translate-and-rotate operations to account for misregistration and rotation of the workpiece.
If an SO ("Set Origin") command or the front-panel SET ORIGIN button changes the origin while a pattern is active, the new Origin remains in effect only until the pattern is terminated by an EP. Also, if the GO TO ORIGIN button is pressed while a pattern is active the carriage moves to the pattern's Origin, not the "main" Origin. The host can find out the current level of pattern nesting by sending the ESC.!S4: command; see Chapter 6.
CD [ [, ]] Change Digital Outputs This command causes an immediate change in any or all of the 8 Digital Outputs. See also the TD ("Toggle Digital Outputs") command. is interpreted as an 8-bit number, with a useful range of 0 through 255. The number is written immediately to the Digital Outputs. Each bit corresponds to one Digital Output; if the bit is 1, the Digital Output is set True; if zero, it is set False.
While the machine is in the Emergency Stopped state the CD command is ignored; all Digital Outputs remain in the False state. If you need a precise delay between a Digital Outputs change and the beginning of the next vector or arc, use the PD command. Also, the Digital Outputs can be made to change in the middle of an arc or a vector; see the MD and MM commands. If or is above 255, the least significant 8 bits are used.
The execution of a CF command does not affect the existing microstep locations of the carriage, the origin, the travel limits, and the taught point. However, the CF command affects the values reported by OC after front-panel Arrow button or GO TO ORIGIN motion since such motion causes the Commanded position to be recomputed. Very small values of and , say in the range 0.0001 through 0.01, do not produce accurate results. For example, the sequence CF 0.001, 0.
For more information about the CR command and its parameters please see Chapter 9 Linearity Correction. The current values stored in the Linearity Correction Table can be read via the OR command. The entire table can be set back to its factory default state (i.e. no corrections) via the ESC.!8: command; see Chapter 6. CS Clear Stop The CS command turns off the STOP light and clears the Emergency Stopped state and the Emergency Stopped status bit, thus enabling subsequent motor motion.
CZ [ [, [, [, ]]]] Configure Z Axis This command configures the Z axis speed, position range, step size, and acceleration to be used with the AZ and MZ commands. The step size also affects the FZ command and Z arrow motion; see the AM ("Arrow Mode") command. becomes the Z axis slew step rate, in steps per second. Usable values are in the range 1 through 10000. Values above 10000 are treated as 10000. Zero is treated as 1.
is ignored if the High Resolution Z Axis option is installed. With this option the step size is fixed. However, all other CZ parameters retain the same meanings as described here. is optional, and may only be specified if all preceding parameters are specified. It becomes the Z axis acceleration rate, in thousands of steps per second per second. (Half steps and full steps are taken at the same rate.
EC End Continuous Path This command denotes the end of a Continuous Path sequence. When the EC command is encountered, the entire Continuous Path motion sequence begins to execute. See the BC command. If no Continuous Path sequence is active when the EC command is executed then the command has no effect. ED End Download This command cancels the Downloading mode, thus specifying the end of a Download Sequence which was started with the BD command. See the BD command.
Note that, normally, escape sequences are executed as soon as they are received by the Automove, whether or not it is currently downloading a move sequence. The ES command allows an escape sequence to be executed at the time the download sequence is executed, even though the host computer is not connected. The is any ASCII character other than NULL or Escape. (As with all ACL, each character used in an ES command must not have bit 7 set; i.e., the decimal equivalent must be less than 128.
FH [ [, ]] Find Home Switches If no parameters are specified the machine finds the Y Home switch, then the X Home switch. The XY motors are left at full power afterwards. (See the PM command.) The point where both switches close becomes the new (0,0) microstep coordinate, or Home position. The No Reference status bit is cleared. (See the OS command.
The action of the FH command can also be caused by the manual re-reference operation (i.e. pressing the FAST and GO TO ORIGIN buttons simultaneously). See Chapter 4. The Automove System does not automatically find the Home switches at power up. Until it receives an FH command or manual re- reference, it assumes that the Home position is wherever the carriage was at power up. If you want your system to automatically find home you can make an Autostart sequence containing an FH command.
FP [] Front Panel Lockout The value of becomes a front panel lockout mask. The useful range is 0 through 8191. Each bit of the mask disables a particular button; if the bit is "1" the button is disabled; if "0", enabled. The mask defaults to 0 (all buttons enabled) if is omitted, and also at power up and IN.
In the case of bits 8 through 11 (PAUSE, STOP, interrupts, and Step Verify): if the button is pushed (or the event occurs) while disabled by FP then the event is logged ("remembered") and acted upon as soon as a subsequent FP command re-enables it. While the event is pending the corresponding front-panel light, if any, glows steadily; i.e., does not blink. When another FP re-enables the event the light begins to blink.
After the switch closes, the Z axis position counter is set to zero. If the switch has not closed within 32767 steps, the motor stops moving, an error is logged, and the present position becomes zero. The 32767-step limit can be changed via personality parameter 16. The motor is left at full power after the switch is found. If the STOP button is pressed (or an external Emergency Stop switch closes) while the motor is moving, the motor stops immediately and the present position becomes zero.
GD [] Lower Retractable Height Sensor (Gear down) The GD command is used to turn off a solenoid that lowers the retractable height sensor. The I/O bit used was previously the Z axis test bit line for the Z head assembly. Insure that your system is equipped with the necessary changes to wiring before using this command. At power up or reset, the GD command will be cancelled.
IN Initialize The IN command is equivalent to executing the following sequence of ACL commands: EC; FP; CS; AB; AC; AM; AP; CD; CF; CP; CZ; MD; MM; MN; PD; SO; SR; TL; VM; WD; Table 11 - IN Command Default Settings EC Continuous Path is canceled. Any pending commands since BC are ignored. FP All front panel buttons are enabled. CS Emergency Stopped state and Motor Slipped state are cleared. AB Antibacklash vectors are disabled. AC Acceleration is 193, corresponding to 193000 steps/sec/sec.
In addition, IN causes the following actions: The ACL error code is cleared. The following OS status bits are cleared: Position Change, Origin Change, Taught Point Available, Emergency Stopped, Error, Motor Slipped. The Initialized status bit is set. The commanded position is recomputed from the Actual position according to the new (default) values of calibration factors, pattern rotation angle, and Origin position. The Taught Point is set to 0,0.
MA , Move Absolute The carriage moves in a straight line (a "vector") to the absolute Calibrated Unit coordinate given by and . This is the most common motion command used with the Automove System. The range of and is -32768.0000 through 32767.9999. The specified values are rotated by the pattern rotation angle. The rotated coordinates are multiplied by the calibration factors, rounded to the nearest integer, and added to the Origin position to get a pair of microstep coordinates.
Each Digital Output can only have one value at a time, either True or False (one or zero). The CD and TD commands change the outputs immediately; the MD and MM commands causes the outputs to change later, when vectors or arcs are performed. Once an output has been changed either by a CD or TD or by a move after a PD, MD, or MM, the old value of that output is forgotten.
If and resolve to the same microstep position within a given move, the value is output approximately 9 microseconds after the value. The value is always output before the value. If resolves to an earlier microstep position than within a given move, the arithmetic mean (i.e. average) of the two positions is computed, and and are both output at this intermediate position, spaced approximately 9 microseconds apart.
MM [, [, ]] Multiple Mid-move Digital Outputs Changes The MM command establishes up to 32 points at which the eight Digital Outputs are to change state during each subsequent AA, AR, MA, MR, MT, or Continuous Path move. This is the equivalent of executing multiple CD commands in the middle of a move. The effects of a series of MM commands remain active until a subsequent MM command or commands cancel them. See also the MD and PD commands.
Note that it is possible to execute moves whose total length exceeds 65535 microsteps. In this case the middle portion of the move will be unreachable by the MM command; the Digital Outputs will not change in this region. If the length is in the range 32768 through 65535, a portion near the end will be unreachable by positive values and vice-versa. The parameters and determine the new values written to the Digital Outputs.
If the machine is in the Emergency Stopped state when an AA, AR, MA, MR or MT occurs, the motion command is ignored; hence no MM- induced change occurs at the Digital Outputs. If an Emergency Stop occurs during a move, the Digital Outputs all go immediately to the False state. The System precomputes the locations at which the Digital Outputs are to change before starting each move. If the move is terminated by a Dynamic Deceleration (i.e.
MN [, [, ]] Mid-move Digital Inputs Response The MN command sets up automatic actions which are to take place during subsequent AA, AR, AZ, MA, MR, MT, MZ, and Continuous Path moves until another MN command is executed. The actions will only take place if a specified condition occurs on any or all of the eight Digital Inputs before or during the move.
The and parameters set up a Digital Inputs condition which is to trigger the automatic actions. The parameters are treated as 8-bit numbers and are similar to the and parameters of the CD command, respectively. That is, the System checks that each Digital Input matches the corresponding bit of , where a True input matches a 1 bit and a False input matches a 0. However, the System only checks those Digital Inputs which correspond to a 1 bit in .
The signal sense (High True vs. Low True) of the Digital Inputs for the MN command is set by personality parameter 38. The effects of MN can be suppressed for one move or a group of moves via the VM ("Vector Mode") command. Caution: To prevent unexpected responses you should be sure that the MN features are only enabled during the particular move or group of moves where you desire a response.
Examples: MN4,3,3; allows bit 0 OR bit 1 to cause a Dynamic Teach, if either becomes set during a move. MN8,3,3; allows bit 0 OR bit 1 to cause Dynamic Deceleration if either becomes set during a move. If mode bits for ANDing and ORing are both set at the same time, the AND bits will have precedence to maintain compatibility with older software. For more information about the Digital Inputs please see Chapter 8 Using the Digital Outputs and Inputs.
MT Move To Taught Point This command moves the carriage in a straight line back to the most recent XY Taught Point. All of the effects of this vector are as though an MA command had been executed. The Taught Point Available status bit is cleared. The Commanded position is set to the Calibrated Unit equivalent of the Taught Point, even if it is outside the travel limits, although the motion itself is constrained to the travel limits.
OA Output Actual Position The Automove System outputs the Actual carriage position, in microsteps, to the host computer, and then clears the Position Change status bit. The X coordinate is output first, followed by a comma, then the Y coordinate. The coordinates are integers in the range 0 through 32767.
OD Output Digital Outputs State The Automove System outputs to the host the most recent value applied to the Digital Outputs, in the form of a decimal integer in the range 0 through 255. The meaning of this 8-bit number is the same as the parameter in the CD command; i.e., each bit in the number corresponds to the state of one Digital Output. For example, if outputs 2 and 0 are True and all others are False, the OD command outputs a 5.
Whenever any ACL error is logged, a "?" character is sent immediately to the host. This may occur even before the Automove System has received all of the characters associated with the bad command; for example, if the first of two parameters is out of range. See Exceptional Conditions in Chapter 5. OF Output Calibration Factors The Automove System outputs the current values of the calibration factors. The X value is output first, then a comma, then the Y value. The values will be in the range 0.
For example, if Digital Inputs 2 and 1 are True and all others are False, the ON command outputs a 6. (Decimal 6 is equivalent to binary 00000110, which has only bits 2 and 1 set). Note that the sense of the Digital Inputs can be set to be either High True or Low True; see personality parameter 38 in Chapter 7. As shipped from the factory the Digital Inputs are all Low True (i.e. Negative True, such that a low voltage means True and a high voltage means False).
OR , Output Correction This command causes the Automove System to output a pair of correction offsets as previously established via the CR command. The X value is output, then a comma, then the Y value. The values are in microsteps, in the range -128.0000 through 127.0000, except as described below.
OS Output Status The Automove System outputs the value of its status code to the host, then clears the Initialized bit. The code is output as a decimal integer in the range 0 through 1023, whose bits have the following meanings: Table 14 - Status Code Definitions Bit Dec. Val. 0 1 Position Change The position has been changed manually since the last OA, OC, or OZ. 1 2 Origin Change The Origin was changed manually since the last OO or SO.
The Taught Point is the carriage position which was current when the most recent TEACH or Dynamic Teach occurred. It is saved as a microstep location. The OT command converts that location to Calibrated Units according to the pattern rotation angle, calibration factors, Origin, and linearity correction in effect at the time of the OT. Therefore the values could be affected by an intervening BP, CR, EP, CF, or SO command or by a push of the SET ORIGIN button.
If the parameter is present and is nonzero then the Output Terminator sequence is suppressed (for this particular OU command only). The Output Terminator defaults to an ASCII Carriage Return and Linefeed; these are normally sent after each ACL output. also suppresses any Echo Terminator wait. See the ESC.M command in Chapter 6.
PD [, [, ]] Pre-Move Digital Outputs Changes The PD command establishes Digital Outputs changes and delays which are to occur before each subsequent AA, AR, MA, MR, MT, or Continuous Path move until another PD command is executed. This is the equivalent of executing a CD command and a WA command before each move.
The most recent value sent to the Digital Outputs can be determined via the OD command. Example: the command sequence PD .05, 4, 4; MR 1000, 0; produces the following results. Digital Output 2 is set True; 50 milliseconds later (i.e. .05 seconds) the carriage begins to move. (Note that 4 is equivalent to binary 00000100, which has only bit 2 set.) Example: PD 0.008, 16, 16; MD -20, 0, 16; MR 0, 1000; MR 100, 100; produces the following physical effects. Digital Output 4 becomes True, then after .
PM [] Power Level of Motors The power level applied to the X and Y motors is altered immediately, according to the value of : Table 15 - Power Levels of X and Y Motors -1 Switching drivers are shut off 0 Drivers on, no current 1 Drivers on, half current (1/4 static power) 2 Drivers on, full current This new setting lasts until the next XY motor movement occurs, at which time the motors are set to full current for the motion and left at full current after the motion.
PS Pause The machine enters the Paused state as though the front-panel PAUSE button had been pressed. Subsequent ACL commands are placed in the input buffer but are not executed until the Paused state is cleared. The Paused state is typically cleared by pressing the PAUSE button a second time. It can also be remotely cleared by the host computer. See the ESC.!4: command in Chapter 6. See also the PAUSE button in Chapter 4.
RE [, ] Resolution This command sets the number of microsteps per full step (the "microstep factors", or resolution) for the Automove System stepping motor drivers. All physical motion in the X and Y axes is affected, including vectors, arcs, Arrow buttons, and FH ("Find Home") motion. A microstep is the smallest XY physical movement possible in the Automove System. For more information, see the section entitled "Microstep Size, Resolution, and Maximum Travel" in Chapter 1.
If either or is less than 4.0000 the maximum speed is proportionally limited such that motion does not exceed a certain number of full steps per second. The approximate limits are as follows: Single vectors: Single arcs: Continuous Path vectors and arcs: approx. 7400 full steps/sec approx. 2200 full steps/sec approx. 2100 full steps/sec Other speed limits may apply; see the SR command. The microstep factors default to 8.
SC , , [, ] Scale This command computes the microstep equivalent of the Calibrated Units position in and . The computation takes into effect the current pattern rotation, calibration factors, Origin, and linearity correction. (See, respectively, the BP, CF, SO, and CR commands.) and must be in the range -32768.0000 through 32767.9999.
At power up the Home position is wherever the carriage is when motor power is first applied, so until an FH or manual re-reference occurs the Home and Origin positions will both be at unknown locations with respect to the platen. The Origin affects only the AA, MA, OC, OT, and SP commands. It does not affect the existing microstep locations of the carriage, the travel limits, or the Taught Point.
During the conversion from Calibrated Units to microsteps, the intermediate computation results must be within the range -32768 through 32767 and the final results must be within the travel limits. If either restriction is not met an error is logged and the position counters are not changed.
Note that, although the controller electronics can slew at the above rates, the stepping motors themselves may not be able to keep up. Above certain values of the System automatically performs microstep skipping during the moves. For more information see the AA, BC, and MA commands. A single move or group of moves can be speeded up or slowed down through use of the VM command.
TD [] Toggle Digital Outputs This command is similar to the CD ("Change Digital Outputs") command; TD can immediately change any or all of the 8 Digital Outputs. The difference is that, while the CD command gives a specific new value to each Output, the TD command merely changes it from whatever value it has now to the opposite value; True changes to False, False to True. The TD command is particularly useful in Download Sequences which are invoked from the front panel.
The max limit for each axis must be greater than or equal to the min value; if not, an error is logged. If the parameters are omitted, the System uses default values at IN and power up. The defaults are read from the non-volatile memory at power up. They can be changed via the PE command. At the factory the defaults are set approximately as follows: Table 17 - Factory Defaults For Travel Limits System as shipped Bare Controller Controller with 6 x 6 inch X-Y Table Approx.
VA , , , , Compute Vector Angle The VA command computes the angle of a vector which passes through the specified points. and define the start of the vector, while and define its endpoint; these parameters can range from -32768 through 32767 and are rounded to the nearest integer. The angle is computed in degrees, with zero degrees being to the right (i.e., along the positive X axis) and positive angles being counterclockwise from zero.
The and parameters define one end of the vector, and and the other end. These parameters may range from -32768 through 32767 and are rounded to the nearest integer. The intermediate computation results (i.e. the squares and the sum of the squares) can be any values resulting from legal input parameters, but the final result must be in the range 0 through 32767. If the result would be greater than 32767 it is set to 32767. The computed length is placed in the variable given by .
The value of defaults to zero at power up and at IN, or if is omitted from the VM command. This default means that the SR step rate is used, and the MD, AB, and MN commands are not suppressed. The parameters established by SR, PD, MD, MM, AB, and MN are not actually changed by the VM command; they are merely temporarily ignored.
A VS without the parameter is primarily useful in downloaded move sequences. The numeric value would be specified, by a computer or some other device, at the time the move sequence is executed. For more information about ACL variables, please see Chapter 10. VT Variable Test The VT command modifies the behavior of the next ON, XI, XU, or XW command, so that instead of testing the Digital Inputs, it tests bits 0 through 7 of the integer portion of the variable specified by .
V< , Variable Less Than This command tests whether the contents of the variable whose i.d. is given by is numerically less than the specified . The test result is available to the next ON, XI, XU, or XW command; bit 0 will be "1" if and only if the test was True (i.e. the variable was less than ). (The other 7 bits will be seen as "0".) For example: V< 5, 100; XW 22, 1; executes Download Sequence 22 while variable 5 contains any value less than 100.
V- [, ] Variable Subtract/Negate If is specified, this command subtracts the specified value from the variable whose i.d. is given by . As with V+, saturation arithmetic is used. If is omitted, the contents of variable are negated, with the result being placed back into the same variable. The value -32768.0000, when negated, becomes the same value. V* , Variable Multiply This command multiplies the variable whose i.d.
The result is always an integer. Any fractional part of or the variable's value is ignored.
WA Wait The Automove System waits approximately seconds before processing the next ACL command. The range of is 0 through 65.535; the resolution is 0.001 second (one millisecond). The delay begins when the previous command has been completely processed, or when the WA is received, whichever comes later. The WA command is ignored if the machine is in the Emergency Stopped state. Once a wait has begun it can be aborted via Emergency Stop or the ESC.K command.
The and parameters are treated as 8-bit numbers and are similar to the and parameters of the CD command, respectively. That is, the System waits until each Digital Input matches the corresponding bit of , where a True input matches a 1 bit and a False input matches a 0. However, the System only checks those Digital Inputs which correspond to a 1 bit in . All other Digital Inputs are ignored and do not need to match.
XD [ [, ]] Execute Download Sequence This command invokes, or starts the execution of, a Download Sequence previously defined via the BD and ED commands. The saved ACL commands are executed as though they had been received from the host computer through the RS-232C port. The XD command itself can be made part of a Download Sequence. In this way complex motion sequences containing repetitive patterns can be built up using only a small amount of download memory.
Example: after doing the previous example, send BD 0, 3; MR 0, 1000; XD 2, 36; ED; . Then, using the Arrow buttons, move the carriage to some location in the middle of the platen, and press the SET ORIGIN button. Then press FAST and, while holding it, press PAUSE. This invokes Download Sequence 0, which executes 3 times and then quits. Each time it executes it performs a circular pattern of 36 moves, each pattern with a radius 1000 Calibrated Units larger than the previous one.
XU , [, ] Execute Until This command invokes a Download Sequence in the same way as the XD ("Execute Download Sequence") command, except that XU repeats the Download Sequence until a specified condition exists on the Digital Inputs or in an ACL variable. Any repeat count specified in the BD command is ignored. (The discussion below assumes that the Digital Inputs are being tested.
is the identifying number, 0 through 255, of the Sequence to be repeated. and specify the condition to test before each execution; see the WN command for the meaning of these parameters. is optional; it defaults to 255 if omitted, meaning that all eight Digital Inputs are checked. The Digital Inputs are tested before each execution of the Download Sequence. If the condition is met the Download Sequence is executed.
ZM [,[,]] Z-axis Multiple Mid-move Digital Outputs This command will perform the same action as the MD command only it is applied to the Z axis. This feature allows the dot dispense cycle to occur during the Z axis decent to a dispense point which speeds up the dispense operation. The parameters syntax is the same as the MM command.
4 Front Panel Functions This chapter describes the functions of the buttons on the Automove System's front panel. All buttons produce immediate effects if they are pressed while the Automove System is sitting idle. If pressed during carriage motion the RESET, STOP, and PAUSE, buttons take effect immediately; other buttons must be held down until the current vector, arc, or Continuous Path move is completed or the System does not react to them.
Eventually a CS, IN, or ESC.!2: must be executed in order to re-enable motion. There is no front-panel way to clear the Emergency Stopped state, other than to reset the machine or cycle the power switch. The physical position reference is usually lost if the motors are moving when the STOP occurs, but the No Reference status bit is always set regardless. Therefore, after the Stop is cleared, an FH command or manual re-reference should be performed before any more XY motion, and an FZ before any Z motion.
If a pattern is active then the new Origin position is effective only until the end of the pattern. When the EP ("End Pattern") command is executed, the old location of the Origin is reinstated. See the BP and EP commands in Chapter 3. During Z Arrows mode (see "Z Axis Arrows", below) the SET ORIGIN button has no effect, since the Z axis origin always remains at the Z Home position. GO TO ORIGIN The machine performs a vector to the Origin position, as though an MA 0,0; command had been received.
The AM ("Arrow Mode") command in Chapter 3 describes a way of using the TEACH button to teach Z axis points. The MN ("Mid-move Digital Inputs Response") command can teach the current position automatically during a move. The MT ("Move To Taught Point") command moves the carriage back to the most recent Taught Point. Arrow Buttons The Arrow buttons are four buttons (Up, Down, Left, Right) for producing manual carriage motion in X and Y or Z.
Joystick The optional external joystick produces the same effects as the Arrow buttons. If you move the stick away from its center position the motor takes one step, and after a while begins moving slowly. The button at the end of the stick has the same effect as FAST. The two buttons on the joystick housing are both TEACH buttons. If the Arrow Buttons are in Z mode then the joystick affects the Z motor instead of X and Y.
If you press FAST/PAUSE or FAST/TEACH while any Download Sequence is executing, the System interrupts the old sequence and immediately starts executing the newly requested one. The old sequence resumes executing when the new one is finished. (One restriction applies to interrupts: you cannot interrupt an interrupt.
5 RS-232C Communications The RS-232C Interface The Automove System is connected to the host computer via an RS-232C/CCITT V.24 serial interface, herein referred to simply as RS-232C. The cable should be fitted with the standard male 25-pin type "D" subminiature CINCH DBC-25P connector or equivalent. The Automove System functions as a DTE (Data Terminal Equipment) on RS-232C. It transmits data on pin 2 (Transmitted Data) and receives it on pin 3 (Received Data).
Outputs to the Host When the Automove System sends data back to the host it also uses 7-bit ASCII. Transmitted parity is the same as the received parity established by the backpanel switches. The Automove System always transmits two stop bits, although it is happy to receive either one or two. Many host computers have only one or two characters of buffering on their RS-232C input channel.
Exceptional Conditions When the Automove System detects certain exceptional conditions, it immediately sends a "?" (question mark) character to the host. These conditions are: * Detecting invalid non-volatile memory contents at power up or RESET * Entering the Emergency Stopped state * Detecting motor slip via the optional Step Verify circuit * Detecting any communications error (see ESC.E) * Detecting any ACL error (see OE) When the host receives a "?" it can interrogate via the OS, OE, ESC.E and ESC.
If the System becomes Paused, it simply stops extracting characters from the input buffer. Eventually the buffer fills up and, if all goes well, the handshake prevents the host from sending more characters. When the Paused state is cleared, the System resumes processing the characters. As soon as the buffer becomes empty enough, the handshake allows the host to resume transmission. Escape Sequences Escape sequences are used to establish communications parameters.
Xon/Xoff Handshake The Xon/Xoff handshake works as follows. As the host sends ACL commands to the System, they are stored in the input buffer and are processed by the System as fast as possible. If the host sends them faster than they can be processed, the buffer begins to fill up. If the number of empty bytes in the buffer becomes less than a certain value, called the Xoff threshold, the System sends an Xoff Trigger String to the host, in effect saying "stop talking".
Example: the sequence ESC.I;5;6:ESC.M10: sets up a "normal" ENQ/ACK handshake using the ASCII characters ENQ and ACK, with a 10 millisecond turnaround delay. Software Checking Handshake The Software Checking handshake works as follows. The host repeatedly sends the ESC.B command to the Automove System, effectively asking "how much room do you have in your buffer?" The System sends back a number giving the available buffer space.
6 Escape Sequences The Automove System recognizes a number of escape sequences to establish communications parameters and to request that various information be sent back to the host. The escape sequences do not go into the input buffer; instead, they are acted on immediately as they are received.
Normally, escape sequences cannot be stored as part of a Download Sequence. However, for certain special system setup needs, it may occasionally be necessary to execute an escape sequence from a Download Sequence; for example, as part of an Autostart sequence. The ES ("Execute Escape Sequence") ACL command can be used in this case. See Chapter 3. In the following descriptions, square brackets, "[" and "]", enclose groups of optional parameters (i.e.
ESC.( Programmed On The Programmed On command puts the Automove System into the Programmed On state; in this state, the machine pays attention to the incoming data from the RS-232C channel. This state is the power up default. This command has the same effect as ESC.Y. ESC.) Programmed Off The Programmed Off command puts the System into the Programmed Off state; in this state, the machine ignores all incoming data (including other escape sequences) until an ESC.( or ESC.Y occurs.
2 The System clears the Emergency Stopped state and turns off the STOP light, thus enabling subsequent motor motion. See the STOP button in Chapter 4. The optional Step Verify circuit is reset. The "ESC.!2:" command is ignored if it is executed while the System is in neither the Emergency Stopped state nor the Motor Slipped state. It is also ignored if it is executed while the Stop switch is still actuated. The FP command may be useful here; see the example under CS.
6 The System initializes the personality parameters in the non-volatile memory to their factory-default values. The values are those specified as the factory defaults in Chapter 7, except for the following: personality parameter 5 is always set to 0; parameters 19 and 20 are always set to 1.0000; and parameters 25 and 26 are always set to 32767. After the System rewrites the personality parameters it performs the equivalent of an IN command to invoke the new values of the parameters.
The DEC parameter enables or disables the Hardwired DTR handshake; if bit 0 of the parameter is True, the Hardwired DTR handshake is enabled; otherwise it is disabled. The parameter defaults to 1. While this handshake is enabled, the Data Terminal Ready line (pin 20 of the RS-232 connector) goes True whenever the buffer has room for characters, and false otherwise. If the Hardwired DTR handshake is disabled, the Data Terminal Ready line remains True at all times.
Whenever any communications error is logged, a "?" character is sent immediately to the host. See "Exceptional Conditions" in Chapter 5. Table 21 - In Case of Communications Error Code Conflicts If OA, OS, etc. is pending If handshake string is pending If output from ESC is pending OA, OS, etc. can't happen * error error ESC.B error ** error error ESC.E error error error ESC.L error error error ESC.O error error error Ack error error error Immed.
ESC.H [() ; () ; ()] : Set Handshake Mode 1 This command sets the same parameters as the ESC.I command, but enables Handshake Mode 1. In Handshake Mode 1, certain parameters of the ESC.M and ESC.N commands will affect the response to the Enquiry Character or the Xon Trigger String, according to the Applicable Output Modifiers tables on page 6-10. ESC.
Xon/Xoff Handshake: The DEC parameter specifies the number of empty bytes remaining in the buffer when the is to be transmitted. The default is 80. The number should be large enough to allow for any latency within the host, during which the host continues to send characters before recognizing that the Xoff String has been transmitted.
APPLICABLE OUTPUT MODIFIERS Table 22 - Applicable Output Modifiers in Handshake Mode 1 Type of Output Output Trigger Turnaround Delay Echo Terminator Output Initiator Output Terminator OA, OS, etc. yes yes yes yes yes ESC.B yes yes yes yes yes ESC.E yes yes yes yes yes ESC.L yes yes yes yes yes ESC.O yes yes yes yes yes ESC.S yes yes yes yes yes Acknowledge yes yes yes no yes Immed.
APPLICABLE OUTPUT MODIFIERS Table 23 - Applicable Output Modifiers in Handshake Mode 2 Type of Output Output Trigger Turnaround Delay Echo Terminator Output Initiator Output Terminator OA, OS, etc. yes yes yes yes yes ESC.B yes yes yes yes yes ESC.E yes yes yes yes yes ESC.L yes yes yes yes yes ESC.O yes yes yes yes yes ESC.S yes yes yes yes yes Acknowledge no yes no no no Immed.
If the System is paused and waiting to finish a previously-received ACL command, ESC.K does not abort the paused command. In order to resume ACL processing the user must press the PAUSE button again or send the ESC.!4: command. There is no way to prevent the paused command from being executed, other than to "power up" the machine, either by resetting it, cycling the power switch, or sending the ESC.!0: command. You can, however, prevent any motion from occurring: send ESC.
The ASC
Example: the command ESC.N;19: establishes an Xoff Trigger String consisting of the ASCII DC3 character (character code 19, also known as XOFF). This character is sent when the buffer is nearly full, at a threshold established by the ESC.H or ESC.I command. There is no intercharacter delay, since the first parameter was defaulted to zero by the semicolon. Example: the command ESC.N10;19: establishes an Intercharacter Delay of approximately 10 milliseconds, or 0.01 second.
ESC.R Reset Handshake Executing this command is the same as executing the following commands without parameters: ESC.@, ESC.H, ESC.I, ESC.M, and ESC.N. It has no effect on preceding ACL commands; the input buffer is NOT cleared. (See ESC.K.) The following parameters are established by ESC.R : Hardwired DTR handshake enabled. Block Size = 80. System is in the Programmed On state. Logical buffer size = 256. Enquiry Character = 0 (no Enq/Ack handshake enabled). Acknowledge String = 0 (no Acknowledge String).
ESC.S [ () [ ; () ]] : Output Resource Allocation This command causes the Automove System to output the current allocation or consumption of some resource, according to the value of the DEC parameter : Table 25 - Parameter Values for Command ESC.S Action 1 Output the overall size of the non-volatile download memory, in bytes. This will normally be 13894. For release 3.5 or later, the allowable download memory is 32986 bytes.
ESC.Wn;v: Write Variable Value This escape sequence allows a value to be written to a variable while the machine is performing a downloaded program that is repeating forever, such as a conveyor controller routine. This allows the downloaded program to include a test for a variable value in its program loop. If the value is equal, it can execute another downloaded procedure such as turning on the red error lamp on an A-600.
7 Changing the Personality You can change various aspects of the Automove System's "personality" via the PE command. The syntax of the command is: PE , The new value is written to the System's non-volatile memory so that it becomes permanent; i.e., it is retained even when the power is turned off. Before sending the PE command be sure the backpanel Memory Enable switch is in the Down position. An integer which determines which personality parameter is to be changed.
Parameters 27 and 28 are not used by the System. They can be used to record your own configuration or status information in non- volatile memory. Following is a list of the personality parameters. Each appears with the value to access that parameter, the name of the parameter, the allowable range, the factory-set value, and a description of the parameter's function. There is a summary of the personality parameters in Appendix D.
The Personality Parameters Arrow Buttons 1: Arrow Single Step Delay, range 0 to 65535, factory 3000 The Arrow buttons (see Chapter 4) have three modes of operation. If you press and immediately release a button, the motor takes a single microstep. If you hold the button for a while, the motor begins to turn slowly. If you press FAST with the button, the motor moves rapidly. This personality parameter sets the amount of delay after the single step, before the motor begins to move slowly.
Find Home and Manual Re-Reference 6: First Find Home X Back Off Distance, range -32768 to 32767, factory 250 The FH ("Find Home Switches") command and the manual re-reference operation perform the same sequence of actions twice: once quickly, the second time more slowly, for a more accurate measurement of the switch position.
If you set parameter 14 to 1 and connect a wire in place of the X home switch you can prevent the X axis from moving during the FH. 15: Find Home Max Y Distance, range 0 to 32767, factory 32767 This sets the maximum number of steps the System will take when seeking the Y home switch. If the parameter is zero there is no maximum number of steps. See parameter 14.
21: Default X Microstep Factor, range 1.0000 to 32.0000, factory 8.0000 This parameter sets the default X microstep factor (i.e. resolution) which is applied at power up and an RE command with no parameters (but not at IN!). 22: Default Y Microstep Factor, range 1.0000 to 32.0000, factory 8.0000 This sets the default Y microstep factor; see parameter 21.
Note that this personality parameter should be set before you pick an appropriate value for personality parameter 4. 30: Y Motor Direction, range 0 to 255, factory 0 This changes the Y motor direction. See parameter 29. Parameter 30 should be set before you pick an appropriate value for parameter 5. 31: Z Motor Direction, range 0 to 255, factory 0 This changes the Z motor direction. It should be set nonzero if the FZ command produces motion away from the Z Home switch. See parameter 29.
Digital Inputs changes are normally only sensed while the motors are idle. If you need quick response even in the middle of a move, consider using the MN ("Mid-move Digital Inputs Response") command in addition to these personality parameters. If a Digital Input is sitting True at power up, no function is triggered until the Input goes False, then True again.
False True False, corresponding to the binary number 010, which is equal to decimal 2. If Inputs 4, 1, and 0 are all True (binary 111 = decimal 7) then Download Sequence 7 is invoked. The BCD ("Binary Coded Decimal") -encoded invoke works the same as the binary-encoded invoke, except that the Download Invoke Inputs are interpreted as a BCD number rather than a binary number. In a BCD number bits 0 through 3 are the ones digit and bits 4 through 6 are the tens digit.
38: Digital Input Sense, range 0 to 255, factory 255 This determines the logic sense of the Digital Inputs. If a given bit of parameter 38 is a 1 then the corresponding Digital Input is Low True (i.e. Low = True, High = False). If the bit is a 0 then the Input is High True. This logic sense applies to all modes of using the Digital Inputs: the MN, ON, WN, XI, XU, and XW commands as well as function triggering via parameters 36 and 37.
43: Default Arrow Mode, range 0 to 255, factory 0 This parameter sets the default Arrow mode which is applied at power up, at IN, and at an AM with no parameters. See the AM command in Chapter 3 and the Z AXIS button in Chapter 4. 44: Default Z Axis Step Rate, range 1 to 10000, factory 100 This sets the default Z axis step rate which is applied at power up, at IN, and at a CZ with the parameter omitted. See the CZ command in Chapter 3.
Step Verify Options 49: Step Verify Control, range 0 to 3, factory 0 This parameter controls the behavior of the Step Verify option. Each bit has a specific meaning, as follows: Table 28 - Step Verify Control Value Definitions 50: Bit Dec. Value Meaning, if 1 0 1 If this bit is set then the Automove System suppresses the automatic Emergency Stop at slip detection. The machine will continue to execute motion commands after a slip is detected.
Note that Step Verify can be temporarily locked out via the FP command. If a slip occurs while locked out then the SLIP light glows steadily (i.e. does not blink) and the slip is not acted upon until a subsequent FP re-enables Step Verify. Also, Step Verify is completely deactivated while motor current is off; see the PM command.
57: Z head identification code. Must be 0 or 128, factory 128. Must contain the I.D. code of the Z head being used since wiring to the Z head for automatic identification has been changed to implement the retractable height sensor. 128 is used for 1 mil Z heads and 0 is used for 2 mil Z heads. 58: Calibration map code for square or rectangle. Must be either 0 for square or 1 for rectangular, factory 0. Allows a special rectangular calibration map to be used with DispenseJet products only.
8 Using the Digital Outputs and Inputs The Digital Outputs The Digital Outputs are optically-isolated logic outputs tied to a back-panel connector. They are always High True (i.e. High = True, Low = False), assuming you connect them in the grounded-emitter configuration. At power up and Emergency Stop they are all set False (i.e. Low). For the connector pinout and electrical specifications, see the Automove Operation manual.
For example, suppose you have connected a relay to Digital Output 0, and suppose the relay needs 0.01 seconds to close and 0.02 seconds to open. When you send CD 1; the relay closes; CD 0; opens it. If you first send WD .02; the System automatically waits .02 seconds after any CD command. If you would rather, you can save .01 seconds now and then by using pairs of commands: CD 1; WA .01; and CD 0; WA .02; . Getting Fancier Now suppose you need to change the Digital Outputs while the motors are moving.
2. The move sequence can be delayed until a particular condition occurs, by using the WN ("Wait For Digital Inputs") command. 3. You can execute one of two Download Sequences depending on whether a certain condition does or does not exist on the Digital Inputs; this is the XI ("Execute If") command. 4. You can repeat a Download Sequence until the Digital Inputs are in a certain state; this is XU ("Execute Until"). 5.
It is this declared value which drives all seven non-MN ways of using the Digital Inputs. Thus a False-to-True transition can produce an immediate result, whereas a True-to-False transition will not be responded to for at least 20 milliseconds. If possible, you should arrange the logic sense (via personality parameter 38) so that any transition requiring immediate response is False-to-True. If your switch contacts bounce for more than 20 milliseconds you can do one of two things.
The WN command's parameter lets you specify that you only want to include certain Digital Input(s) in the test. Be sure to be as restrictive as possible about which Inputs you test. If certain Inputs don't matter, don't test them, because they might not be in the states you think they are. Usually you will only be testing one Input, so will have only one bit set (i.e. it will be 1, 2, 4, 8, 16, 32, 64, or 128).
Responding In Mid-move The MN ("Mid-move Digital Inputs Response") command can set up automatic Digital Inputs responses that occur while the carriage or the Z motor is in motion. The System can "remember" where it was when the Digital Inputs reached a particular state and can immediately decelerate and come to a stop. This capability is especially useful where there is a piece of external equipment monitoring some quantity which is affected by the Automove System's motion.
Interrupts are useful for starting or changing the course of a move sequence as the result of external inputs which may occur at unpredictable times. These inputs might result from a person pushing a button or from the activation of some switch or sensor in your system. You may wish to disable interrupts during certain critical sections of your move sequence; for example, while fluids are flowing or heaters are turned on.
Interrupting An Interrupt The maximum nesting depth of Download Sequences is 12, including interrupts. In other words, suppose Sequence 1 has called Sequence 2, 2 has called 3, and so forth up until 11 has called 12. Then if an interrupt occurs the maximum nesting depth will be exceeded. Or, if only 11 Sequences are nested when the interrupt occurs, but then the interrupting Sequence attempts to execute an XD or XI command, the maximum depth is exceeded.
9 Linearity Correction Whereas the calibration factors provide an overall stretching or shrinking of the size of a Calibrated Unit, the Automove System also contains a linearity correction mechanism to produce small regional adjustments over the entire travel of the motors. The motor travel is divided up into a rectangular grid. There can be up to twenty grid points along each axis, for a total of 20 x 20 = 400 grid intersections. The spacing between grid intersections can be specified. For Rev 3.
The values of and must be limited such that the maximum correction is in the range -4.000 to +3.9688 full steps in either axis. Recall that the size of a microstep is specified by the RE ("Resolution") command. You can specify 1.0000 through 32.0000 microsteps per full step. For example, the Automove factory default is 8.0000 microsteps per full step; at this value the and parameters can range from -32.0000 to 31.7500 microsteps.
Example The following sequence of commands sets a correction grid spacing of 4000 microsteps in each axis and then establishes X and Y corrections for each grid intersection up to 8000 microsteps in each axis (i.e. at 0, at 4000, and at 8000 microsteps in each axis): CR -1, -1, 4000,4000; CR 0, 0, 2, 3.5; CR 1, 0, -1, 4; CR 2, 0, -2, 6; CR 0, 1, 4, 7.75; CR 1, 1, -2, 6; CR 2, 1, 7, 6.5; CR 0, 2, 5, 6; CR 1, 2, -4, 6; CR 2, 2, 6, 5; Note: Some of the corrections are not whole numbers of microsteps (e.g. 7.
If or is not in the range -1 through 19 then the System logs an error and outputs 0,0. Reinitializing The entire XY Linearity Correction Table can be set back to its "factory default" state by sending the ESC.!8: command; see Chapter 6. In the factory default state all of the X and Y correction values are zero and the grid spacing is zero in each axis, which disables the linearity correction mechanism.
10 Using ACL Variables What Are Variables? The Automove System maintains 128 user-accessible storage locations for numeric values; these are called variables. Each location is referred to by an identifying number; the i.d. number can be in the range 0 through 127. Each variable can contain a value in the range -32768.0000 through 32767.9999. Note: If you have Release 3.48 or above, you may have 384 variables.
where is a variable i.d. After this command has been executed, the next ACL output command (OA, OC, etc.) sends its values into variable(s) instead of sending them to the host computer. specifies the first variable which is to receive a value. Subsequent values go into the next higher-numbered variable(s). For example: VC 11; OC; puts the current commanded X position into variable 11 and the current commanded Y position into variable 12.
executes Download Sequence 50 until the value of variable 5 is greater than 20. For a less-than-or-equal-to test: V> 5, 20; XU 50, 0, 1; executes Download Sequence 50 until the value of variable 5 is less than or equal to 20. (Note the 0 in the XU command; it means "execute until the V> is false".) Indirection And Indexing A form of "indirection" or "array indexing" is also available. For example, suppose variable 3 contains the value 17. Then the command: OV @3; outputs the contents of variable 17.
Multiplication and division are performed on normalized numbers. Multiplication gives 32 bits of precision in the internal result, and division gives 31 bits, but in both cases, the denormalization process may discard some of the precision. Multiplying two integers always gives the correct result, assuming that the result does not overflow the range -32768 through 32767.
Table 29 - Single-Variable Download Sequences ACL Commands: Comments: BD 0; VS 20, 0; ... ED; Execute this in the morning to clear the counter in variable 20. BD 1; ... V+ 20, 1; ... ED; This sequence performs the process and adds 1 to the counter. BD 3; OU"Total = ", 1; OV 20; ED; Execute this at the end of the day to "print out" the total count on an attached terminal or printer.
Counting the Number of Retries In this example, the workpieces are being fetched from a parts feeder. A microswitch attached to Digital Input 0 indicates "0" if a part was correctly fetched; otherwise the microswitch is "1". If the fetch fails three times in a row, the Automove will halt. Table 31 - Counting the Number of Retries ACL Commands: Comments: BD 0; XD 5, 0; ED; Repeat Sequence 5 indefinitely until there is a failure. BD 5; VS 44, 3; XU 6, 0, 1; ...
Timeouts and Flags In this application, the Automove system is waiting for an external event to occur, for example, a workpiece arriving on a conveyor belt. If the workpiece does not arrive within a certain amount of time, the Automove is to turn off a heater. Assume that the event is indicated by a "1" on Digital Input 7, and the heater is activated by a "1" on Digital Output 2. If the heater is turned off, the Automove clears a flag (i.e., changes the variable's value from 1 to 0).
Indexing and Parameters Suppose that you have a Download Sequence which performs some action. In the middle of that action, it needs to move to a specified X,Y location, and then complete the action. You wish to have the operator teach 4 different locations, with the Automove saving the locations for future use. Then, the Download Sequence performs the action in each of these 4 locations. In this example, we use an "index variable" -- a variable whose value indicates where to store the next location.
11 Appendix A Power Up Actions At power up, the machine establishes default values for certain commands, but (unless there is an Autostart sequence) does not apply power to the motors or move them. The defaults are established as though the IN and ESC.R commands had been executed, plus the following: • The Downloading mode is disabled, as though an ED had been executed. • The microstep resolution is set to the default value. (See the RE command.
Non-Volatile Memory Consistency Check At power up the Automove System checks its non-volatile memory for internal consistency. If any problems are found the System sends a "?" to the host, puts itself into the Emergency Stopped state, and sets a status bit that can be tested via the ESC.O command.
12 Appendix B Summary of Command Syntaxes ACL Commands Table 34 - Summary of Command Syntaxes Command Code Command AA , , Arc Absolute AB [] Anntibacklash Vectors AC [] Acceleration AD Abort Download Sequence Execution AM [] Arrow Mode AP [] Auxiliary Digital Port Select AR , , Arc Relative AS [] Auxiliary Speed AT [] Arm Timer AZ Absolute Z Axis Move BC [] Begin Continuous Pat
Command Code Command GD [] Lower Retractable Height Sensor GU [] Raise Retractable Height Sensor IN Initialize MA , Move Absolute MD [, [, [,, [, which2>]]]] Mid-move Digital Outputs - Changes MM [, [, ]] Multiple Mid-move - Digital Outputs Changes MN [,[, ]] Mid-move Digital Inputs - Response MR , Move Relative MT Move To Taught Point MZ Move Z (relative) OA Output Ac
PE , Personality PM [] Power Level of Motors PS Pause PZ [] Power Level of Z Motor RE [, ] Resolution SC , , [, ] Scale SO [, ] Set Origin SP , Set Position Counters SR [] Step Rate ST , Set Toggle Head Offset SZ Set Z Position Counter TD [] Toggle Digital Outputs TL [, , , ] Travel Limits VA , , , , Compute Vector Angle
XD [ [, ]] Execute Download Sequence XI , [, [,]] Execute If XU , [, ] Execute Until XW , [, ] Execute While ZM [,[, ] Z-axis Multiple Mid-move Digital Outputs 12-4 Appendix B
Escape Sequences Table 35 - Escape Sequences Command Code Command ESC.( or ESC.Y Programmed On ESC.) or ESC.Z Programmed Off ESC.! [] : ESC.@ [() ;()] : Change System State Set Communications Configuration ESC.B Output Buffer Space ESC.E Output Extended Error ESC.H [(Block Size or Xoff Thr>) : () : ()] : Set Handshake Mode 1 ESC.
13 Appendix C Summary of Error Codes ACL Errors These are reported by OE; see Chapter 3. Table 36 - ACL Errors Code Error Description 0 No ACL error has occurred since the last OE. 1 An unrecognized mnemonic has been received. 2 The wrong number of parameters has been received. 3 An out-of-range parameter has been received. 4 The X, Y, or Z Home switch was not found within 32767 motor steps during an FH or FZ command.
Communication Errors; These are reported by ESC.E; see Chapter 6. Table 37 - Communication Errors Code Error Description 0 No communications error has occurred. 10 An output command was received while another output command was executing. The original command will finish normally; the second one will be ignored. 11 An invalid character was received after the first two bytes, ESC and period, of an escape sequence. 12 An invalid character occurred in the parameter list of an escape sequence.
14 Appendix D Summary of Personality Parameters Table 38 - Personality Parameters Personality Parameter/Description Factory Default 1: Arrow Single Step Delay 3000 2: Arrow Slow Step Delay 100 3: Arrow Fast Step Delay 3 4: X Arrow Direction Swap 0 5: Y Arrow Direction Swap 0 6: First Find Home X Back Off Distance 250 7: First Find Home Y Back Off Distance 250 8: First Find Home X Seek Step Delay 2 9: First Find Home Y Seek Step Delay 2 10: Second Find Home X Back Off Distance 100 11:
29: X Motor Direction 0 30: Y Motor Direction 0 31: Z Motor Direction 0 32: Default Acceleration 33: Default Step Rate 34: Alternate Acceleration 35: Alternate Step Rate 10000 193 20000 36: Digital Inputs Trigger Enable 0 37: Digital Inputs Function Select 0 38: Digital Input Sense 39: Autostart Sequence I.D.
15 Appendix E Speed Considerations System Elements A motion control system consists of several elements: the host computer, the RS-232C interface, the Automove System's internal processors, and the physical motor/load system itself. In general, the act of moving the carriage at a controlled acceleration and slew speed takes so much time that the speed of the other system elements is not a concern.
The precomputation time increases by about 0.5 millisecond for each character transmitted by the host during the precomputation. Due to the nature of the input handshakes (see Chapter 5) these characters tend to be transmitted in bursts. Thus any given vector or arc may take significantly longer to preprocess than its neighbors; this extra delay is very difficult to predict, but there is a way to eliminate most of the unpredictability. (See Tricks, below.
Throughput When system vector and arc throughput is a consideration, there are two interesting special cases. The first, Case I, is a one-time startup delay at the beginning of a sequence of moves. It can be diagramed as follows, where the time axis is left-to-right: CASE I -- STARTUP A B ----host----> computation C D ----RS-232C--> transmission ---Automove---> precomputation --- Move . . .
CASE II -- STEADY STATE A B --host--> comp C D -- next-move host comp E ... F -RS-232C-> xmit -precomp-> -Wait-> ... previous move execution ---------->-3 mSec->-- move ... exec. This case is similar to the first, with the addition of the delay between time D and time E, during which the Automove System waits for the physical execution of the previous move to complete. The last 3 milliseconds of precomputation cannot occur until after E.
Tricks If it is crucial that a particular short sequence of ACL commands be executed at a consistent rate each time, or with a minimum of delay between commands, the following trick can be used. Using the PS command or the ESC.! command, place the Automove System into the Paused state. Then send the critical sequence of ACL commands, being sure that the first one is some sort of a "motion" command (or OA or OS or CD or WD ...) that does not execute if the System is Paused.
16 Appendix F Choosing a Handshake The decision about which handshake to use for a particular application must be based on a number of factors. Asymtek can only make general recommendations; the final decision must be made by the customer. If your host computer's application or driver ("BIOS") software already supports one type of handshake, the decision may be easy to make. Also, if you decide to use Asymtek's programming software, you do not need to make this decision.
Certain host software structures may be able to use Enq/Ack where they cannot conveniently use Xon/Xoff, and vice-versa. For example, is the host software able to test whether an Xoff character has been received, without actually hanging up waiting for one to arrive? The Software Checking handshake should probably only be used as a last resort.
17 Appendix G Example Program Here is a simple BASIC program for controlling the Automove System from a Hewlett-Packard Series 200 computer. This program asks the user to enter 5 points with the TEACH button; then it "plays back" the 5 points. In this version of the BASIC language, the "!" character indicates that the remainder of the current line is a comment. Variable names can have many characters; this program uses variables with the names Rs232, Ans$, Esc$, X, Y, Comma, and Dummy.
270 PRINT "Point #";I;" X=";X(I);" Y=";Y(I) 280 NEXT I 290 !------------------------------------------300 ! Now play the 5 taught points back: 310 !------------------------------------------320 PRINT "Press RETURN to play the points back." 330 BEEP 340 INPUT Dummy ! wait for him to press RETURN 350 OUTPUT Rs232;"SR4000;"; ! step rate 4000 360 FOR I=1 TO 5 370 OUTPUT Rs232;"MA";X(I);Y(I);";"; ! vector 380 OUTPUT Rs232;"WA 0.5;"; ! wait 1/2 sec. 390 NEXT I 400 PRINT "All moves now in Automove buffer.
670 680 690 700 710 720 730 740 750 760 770 780 790 Appendix G ! if status has another "?", ignore it: IF Ans$[1,1]="?" THEN Ans$=Ans$[2] Stat=VAL(Ans$) IF (Stat DIV 512) MOD 2=0 THEN 730 PRINT "Motor slip has occurred." STOP IF (Stat DIV 16) MOD 2=0 THEN 760 PRINT "Emergency Stop has occurred." STOP OUTPUT Rs232;"OE;"; ! request ACL error ENTER Rs232;Ans$ ! read the error code PRINT "An ACL error ";Ans$;" has occurred.
18 Appendix H When it Doesn’t Work: Debugging When you think you've done everything right but it still doesn't work, you need to debug. Here we suggest a few ways of tracking down problems. Nothing Happens Check that the Automove power is on and that the RS-232C cable is firmly plugged in on both ends. If you supplied your own RS-232C cable, check the wiring. (See "The RS-232C Interface" in Chapter 5.) Make sure that the host computer is actually sending characters to its RS-232C port.
Be sure the machine is not in the Downloading mode; it gets in this mode when you send the BD command. To be sure it isn't, turn the power off, then back on. Be sure you have not inadvertently put the machine in the Programmed Off state by sending ESC.) or ESC.Z. Check the values of any personality parameters you have changed. If they are incorrect the Automove System may be physically disabled and give no other indication.
If vectors are going fast when they should be slow, or antibacklash vectors have disappeared, look for a VM command. Again, it is a good idea to send the IN command at the beginning of each move sequence. The Carriage Crashes Into The Sides Make sure your program does a Find Home operation at the start, or do a manual re-reference by pressing FAST with GO TO ORIGIN. Make sure the travel limits have been set correctly for the size of your platen and the resolution; use the OL and TL commands.
If you are using Hardwired DTR, be sure the Automove's Pin 20 is connected to the host's Pin 4 or Pin 5 (if the host is a DTE) and that either the interface hardware or the software stops transmitting when this handshake line goes low. If you are using Xon/Xoff or Enq/Ack, be sure you have sent the correct escape sequences to set up the handshake; see Chapter 5 and 6. Also be sure your host software responds quickly to the particular Xoff character you have set up in the Automove System.
19 Appendix I Revision History 0.1 9/22/84 First edition. 0.2 10/4/84 FS becomes FH. Add VM and true-speed vectors. Allow parameters to be defaulted on many commands. MD's is never output before . Improve speed resolution. Travel limits default per platen size. 0.3 10/26/84 All time parameters are in seconds (affects CZ, WA, WD). Add the AB command, bit 2 of VM, and the parameters of CD and MD.
2.0 11/10/85 First shipped with 2.0/2.0 ROMs. Add the AM, AZ, and PD commands. Add bit 10 of the FP command. Add personality parameters 40 through 47. Decrease Z axis travel from 65535 to 32767 steps. Add Z axis Arrows. Add bit 7 of OS. Personality parameters are always "permanent". Decrease input buffer from 512 to 256 characters. 2.1 4/22/86 First shipped with 2.1/2.1 ROMs. Add the SZ, XU, and XW commands. Add the and parameters to FH and FZ. Add "ESC.S5;N:".
3.1 12/3/89 Add bit 10 of personality parameter 37. Eliminate the interdependence between the Digital Inputs and the Program Select thumbwheel and GO button. 3.2 7/11/90 Add ACL variables with the following ACL commands: SC, OV, VA, VC, VL, VR, VS, VT, V<, V=, V>, V+, V-, V*, V/, V&, V|, V!. Add Chapter 10. Add the parameter to the BP command, along with the OG command. Add the ES and OU commands.
3.60 19-4 11-06-95 Added AT, OX, ST, ZM, & * commands. Removed MC & MS commands. Modify MN commands for OR’ed inputs. Add PEP 59 for PAUSEd valve shutoff. Add PEP 60 for Interlock control. Add ESC.!35: to be used for ESC.!5,6,7,8 &9 Add ESC.Vn: and ESC.Wn;v: Remove need to press reset when new EPROMS installed.
20 Index 7 data bits, 5-1 absolute location, 3-38 absolute moves, 3-19, 3-49 acceleration, 1-6, 3-4, 3-10, 3-68 acceleration and deceleration phases, 3-68 Acknowledge String, 5-5, 6-8 ACL commands, 1-1, 1-5, 1-6 ACL variables, 1-6 Actual position, 3-51 Alternate Acceleration, 7-7 Alternate Step Rate, 7-7 Antibacklash Vector X Offset, 7-5 Antibacklash Vector Y Offset, 7-5 antibacklash vectors, 3-3, 3-13 Arrow Fast Step Delay, 7-3 Arrow Single Step Delay, 7-3 Arrow Slow Step Delay, 7-3 ASCII, 1-1 Autostart Se
half-stepped, 3-27 handshake, 1-2, 5-3, 16-1 High True, 7-10, 8-1 Home position, 1-2, 3-54, 3-67 Immediate Response String, 5-5 Initialized status bit, 3-37, 3-56 Intercharacter Delay, 5-5, 5-6 Interlock Control, 7-14 linearity correction, 9-1 Linefeed, 1-4, 1-5, 5-2 Logic Sense, 7-10, 8-3 Low True, 7-10 Memory Enable switch, 3-61, 7-1 microsteps, 1-3, 3-64 motor rotation, 1-6 Motor Slipped state, 3-25, 3-62 Motor Slipped status bit, 3-25, 3-37, 3-56 move sequence, 3-19 nested patterns, 3-52, 13-1 nesting,
Z axis modulus, 3-26, 3-49, 3-50, 3-59 Z head identification code, 7-14 Index Z Motor Direction, 7-7 20-3