background image

SMAC

                                                               LAC-25 Technical Reference Manual

49

Command:

AEn

-- Exclusive-Or Accumulator with 'n' --

Argument:

-2,147,483,647 <= n <= 2,147,483,647

This command causes the result of an exclusive-OR of the accumulator  with 'n' to reside i n

the accumulator.

Command:

ALn

-- Load Accumulator with 'n' (Signed) --

Argument:

-2,147,483,647 <= n <= 2,147,483,647

This command causes the accumulator to be loaded with the value 'n'.

Command:

AMn

-- Multiply Accumulator by 'n' (Signed) --

Argument:

-2,147,483,647 <= n <= 2,147,483,647

This command  does a signed multiply of the 32 bit contents of the  accumulator  and  'n',

leaving the lower 32 bits of the 64 bit product in the accumulator and the upper 32 bits in
Register 1.

Related Commands: AD

Command:

ANn

-- And Accumulator with 'n' --

Argument:

-2,147,483,647 <= n <= 2,147,483,647

This command  causes the result of the accumulator  ANDed with 'n' to reside in  the

accumulator.

Command:

AOn

-- Or Accumulator with 'n' --

Argument:

-2,147,483,647 <= n <= 2,147,483,647

This command  causes the result of the accumulator  ORed with 'n' to reside in the

accumulator.

Command:

ARn

-- Copy Accumulator to Register 'n' --

Argument:

0 <= n <= 511

This command causes the value in the accumulator to be copied to Register 'n'.

Related Commands: RA

Command:

ASn

-- Subtract 'n' from Accumulator (Signed)

Argument:

-2,147,483,647 <= n <= 2,147,483,647

This command causes the value 'n' to be subtracted from the accumulator.

Summary of Contents for LAC-25

Page 1: ...SMAC LAC 25 TECHNICAL REFERENCE MANUAL Revision 3 4 February 1998 SMAC CORP 5807 Van Allen Way Carlsbad CA 92008...

Page 2: ...S M A C 5807 VAN ALLEN WAY CARLSBAD CA 92008 PHONE 1 760 929 7575 FAX 1 760 929 7588 FOR TECHNICAL ASSISTANCE CALL 1 760 929 7575 COPYRIGHT AUTOMATION MODULES INC 1993 1998...

Page 3: ...ABLING INTERRUPTS 13 2 3 INTERRUPT SOURCES 14 2 4 INTERRUPT PRIORITY 14 2 5 INTERRUPT COMPLETION 15 2 6 INTERRUPT LATENCY 15 3 ENTERING COMMANDS 17 3 1 DOWNLOADING COMMANDS 18 4 INTRODUCTION TO COMMAN...

Page 4: ...is provided for future I O expansion modules 1 1 Specifications Description Stand Alone 2 Axis Servo Motor Controller Driver Operating Modes Position Velocity Torque and Electronic Gearing Filter Algo...

Page 5: ...urate homing method A typical use for the Fault input is for an external device to signal a fault condition such as over temperature Note The external Fault input is tied to the internal over temperat...

Page 6: ...tput to pass current and inactive means the inability for an output to pass current The Channel High CH and Channel Low CL commands provide the user with the ability to determine whether a channel is...

Page 7: ...found in a changed state during a sampling the input would become invalid and the debounce delay would be restarted If no or 0 debounce delay is used then no input debouncing is performed For example...

Page 8: ...status word For applications requiring capabilities above those of the onboard drivers the ability to interface to external drivers is provided This consists a 12 bit D A 10 VDC analog output signal...

Page 9: ...use the Accumulator Load AL command to set the number of the macro for a vector The LV command is then used to transfer the low 8 bits of the accumulator to the vector table entry specified by the LV...

Page 10: ...the interrupt for this condition is enabled the Error bit will still be set but the servo will not be disabled The Axis Fault interrupts indicate that a fault condition usually an over temperature co...

Page 11: ...how long it takes the previous command to complete For most commands this delay will be imperceptible Commands such as Wait WA Wait for Edge WE Wait for Stop WS Wait for Off WF Wait for On WN and Wait...

