DC2 FIRMWARE PRECISION MICROCONTROL CORP. COPYRIGHT 1989-1996 ALL RIGHTS RESERVED DESCRIPTION OF VERSION PM1 ========================================================================== Generic version DESCRIPTION OF VERSION PM2 (to build: set NETWORK in CONF1X0.INC) ========================================================================== Generic version with networking capability on serial port. Channels 8,10,12 and 14 are used for board select ID (14 is LSB). Channels 9,11,13 and 15 forced to output low for use in driving input channels through shorting blocks installed on J3. The serial port defaults to tri-state condition on power up or reset. Any bytes sent to serial port with the MSBit set are interpreted as a board select ID. If the low nibble of the ID byte matches the select channels, the serial port is enabled. Otherwise, the serial port is disabled. A selected board will communicate to the serial port in the normal fashion until deselected. An ID byte of 80 hex will select all boards. Prior to selecting all boards, each board should have its echo turned off (EF) and its Xon and Xoff codes set to 0 (XN0,XF0). When all boards are selected, no tell commands should be issued. INSTRUCTIONS FOR INCLUDING MACROS IN ROM ========================================================================== Set conditional assembly switch MACINROM in CONF1X0.INC file to include code for initializing macro pointer table. Reset ARCMODE switch to exclude arc mode code from firmware, this allows storage of macros in the memory range 7000h - 7FFFh. Use CMDHEX DOS utility program to convert macro command file to file containing hex records that can be appended to firmware file. The parameters used when running CMDHEX utility specify where the ROM macros will be stored in memory. These same values must be used in the equate statements for ROMTBL and ROMMAC in the CONF1X0.INC file. CHANGES FOR REV 1.0a ========================================================================== 1/22/90 DC2 circuit board first available. Made backup of firmware for wirewrap board. Began making code changes to support production DC2 board. 2/2/90 Changed code to use amplifier enable signals of DC2. 2/5/90 Changed 78310 debug monitor code to communicate over DC2's PC interface. For data input, data written to DC2 by PC causes RDYIN to go low, causing 78310 external interrupt 2. For data output, DC2 code polls RDYOUT until PC ready for new data. Created DC2CNTRL program for communicating to DC2 over PC interface. Implemented /L runtime option to allow loading hex files to DC2 board. 2/7/90 Changed code to use 78310 Time Base Counter to generate 1 milli- second interrupts. Previous code used Timer 1 to generate 500 microsecond interrupts (one axis updated each interrupt). New code services both axis on one interrupt. This change was done to free Timer 1 for stepper control. Deleted interrupt flag variable. Deleted busy bit from motor status. 2/7/90 Integrated DAC outputs into PID loop. 2/13/90 Changed command subroutines to be compatible with 'C' function calls. Seperated command interpreter into two functions. The command interpreter parses ascii strings and converts to binary equivalent in command buffer. The command executor processes binary commands in a buffer and calls the appropriate command function. The repeat and macro commands are handled by the executor directly. Doing so, makes nested macros very easy to implement. The command executor is simply called recursively. 2/16/90 Implemented Wait and Wait Stop commands in file MOTCMD. 2/17/90 Created Tell Macro command in file CMDINT. 2/17/90 Began writing register commands in file REGCMD. 2/18/90 Implemented stepper motor control axes 3 and 4. Firmware uses timers 0 and 1 to generate interrupts at the end of each period. 2/27/90 Changed PID algorithim to calculate 32 bit position error and test it against maximum. This will catch position errors that exceed 16 bit. 2/27/90 Added Gain and Torque modes to controller functions. Created Gain Mode (GM) and Torque Mode (TM) commands to allow setting of new modes. 3/2/90 Fixed bug in command executor that caused stack crash. Old code did not remove parameters from stack after function calls. 3/4/90 Added commands AA,AS,AN,AO,AE,SL,SR,RB,RW,RL,WB,WW and WL. Changed mnumonic for setting deceleration from SR to SB. 3/6/90 Embedded data I/O into DC2 software. Code place in file DATAIO.ASM. 3/8/90 Changed Move Absolute and Move Relative commands to change servo target even if motor is off. This is necessary for teach mode. 3/8/90 Switched code that tells trajectory generator position to TO command. 3/8/90 Cleaned up command source code headings. Standard format is: COMMAND #: NM - DESCRIPTION 3/8/90 Implemented digital I/O commands: TC,CI,CT,CN,CF,CH and CL 3/9/90 Reorganized internal RAM to make room for new servo parameters. Placed stepper target and position in monitor data area. Monitor can still be used, just don't turn on steppers. 3/9/90 Created MSCCMD file for miscellaneous commands. 3/12/90 Changed encoder setup to use capture mode to save encoder count when Time Base Counter generates interrupt. 3/12/90 Implemented encoder indexing by capturing count on rising edge of clear input. This value is the used as an offset in TP,TT, TO,MA and GH commands. Low word of index is maintained in capture register. High word is saved in internal RAM with other servo parameters. 3/15/90 Implemented limit switches, including commands LM, LN and LF. 3/19/90 Created Arc mode for circular contouring. New commands AX, AY, RAdius and AnGle. CHANGES FOR REV 1.1a ========================================================================== 4/12/90 Implemented commands DN,DF,WN,WF,IN,IF,IS,IC,IE,IU,IG,IB,WP and WR. Added code to set/clear busy flag in PC status register. Added support for pause of command interpreter by space bar. CHANGES FOR REV 1.2a ========================================================================== 4/17/90 Changed absolute memory locations to provide full 16k for point storage and 8k for macro storage. Moved load address for code so that first 16 points could be used without conflicting with code in RAM. 4/25/90 Created DC2.MAK file for use with Microsoft NMAKE utility to automate building of firmware. 4/26/90 Implemented Binary Mode command interface. 4/26/90 Implemented Tell Error command to report last error code. 4/27/90 Modified RB,RW,RL,WB,WW and WL commands to accept axis specifier which permits access to servo variables. 4/27/90 Modified code and make file to differentiate betweem PC100, PC110 and PC140 versions of board. PC100 = DAC output PC110 = PWM output PC140 = DAC and PWM output 4/27/90 Changed Accumulator load Indirect (AI) command to Register to Accumulator (RA). CHANGES FOR REV 1.3a ========================================================================== 5/21/90 Added instructions to catch velocity changing sign when decelerating in velocity mode. Previous code would get trajectory jump of 32,000 when velocity was set to 0. See code at label DECVEL: in file VLPROF. 6/11/90 Changed default baud rate setting to match 16.384 crystal. Note that baud rate numbers in manual were wrong even for 16.0 crystal. 6/11/90 Added linear interploation for two servo axes. Uses Syncronization oN (SN, code=170) command to enable function, No Syncronization (NS, code=171) command to disable. Calculations are done prior to starting motion to determin axis that is moving greater distance. That axis is used as master, the other axis is used as slave. Calculations are done to adjust both axes' velocity and acceleration so that resulting vector velocity is equal to desired. Vector acceleration, deceleration and velocity are set with new commands VA (code=173), VB (code=174) and VV (code=172). CHANGES FOR REV 1.4a ========================================================================== 6/22/90 Implemented coil winding mode. Uses aCMn command to cause axis 'a' to act as the traverse feed, while the other axis is the spindle. The command parameter 'n' is the last entry in a pitch table located in point memory. The pitch table consists of 16 byte entries containing spindle position, traverse position, pitch ratio and 4 bytes of unused space. CHANGES FOR REV 1.5a ========================================================================== 6/27/90 Moved code that sets Busy bit in status register. New code will set busy flag when first byte of new command is received. This prevents race condition between DC2 setting bit and host checking bit after sending last byte of command. 6/27/90 Modified Attention register function to include changing of mode to binary if not currently in that mode. This provides easier switch into binary mode from default ascii mode. Added code to disable interrupts in BINOUT routine where access to attention register might conflict. Moved BINOUT routine from CMDINT file to DATAIO file. 6/28/90 Implemented JumP to command absolute (JP, code=6) and Jump to command Relative (JR, code=7) commands. Modified command executor to check for macro commands as a group, before testing for specific commands. This will speed up non-macro command execution. 6/28/90 Added conditional assembly around version string so that board type will be included (ie. PC100, PC110, etc.) CHANGES FOR REV 1.5b ========================================================================== 7/27/90 Moved instruction to release DAC reference to after initializatio of DAC's. 7/27/90 Fixed code for ABort command on axis 2. Previous code set target of axis 1 instead of 2. 7/27/90 Added instructions to GM, QM, PM and VM commands to clear CMODE flag in status word. 7/27/90 Fixed code for Shift Left and Shift Right commands. Previous code only shifted accumulator 1 bit, regardless of command parameter. CHANGES FOR REV 2.0a ========================================================================== 1/27/91 Changed source code to be compatible with new version of assembler. 2/2/91 Removed coil mode, unimplemented CM command. 2/2/91 Changed file name CTRCMD to LINCMD to better reflect what commands are implemented in the file. 2/2/91 Created Linear Interpolation Mode flag in status word. This is the mode used to cause the slower axis to track the faster axis in moving towards their respective targets. 2/2/91 Implemented Slave Mode (SM, code = 26) as a user command. The parameter to this command specifies the ratio that the specified axis will track the other axis true position. The command parameter specifies a ratio between 0 and 1. A parameter of 0 is interpreted as 1:1. Use 0SM to disable slave mode for all axes. 2/2/91 Fixed initialization of axis 2's DAC output in startup code. 2/2/91 Added code to set digital I/O to inputs during startup code. Moved instructions that adjusts output register (amp. enables and status bits) closer to start of code. These changes make RT command similar to hardware reset. 2/2/91 Fixed Tell Channel command for binary mode when all channels are requested. This is a special case where the DC2 copies the state of all digital I/O directly to the reply buffer as 2 bytes. Previous code did not take into account active level of channels (CH and CL commands), new code does. 2/2/91 Added instructions to disable interrupts in GO command where output register is being updated. 2/2/91 Changed code in WP and WR commands. In old code, when high word did not compare, DC2 waited for encoder to change before re-enabling hardware compare. This is not necessary according to 78310 spec. which indicates that status bit will be set on input clock after comparison. This means count will be different when status is set and compare can be re-enabled immediatly. Also changed incorrect comment in code referring to the way index is subtracted from command parameter to make breakpoint. 2/2/91 Corrected initialization of Serial Error Interrupt Control register to mask interrupt. 2/2/91 Removed incorrect instructions in Motor On command that cleared status bit in the wrong location. No visible problem with old code, just clean up. 2/2/91 Removed unused variables from internal RAM area: BUFOUT, STSFL2, BRADDR, USERSP, USERPC, USRPSW, BRKFLG and STSFLG. These were leftover from monitor program that is no longer used. This frees up space in internal memory for future use. 3/5/91 Implemented Accumulator Multiply (AM,code=135) and Accumulator Divide (AD,code=136) commands. Modified long division subroutine used in linear interpolation to be compatible with Accumulator Divide command. 3/5/91 Changed command mnumonic for Set Braking command from SB to DS. The new mnumonic stands for Deceleration Set which matches the function of the command and is the mnumonic used in other PMC products. The SB mnumonic will be accepted by the DC2 as an alias to the command, but the manual will be changed to use the new command name. 3/6/91 Implemented Interrupt on Position and Interrupt on Relative position commands. At present these commands only set the breakpoint status bits, no PC interrupts are generated. Created BKPNT variables to hold most significant word of breakpoint. 3/6/91 Moved TIMER variable to internal ram for faster interrupt service. 3/6/91 Added Tell index position (TZ,code=90) and Tell Breakpoint position (TB,code=91) commands. 3/7/91 Added Convert register to Ascii command (CA,code=129), buffer address returned in register 0. 3/11/91 Changed command mnumonic for Vector Braking command from VB to VD. The new mnumonic stands for Vector Deceleration Set which matches the function of the command. The VB mnumonic will be accepted by the DC2 as an alias to the command, but the manual will be changed to use the new command name. 3/11/91 Added code to split interrupt service into two phases. Axis 1 errors will be tested when the INTPH bit in STSFL1 is clear, axis 2 when the bit is set. This was done to reduce interrupt service time. 3/11/91 Added test for axis number 0 (all) in motor commands that reqire one axis to be specified. DC2 will now an return error code in these cases. 3/11/91 Changed command interpreter to return a "Axis number out of range" error code when an axis number greater than 4 is specified. Previous version returned a "Commnad not valid" error code. 3/11/91 Added instructions to clear the busy flag when the attention register is accessed and the DC2 is receiving a command. This will force a complete clear of the binary mode. See label PCABIN in DATAIO.ASM. 3/14/91 Modified RB,RW,RL,WB,WW,WL,FI and FE entries in command tables so that axis number is included with tell macro display of these commands. 4/10/91 Updated HElp command to reflect mnumonic changes. CHANGES FOR REV 2.1a ========================================================================== 5/15/91 Implemented full featured circular contouring capability. Axis 1 is assumed to be X axis, axis 2 is Y. Angle convention is same as compass. Positive Y axis is at 0 degrees, positive X axis is at 90 degrees. Angle is measured in 1048576 units/rotation. The following commands are used: AX - Arc center X (code=180) AY - Arc center Y (code=181) RD - Arc Radius (code=182) or RX - Arc Radius X (code=184) and RY - Arc Radius Y (code=185) AG - Arc starting anGle, also places DC2 in ARC mode (code=184) 5SV - Set Velocity along arc 5SA - Set Acceleration along arc 5DS - Set Deceleration along arc 5MA - Move Absolute on arc 5MR - Move Relative on arc 5TO - Tell optimal position along arc 5TO - Tell target position along arc PM - Takes DC2 out of arc mode, restore velocities and accelerations CHANGES FOR REV 2.2a ========================================================================== 6/13/91 Fixed Feed-Forward gain calculation. Code added in previous version for circular contouring, incorrectly disabled calculation for all modes except arc mode. 6/13/91 Fixed linear interpolation mode. In previous versions, GO command didn't disable interrupts between starting master and slave axes. When axis 1 is master, no problems were evident. When axis 1 is slave, and interrupt occured after axis 1 was started, but before axis 2, axis 1 would jump to target with no trajectory. 6/13/91 Modified trajectory generator to properly handle moves with high acceleration and deceleration rates. Code change originaly done 2/6/91 but not used because of intermittant failure (motor would turn off during move). Believe this to be caused by problem in linear interpolation GO command, which has now been fixed. CHANGES FOR REV 2.3a ========================================================================== 6/14/91 Implemented Capture Position (CP, code = 212) command. This command can be issued specifying one or both axes. The Capture flags in the respective servo status words will be set. This will cause the current position for those axes to be copied to point memory every servo update. The parameter to this command is the number of points to be collected. The Capture flags will be cleared when the specified samples have been taken. Because of timing limits, this function should not be enabled when trajectory generators are running. Use the Display Captured data (DC, code = 213) command to retrieve the captured data. The parameter to this command is the data index. 6/15/91 Added commands to switch to High Speed (HS, code = 206) servo loop, and then back to Low Speed (LS, code = 204) servo loop. Currently high speed servo loop runs at 8 Khz. for one axis only no traj. control. 6/17/91 Changed PID loop to turn integral off during move. This appears to be the preferred way. This has the added benefit of freeing up more cpu time during move. 6/18/91 Made following chanes to trajectory generators in TRPROF and ARPROF: Added instruction to ramp down code to catch position moving to alternate sides of target with each update. Fixed instructions testing for velocity below deceleration level at CHKZER label. Added instruction to clear ACCMD flag when move is done. CHANGES FOR REV 2.4a ========================================================================== 8/5/91 Implemented Jog velocity control based on analog inputs. Also used for tension control applications. Added 4 new commands to adjust jogging/tension control: JG - Jog Gain (code=220) JD - Jog Derivative (code=221) JO - Jog Offset (code=222) JB - Jog deadBand (code=223) CHANGES FOR REV 2.4b ========================================================================== 8/29/91 Added code to Motor oFf command to disable trajectory generator. Previous versions of code left trajectory generator running which caused Servo to jerk when Motor oN command was issued. CHANGES FOR REV 2.5a ========================================================================== 9/12/91 Changed mnemonic for Capture Position (CP) command to Position Record (PR). Also changed Display Captured (DC) command to Display Recorded (DR). Command codes stay the same. Referring to the saving of servo positions every millisecond as "recording", will avoid confusion with new "capture" function. PR - Position Record ennable (code=212) DR - Display Recorded position (code=213) 9/12/91 Implemented "capture" of servo positions when Non-Maskable Interrupt input makes negative transition. Added three new commands to support this feature: PA - Position capture Arm (code=217) PD - Position capture Display (code=218) DA - position capture Display & Arm (code=219) POSCAP flag (bit 2) added to servo status to indicate when position has been captured. CHANGES FOR REV 2.6a ========================================================================== 10/10/91 Added code to Motor oN command to zero derivative of following error. Previous versions of code left value unchanged which caused servo to jerk when Motor oN was issued after servo was turned off during a move. 10/10/91 Moved system variables out of point memory where they were incorrectly placed in version 2.0. Previous versions of code should not use LP,LT and MP commands with parameters between 32 and 95 inclusive. See DC2E.DR file. 10/10/91 Updated HElp command to reflect mnumonic additions and changes. 10/11/91 Removed Handshake oFf and Handshake oN commands from command table until they are implemented. CHANGES FOR REV 2.7a ========================================================================== 10/17/91 Fixed code at CHKZER: in arc mode trajectory generator. 10/17/91 Moved or created following servo status flags: BIT 2 = Position Captured (POSCAP) BIT 14 = Record Position Enabled (RECORD) BIT 15 = Syncronization On (SYNC) BIT 23 = Linear Mode (LMODE) 10/17/91 Implemented contouring mode. Added Contouring Mode (CM, code=27) and Tell contouring indeX (TX, code=88) commands to support new mode. Servo motion in contour mode is accomplished using axis 6 with the SV, SA, DS, MA, MR, ST and AB commands. Positions along the contour are stored in point memory using the LP and LT commands (up to 2048 points). Move commands refer to motion along a line connecting the points. To specify a 32 bit position on the contour, the upper 16 bits are the table index, the lower 16 bits specify the proportion of distance between the current point and the next point using linear interpolation. Contour mode velocity is in terms of time between points. The fastest velocity is 1 point per millisecond. 10/18/91 Moved position recording area to coincide with point memory. This provides space for 8k points (8 seconds) to be recorded. 10/18/91 Added instructions to save trajectory in addition to position when recording is enabled. Added command to Display recorded Optimal position (DO, code=214). 10/21/91 Changed servo filter speed select command codes: Low Speed (LS, code=230) Medium Speed (MS, code=231) High Speed (HS, code=232) 10/24/91 Modified high speed servo filter code to run faster. 10/25/91 Modified BINOUT: routine in DATAIO.ASM to better handle commands being canceled. 10/25/91 Removed unused code from INTVECT.ASM 11/6/91 Added special operation to Read Byte command for getting Analog input values into accumulator. If the parameter to the RB command is in the range 10001 - 10004 hex, the input on the respective analog channel will be converted and placed into the accumulator. CHANGES FOR REV 2.8a ========================================================================== 8/6/92 Implemented host interrupts in binary command protocol. Interrupt line will be activated when DC2 has a reply or is ready for next command. Interrupt line will deactivated when reply is received by host, a new command is issued, or the Attention register is strobed. Issue a Enable Interrupts (EI, code = 124) command to enable or disable this feature by using a parameter of 1 or 0 respectively. !!!! Note that interrupt line defaults to low after reset. This may interfere with other devices on PC bus that use IRQ5 (like MS Bus Mouse). If this is a problem, lift pin 15 of U17 on the DC2 board out of the socket. 8/6/92 Implement DTR output on serial interface including Handshake oN and Handshake ofF commands. 8/7/92 Modified command executor so that if a Macro Define command is issued as the only command, it will undefine the specified macro. CHANGES FOR REV 2.9a ========================================================================== 8/11/92 Implemented networking of serial port. Due to conflicts with other board functions, networking will only be enabled in version PM2 of the firmware. See the description at the top of this file. CHANGES FOR REV 2.9b ========================================================================== 9/14/92 Changed limit switch criteria in TBCINT.ASM so that they function in all modes. Direction of servos will only be considered in position mode. CHANGES FOR REV 3.0a ========================================================================== 7/2/93 Removed unused Minimum Length Table at label MNLTBL: in CMDTBL.ASM to make room for more code. Changed label of Maximum Length Table from MXLTBL: to FLGTBL: for Flag Table. This table contains a single byte for each command code. The only flag include is this table indicates whether the axis number should be displayed with commands during Tell Macro command. 7/3/93 Implemented Tell Torque (TQ, code=209) command to report current value being sent to Analog Output DAC (+/-2047) or Motor Drive PWM channel(+/-127) for each servo axis. This 16 bit value is stored at offset 56 in the servo tables. The Operator's Manual currently specifies that Actual Velocity is stored at this location in the servo tables, but it has never been implemented. In future revisions of the manual it will be changed to TQOUT ;Torque Output. The value stored at offset 56 in the servo table, and reported by the TQ command, is independent of the PHase of the servo axis. 7/3/93 Modified PID code to allow for Following Errors in excess of 32767. The following error value stored at offset 48 in the servo table, and reported by the Tell Following error command, will not exceed + or - 32767. By using the SE command to set the maximum position error to 32767, following error checking can be disabled. 7/3/93 Implemented set DeadBand (DB, code=118) command. The deadband value provides a range around the servo's desired position where the following error will be set to 0. When the servo position reaches the boundry of the deadband range, the following error will increase from 0 (see graph below). Deadband is only in effect while the servo is not moving. following error | x | x | x | x e | x e | x e -------e-e-e-exe-e-e-e-------- pos.error e x | e x | e x | x = following error with deadband equal 0 x | e = following error with non-zero deadband x | x | This feature is commonly used to elliminate chattering of servos in systems with gear backlash. 7/3/93 Made the active level of Limit Switch inputs software configurable. By adding 128 to the parameter of the Limit Mode command, limit switch inputs will be configured as active high instead of default active low. 7/7/93 Modified Move to Point command to perform linear interpolated moves when syncronization is on. The VV, VA and VD commands must be used to set the velocity and accelerations prior to motion. The GO command must be issued after the MP command in order to start motion. CHANGES FOR REV 3.1a ========================================================================== 5/31/94 Added PWM drive code to implement Enable Chopping of H-bridge. This code is only for experimentation, and is commented out at this time. Look for conditional assembler statements that include BICHOP and ENCHOP. 5/31/94 Moved Derivative Error (DERR) variables from internal to external RAM to make room for Output Offset value (see below). 5/31/94 Created Output Deadband command (OD, code=195) and internal variables to hold the values for each servo axis. This value modifies the motor drive and analog outputs. It is added to positive outputs, and subrtacted from negative outputs. The purpose of this parameter is to simulate a frictionless servo systems. The output deadband value is stored at offset 58 in the servo table. 6/6/94 Moved Integral Error (IERR) variables from internal to external RAM to make room for Target Delay value (see below). 6/1/94 Removed PWM Enabled flag in servo status and replaced it with At Target flag. Changed function of Deadband value to be position range for determining when servo is at target. Implemented At Target Delay (DT, code=197) and Wait for Target (WT, code=198) commands. The parameter to the At Target Delay command specifies the period that the servo must be within the deadband before the At Target flag will be set. If the servo moves outside the deadband at any time, the flag will be cleared and the delay period will be restarted. The Wait for Target command will stay in effect until the At Target flag is set for an uninterrupted period of time specified by the parameter to the Wait for Target command. The At Target Delay value is stored at offset 60 in the servo table. CHANGES FOR REV 3.1b ========================================================================== 4/10/95 Fixed initialization of MXTRQ2 in START.ASM. CHANGES FOR REV 3.2a ========================================================================== 2/13/96 Fixed backspace for serial interface, previous code would not echo backspace over first character in buffer. 2/13/96 Fixed command codes for XN and XF. Codes were reversed in previous revisions. 2/13/96 Removed XON and XOFF characters for PC ascii interface. Implemented Prompt Character (PC, code=128) command for both PC and serial interfaces. Default prompt character for both ports is '>'. CHANGES FOR REV 3.3a ========================================================================== 12/12/96 Created ARCMODE switch for conditional assembly statements to optionally include Arc Mode capability in DC2 firmware. Excluding this code provides room in ERPROM for ROM based macros. Created MACINROM switch to optionally include new code to support storing of user macros in ROM. These switches are Set or Reset in the CONF1X0.INC files, which are copied over the CONF.INC file when the firmware is built. See note at the beginning of this file for information on building firmware that includes ROM based macros. 12/16/96 Commented ou places in code where PC100, PC110 and PC140 conditional assembly switches were used. This was done because all DC2's are shipped with PC140 firmware, and the assembler can only support 6 switches total. Moved NETWORK conditional assembly switch to CONF1X0.INC files. CHANGES FOR REV 3.3b ========================================================================== 12/26/96 Fixed Slave Mode command so that commands following it are executed. Previous code altered RP5 and RP7 which caused command loop to abort the rest of the command sequence. *************************************************************************** DC2 notes: 2/7/90 DAC outputs wrap around if Set torQue command not used to limit value written to DAC. May want to have maximum limit set depending on type of output. 2/16/90 Wait Stop command implemented by waiting for all motor's trajectory complete bits to be set and then waiting specified period. No consideration for the fact that the motors may already have been stopped when command executed. May want to modify code to maintain stopped timers for each axis.