Page 12: ...link These codes are listed in Appendix A LAC 25 Error Code Definitions If you make a mistake when entering a command you can backspace to correct the error If you are entering commands and change you...

Page 13: ...ro TM commands It should be noted that commands can be strung together by using commas up to a maximum line length of 127 characters If a command line is ended by a and a comment i e SG1000 SD5000 Set...

Page 14: ...ations that cannot tolerate this condition Please note that the DB command is only in effect when the servo is not in motion or when the Trajectory Complete bit is set in the servo status word Related...

Page 15: ...adjustment of the derivative sampling interval for servo axis a The period of this interval can be calculated by the following T n 1 S 0 000100 where T is the period in seconds n is the FR command arg...

Page 16: ...s value can be dynamically predicted and summed with the output of the PID digital filter in effect it reduces the burden of the PID filter to make lead lag corrections based of the following error th...

Page 17: ...this command determine which inputs will be disabled and are as follows n Limit Switch Inputs Disabled 0 3 or no argument Limit and Limit 1 Limit 2 Limit Related Commands LM LN Command aLMn Limit Swit...

Page 18: ...e D A analog output for a given axis The upper four bits of the argument are for redirection of data and determine from which axis the D A channel will get it s data This allows both D A channels to o...

Page 19: ...s a The polarity of the output will determine whether the servo is driven in a direction that reduces or increases position error The encoder phase will determine whether the position count will incre...

Page 20: ...bit argument to this command is scaled by 65536 This number determines how much the servo s velocity will be altered by each servo loop interval determined by the Servo Speed SS command while it is ac...

Page 21: ...stable A good general value for SC is about 8000 Related Commands QM SQ Command aSDn Set Derivative Gain Argument 0 n 32 767 Default 0 This command sets the derivative gain term of the PID digital fil...

Page 22: ...Torque Mode QM When this command is issued in Position Mode PM or Velocity Mode VM its limiting effect will remain in all modes of operation until again changed Note that an argument less than zero i...

Page 23: ...eriod will be 10 0 000100 001000 S or 1 mS The minimum servo loop rate is 100 S per enabled axis The following table shows the minimum servo loop times Axis Enabled Minimum Loop Time 0 100 S 1 100 S 2...

Page 24: ...art and a 16 bit fractional part Example Encoder 500 lines 2000 Counts Rev Desired Velocity 40 Rev Sec Servo Loop Interval 1 000 Hz 5242880 40 Rev Sec 2000 Counts Rev 1000 Hz 65536 To achieve a veloci...

Page 25: ...axis a If no breakpoint value has yet been specified then the word NONE is returned Related Commands IP IR Command TCn Tell State of I O Channel n Argument 0 n 63 Default Off This command reports the...

Page 26: ...splay was connected at the time Command aTF Tell Following Error This command reports the following error for servo axis a This value is the difference between the current desired temporal position or...

Page 27: ...in SC 0 Velocity Feed forward Gain FV 0 Accel Feed forward Gain FA 0 Output Offset OO 0 Position Error Dead Band DB 0 Maximum Following Error SE 16383 Integral Sample Rate RI 0 Derivative Sample Rate...

Page 28: ...ne MD command and number at the beginning of each macro Related Commands MD RM Command aTO Tell Optimal Position This command reports the desired position for servo axis a This value may be different...

Page 29: ...d that the servo has been commanded to stop Upon stopping this bit is then cleared 6 Current Direction This bit indicated the current direction of travel for the servo 0 Positive 1 Negative 7 Desired...

Page 30: ...ent has occurred and has been acted upon as set by the Limit Mode LM command 30 Limit Enabled A 1 in this bit position indicates that the Limit input has been enabled for action via the Limit Mode LM...

Page 31: ...n level exists as a code in the internal RAM memory see Register Commands This code should be interpreted as the first byte being the major revision number and second byte being the minor revision num...

Page 32: ...placed in QM If a servo axis is in VM and commanded into PM the servo will be stopped at the current acceleration rate and placed into the PM mode If a servo axis is in QM and commanded into VM it wi...

Page 33: ...of a Motor Off MF command is executed before the axis is disabled Related Commands EA Command aDHn Define Home Argument 2 147 483 647 n 2 147 483 647 This command causes the current position of the s...

Page 34: ...causes slave servo axis a to begin to move proportionally to master servo axis n If n is 0 then the electronic gearing mode for axis a will be disabled If n is positive then the slave axis will track...

Page 35: ...nd is not required Related Commands MA GO Command aGO Go start motion This command causes servo axis a to begin motion When in the Velocity Mode VM the axis will accelerate to a constant velocity When...

Page 36: ...arget Relative Argument 2 147 483 647 n 2 147 483 647 This command generates a relative target position of n counts for servo axis a Since the Move Relative MR command will not initiate a motion a Go...

Page 37: ...ar In the case of a motor for example when an output command of 512 is set or about 2 5 amps the PWM output begins to ramp up until the desired output current is reached If the motor is not loaded eno...

Page 38: ...fy the direction for the servo to move using the Direction DI command After specifying the desired maximum velocity and the desired direction and placing the servo in velocity mode the servo can be st...

Page 39: ...be reported If the value contained by the register of the indirect argument is out of range an error will also be reported As stated earlier because the registers are within the NVRAM they are non vo...

Page 40: ...Q command QCMD Current command QM1 SQ command TLMTPL Maximum positive servo output SQ command FAGAIN Acceleration feed forward of PID filter FA command PERR Last calculated servo position error TF com...

Page 41: ...interrupt pending level 0 15 EV DV command IPEND1 User interrupt pending level 16 31 EV DV command SCLOCK Servo loop counter RCLOCK 1 mS Real time clock counter IO_DELAY User digital input delay ID c...

Page 42: ...0528 02A0H 0672 THRO WORD 0212H 0530 02A2H 0674 QCMD WORD 0214H 0532 02A4H 0676 TLMTPL WORD 0216H 0534 02A6H 0678 FAGAIN WORD 0218H 0536 02A8H 0680 PERR WORD 021AH 0538 02AAH 0682 OERR WORD 021CH 054...

Page 43: ...NG 0726H 1830 IO_DELAY BYTE 073EH 1854 Command AAn Add n to Accumulator Signed Argument 2 147 483 647 n 2 147 483 647 This command adds the value n to the accumulator Command AC Accumulator Complement...

Page 44: ...he lower 32 bits of the 64 bit product in the accumulator and the upper 32 bits in Register 1 Related Commands AD Command ANn And Accumulator with n Argument 2 147 483 647 n 2 147 483 647 This command...

Page 45: ...n Argument 0 n 2046 This command reads the 32 bit value at internal RAM location n and copies it to the accumulator The value specified by n must be evenly divisible by 2 Related Commands RB RW WB WL...

Page 46: ...ument 0 n 2047 This command copies the low 8 bits of the accumulator to the internal RAM location n Related Commands RB RL RW WL WW Command WLn Write Long 32 bits to RAM location n Argument 0 n 2046 T...

Page 47: ...ill be suspended until the condition becomes true Command DFn Do if I O Channel is Off Argument 0 n 63 This command will cause command execution to continue if I O channel n is Off otherwise the rest...

Page 48: ...Channel is Off Argument 0 n 63 If the I O channel specified by n is in the off state command execution will continue otherwise the next two commands in the command line or the macro will be skipped Re...

Page 49: ...d is executed When that position has been reached the breakpoint reached flag in the status register will be set This command can be issued before or after the servo has been commanded to move Related...

Page 50: ...ument for this command works in reverse as compared to that of the IMCSA controller Related Commands FE Command WFn Wait for I O Channel Off Argument 0 n 63 Default Off This command waits until I O ch...

Page 51: ...n 2 147 483 647 This command is used to determine when servo axis a has achieved the specified position n referenced by the current position when this command is executed Until that position has been...

Page 52: ...the current position of servo axis a that position reported by the Tell Position TP command to be stored in location n of the Learned Position Storage table This command is useful for teaching target...

Page 53: ...hen macro 5 is used via the Macro Call MC Macro Sequence MS or Macro Jump MJ commands the commands contained within the macro will be executed automatically There are a few necessary restrictions when...

Page 54: ...ed such that the command would attempt to jump past the end of the macro command execution will resume as if the macro had ended If n is specified such that the command would attempt to jump to a poin...

Page 55: ...the first command in the command line or an error will be reported Related Commands RM TM Command MJn Macro Jump Argument 0 n 255 This command may be used to Jump to a previously defined macro command...

Page 56: ...1 then all the macros will be displayed preceded by the individual macro number If n 2 then all macros will be displayed and will be preceded by the letters MD and the individual macro number This is...

Page 57: ...the inputs will have been debounced if the Input Debounce ID command is in effect Related Commands BO Command BOn Bulk Output to I O Port n Argument 0 n 7 This command copies the low 8 bits of the ac...

Page 58: ...t state will depend on whether the channel is set active on or active off Related Commands CF CH CL Command IDn Input Debounce n milliseconds Argument 0 n 7 Default 0 This command determines the lengt...

Page 59: ...AC 25 provides a proprietary high speed serial data bus Such uses might include various external devices such as thumb wheel switches LED or LCD displays switch panels and additional number or types o...

Page 60: ...is used along with the Sequence Commands for conditional command execution Command BRn Set Baud Rate Argument 300 600 1200 2400 4800 9600 or 19 200 Default 9600 This command allows the user to change...

Page 61: ...t variable RecAddr see Register commands is used to specify the location or address of the variable to be recorded The internal 16 bit variable RecSize is used to specify the data size If bit 0 of Rec...

Page 62: ...DDn Dump Data Argument 0 n 16383 This command is used to dump data that has been previously recorded by the Capture Data CD command to the display The argument determines the number of recorded sample...

Page 63: ...the accumulator Unused bits will be set to 0 Related Commands TA Command HF Hardware Handshaking Off Default Hardware handshake off This command does not function and is retained for backward compatib...

Page 64: ...RLF MG0 Display contents of register 0 followed by CRLF MGN This command displays nothing followed by nothing MG THE BLACK BEAR IS 0 Display THE BLACK BEAR IS followed by the contents of register 0 fo...

Page 65: ...given and operator input is received then register 0 will be the default recipient of the input value The following are all the valid examples Note that the N option causes a CRLF Parameters must be...

Page 66: ...r default values Evidence of the baud rate change will not be immediate but will occur when the unit is either power cycled or the Reset RT command is issued This command is intended for use by the ma...

Page 67: ...his boundary 7 OUT OF MACRO SPACE The LAC 25 allows for a maximum of 256 macros with up to 256 commands per macro and approximately 15800 bytes of macro storage space Each macro command requires 6 byt...

Page 68: ...ng a MG or VI command no closing quote was encountered 14 MACRO STRING ERROR When using a MG or VI command in defining a macro no closing quote was encountered 15 SYNTAX ERROR Indicates the improper u...

Page 69: ...hannel Off IG If Accumulator is n IN If Channel is On IP Interrupt on Absolute Position IR Interrupt on Relative Position IS If Accumulator Bit is Set IU If Accumulator Unequal to n RP Repeat WA Wait...

Page 70: ...er Index 24 Axis 2 Encoder Index 25 Axis 1 Encoder Index 26 Axis 1 Encoder Index J3 Optional I O Expansion Interface 6 Pin Modular Type AMP 5 641337 3 Digi Key A9093 ND 1 Receive Data input 2 Transmit...

Page 71: ...22 IN 53 IP 54 IR 54 IS 54 IU 54 JP 59 JR 59 LF 22 LM 22 LN 23 LP 57 LT 57 LV 59 MA 40 MC 60 MD 60 MF 40 MG 69 MJ 60 MN 41 MP 57 MR 41 MS 60 NO 69 OM 23 OO 24 PH 24 PM 41 QM 42 RA 50 RB 50 RC 61 RI 2...

Page 72: ...P Parameter commands 19 R Register commands 44 Register Space 44 Reporting commands 30 S Sequence Commands 52 Serial communications commands 65 Serial interface 11 Specifications 7 Status Bits Acceler...

Reviews: