LAC-25 Technical Reference Manual 1. Introduction The LAC-25 is a two axis stand-alone integrated controller / driver, with input / output (I/O) capabilities, designed primarily for the control of DC brush type motors or actuators with itÕs integrated driver, or other types or motors by interfacing the onboard analog output capabilities with external drivers.
Figure 1 illustrates one of the LAC-25Õs dedicated digital inputs. These inputs are Limit+, Limit-, Home and Fault for both axis of the LAC-25. The power to activate these inputs is provided by the LAC-25 so it is only necessary to complete the circuit to activate the input.
Figure 3 illustrates one of the LAC-25Õs general purpose outputs. These outputs are galvanically isolated from the LAC-25. When an output is activated, positive current will flow from the collector of the optocoupler transistor (the output pin) to itÕs emitter (the output return pin), Figure 3.
SMAC LAC-25 Technical Reference Manual • An "activated" output is considered to be OFF (e.g., Channel Off ÒCFÓ command). • An "inactivated" output is considered to be ON (e.g., Channel On ÒCNÓ command). • An "activated" input is considered to be OFF (e.g., Do If Off ÒDFÓ command).
(e.g.,: oscilloscope monitoring of following error or output command). 1.5 Analog to Digital Conversion (A/D) Interface The LAC-25 provides a 5 channel, 10 bit A/D conversion interface with a +10 VDC reference and analog ground. For reverse compatibility purposes the A/D interface is actually ten channels but the user is only given access to channels 0, 1 and 2 while channels 6 and 7 are used internally for monitoring the output current of the onboard drivers.
LAC-25 Technical Reference Manual 2. Macro Interrupt System The LAC-25 employs a "Macro Interrupt System" to provide additional versatility i n programming the LAC-25. This system comprises 32 interrupt sources with corresponding vectors. When an interrupt's source is enabled for operation and then becomes active, the current macro being executed is saved to a so called macro stack and execution of the macro specified by that interrupt's vector table entry begins.
SMAC LAC-25 Technical Reference Manual 2.5 Interrupt Completion Once an interrupt macro (or set of macros) has finished executing, a Return from Call (RC) command or an undefined macro may be used to cause a return from the interrupting macro back to the interrupted macro where command execution will continue from where it was interrupted (see MS command).
Echo Off (EF) command; otherwise, the Echo On (EN) command (which is the default mode) should be issued. If you enter an invalid command, the LAC-25 will respond with a question mark "?" followed by a code indicating the type of error and the Status LED will begin to blink.
LAC-25. However, if commands are downloaded to the LAC-25 from a host computer, the ability for line comments can make program documentation possible and desirable.
SMAC LAC-25 Technical Reference Manual 4. Introduction to Commands The LAC-25 command instructions are varied and consist of several categories of purpose. The command descriptions will be detailed by these categories. 4.1 Parameter Commands The parameter setting commands are considered to be those for setting the operating conditions of the servo system (i.e.
Page 15
SMAC LAC-25 Technical Reference Manual Command: -- Fail Input Off -- Default: This command has no effect but is retained for backward compatibility purposes. Command: FN -- Fail Input On -- Default: This command has no effect but is retained for backward compatibility purposes.
Page 16
SMAC LAC-25 Technical Reference Manual Command: aFVn -- Feed-forward, Velocity -- Argument: 0 <= n <= 32767 Default: This command allows for the adjustment of the PID digital filter velocity feed-forward term for servo axis 'a'. During the course of a Position Mode (PM) or Velocity Mode (VM) move, at any point along the way (with a consistent load), the ideal required value of the servo output is fairly consistent and somewhat predictable.
Page 17
Interrupt only In all cases, the Error flag in the status word will be set. This will prevent the LAC-25 from moving the servo until the flag is cleared by issuing the Motor On (MN) command. Before this command will have any effect, the limit switch must be enabled with the Limit Switch On command (LN).
Page 18
SMAC LAC-25 Technical Reference Manual Command: aLNn -- Limit Switch Input On -- Argument: 0 <= n <= 3 This command is used to enable one or both of the limit switch inputs for servo axis ÔaÕ. Once enabled, the servo will be stopped or turned off if a limit switch input goes active. At the same time the Limit Switch Tripped and Error Flags will be set in the status word.
Page 19
SMAC LAC-25 Technical Reference Manual Command: aOOn -- Output Offset -- Argument: -32767 <= n <= 32767 Default: This command allows the user to set a continuous output for servo axis ÔaÕ. In certain applications, such as an overhanging load, there will be a continuous burden placed upon a servo axis.
Page 20
SMAC LAC-25 Technical Reference Manual Command: aRIn -- Sampling Rate of Integral -- Argument: 0 <= n <= 127 Default: This command allows for the adjustment of the PID digital filter integral sampling interval for servo axis 'a'. The period of this interval can be calculated by the following: T = (n+1) * S * 0.000100...
Page 21
SMAC LAC-25 Technical Reference Manual Command: aSCn -- Set Current Mode Gain -- Argument: 0 <= n <= 32,767 Default: This command sets the "current mode" gain for servo axis 'a' used by Torque Mode (QM1 only, see QM command). This allows the response of the current error integrator to be adjusted to suit a given application.
Page 22
SMAC LAC-25 Technical Reference Manual Command: aSQn -- Set [Maximum] Torque Level -- Argument: -32,767 <= n <= 32,767 in Torque Mode 0 (QM0) -1,023 <= n <= 1,023 in Torque Mode 1 (QM1) 0 <= n <= 32,767 in Position Mode (PM) 0 <= n <= 32,767 in Velocity Mode (VM)
Page 23
Argument: 1 <= n <= 255 Default: This command sets the servo loop interval, which is the same for both axis' of the LAC-25. The period of this interval can be calculated by the following: T = (n) * 0.000100 where "T"...
Page 24
SMAC LAC-25 Technical Reference Manual Command: aSVn -- Set Maximum Velocity -- Argument: 0 <= n < 1,073,741,823 Default: This command sets the desired velocity (in quadrature counts per servo loop interval) for servo axis 'a'. The 32 bit argument to this command consists of a 16 bit integer part and a 16 bit fractional part.
LAC-25 Technical Reference Manual 4.2 Reporting Commands The reporting commands output data relevant to the operating status of the LAC-25. Numerical output will be in the mathematical base determined by the Decimal Mode (DM) / Hexadecimal Mode (HM) commands and output will be followed by a carriage return and linefeed.
Page 26
SMAC LAC-25 Technical Reference Manual Command: -- Tell Derivative Gain -- This command reports the derivative gain value of the PID digital filter for servo axis 'a'. Related Commands: TG, TI, TL Command: -- Tell Error -- This command reports the last error code caused by any command or macro. If no error has occurred then a "0"...
Page 27
SMAC LAC-25 Technical Reference Manual Command: aTKn -- Tell (K) Constants -- Argument: 0 <= n <= 1 This command will display a number of internal settings depending on the value specified by 'n'. If 'n' is "0" or is not specified, then various parametric values for the servo axis specified by 'a' will be displayed.
Page 28
"MD" and the individual macro number. This is useful when downloading programs from the LAC-25 to a computer in that you need not re-enter the Macro Define (MD) command and number at the beginning of each macro.
Page 29
SMAC LAC-25 Technical Reference Manual Command: -- Tell Status Word -- This command reports the operating status word of servo axis 'a'. The response is coded into a single 32 bit value. The meaning of each bit is listed below: Purpose Servo Enabled.
Page 30
SMAC LAC-25 Technical Reference Manual Electronic Gearing Mode. A Ò1Ó in this bit position indicates that the servo is currently operating in electronic gearing mode. Reserved. Limit Mode Abort. Used by Limit Mode (LM) to determine what action to take upon the occurrence of a limit switch event.
Page 31
SMAC LAC-25 Technical Reference Manual Command: -- Tell Version -- This command reports the firmware revision level. This revision 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 number.
SMAC LAC-25 Technical Reference Manual 4.3 Motion Commands Motion Commands are those commands that involve or cause the actual movement of a servo. Any position mode (PM) based motion will be carried out using a trapezoidal velocity profile with the maximum velocity determined by the Set Velocity (SV) command. The acceleration and deceleration are the same and both are determined by the Set Acceleration (SA) command.
Page 33
SMAC LAC-25 Technical Reference Manual Command: -- Capture on Index -- This command causes the position counter of servo axis 'a' to be stored in the internal variable HREG upon receipt of an index pulse. For more information on HREG, see the Register Commands and the listing of the internal variables.
Page 34
SMAC LAC-25 Technical Reference Manual Command: -- Enable Axis for Operation -- Default: Axis 1 and 2 enabled. This command will enable operation of servo axis 'a'. If an axis is not enabled for operation, no system resources will be expended on it. For example, this means that if an axis is going to be used for it's encoder interface only, it must still be enabled for operation via the EA command, however, the undedicated encoder interface is always enabled and does not apply here.
Page 35
SMAC LAC-25 Technical Reference Manual Command: aFIn -- Find Edge of Index -- Argument: -2,147,483,647 <= n <= 2,147,483,647 This command is used to initialize servo axis 'a' at a given position. It will remain in effect until the Index input goes active. At that time, the current position of the servo will be defined as 'n'.
Page 36
SMAC LAC-25 Technical Reference Manual Command: -- Motor On -- This command is used to place servo axis 'a' in the "on" state. When the servo is turned on, its target position is set to its current position so that the servo is not inclined to move. When this...
Page 37
QM and cannot be changed until the unit is in PM or VM. For mode 1 (or QM1), the LAC-25 will use one of its A/D channels to monitor servo output current and attempt to maintain that output current at a steady level as commanded by the user program (see the SQ and SC commands).
Page 38
SMAC LAC-25 Technical Reference Manual Command: -- Enter Velocity Mode -- Default: Position mode This command places servo axis 'a' in the Velocity Mode of operation. In this mode, the servo can be commanded to move in either direction to a maximum velocity. The servo will move in that direction until commanded to stop.
In certain applications, the user may find it necessary to use data pertinent to the internal operation of the LAC-25. This may be accomplished via the use of the Read Byte (RB), the Read Word (RW) and the Read Long (RL) commands which copy the LAC-25's internal RAM memory to the accumulator and the Write Byte (WB), the Write Word (WW) and the Write Long (WL) commands which copy the accumulator to the LAC-25's internal RAM memory.
Page 40
SMAC LAC-25 Technical Reference Manual Axis Variable Descriptions. Status Status word (TS command). Peak velocity (SV command). Negative peak velocity (SV command). Temporal velocity (TV command). Desp Desired position (TT command). Carp Temporal desired position (TO command). Acceleration constant (SA command).
Page 41
Pause. This bit is set to Ò1Ó when the space bar is used to pause a user program. SXOff. This bit is set to Ò1Ó when the LAC-25 receives an XOFF code. HexMod. This bit is set to Ò1Ó by the HM command and set to Ò0Ó by the DM command.
Page 42
SMAC LAC-25 Technical Reference Manual Axis Variable Locations Variable Type Axis #1 Address Axis #2 Address Name Status LONG 01C0H/0448 0250H/0592 LONG 01C6H/0454 0256H/0598 LONG 01CAH/0458 025AH/0602 LONG 01CEH/0462 025EH/0606 Desp LONG 01E0H/0480 0270H/0624 Carp LONG 01E6H/0486 0276H/0630 LONG 01EAH/0490...
Page 43
SMAC LAC-25 Technical Reference Manual System Variable Locations Variable Type Address Name RecRate WORD 01A6H/422 RecAddr WORD 01A8H/424 RecSize WORD 01AAH/426 AIN0 WORD 0600H/1536 AIN1 WORD 0602H/1538 AIN2 WORD 0604H/1540 AIN3 WORD 0606H/1542 AIN4 WORD 0608H/1544 AIN5 WORD 060AH/1546 AIN6...
Page 44
SMAC LAC-25 Technical Reference Manual Command: -- 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: -- Load Accumulator with 'n' (Signed) -- Argument: -2,147,483,647 <= n <= 2,147,483,647...
Page 45
SMAC LAC-25 Technical Reference Manual Command: -- Copy Register 'n' to Accumulator -- Argument: 0 <= n <= 511 This command causes the value in Register 'n' to be copied to the accumulator. Related Commands: AR Command: -- Read Byte (8 bits) at RAM location 'n' Argument: 0 <= n <= 2047...
Page 46
SMAC LAC-25 Technical Reference Manual Command: -- Shift Accumulator Right 'n' bits -- Argument: 0 <= n <= 31 This command causes the accumulator to be shifted right 'n' bits while filling the high order bits with zero. Related Commands: SL...
SMAC LAC-25 Technical Reference Manual 4.5 Sequence Commands The LAC-25 includes commands that provide for conditional sequence command execution based on the register data, I/O state and etc. These Sequence Commands are illustrated by the following general forms: • If the condition is true, command execution will continue normally. If the condition is false, the next two commands in the command line or the macro will be skipped.
Page 48
SMAC LAC-25 Technical Reference Manual Command: -- If Bit 'n' of Accumulator is Clear (0) -- Argument: 0 <= n <= 31 If bit 'n' of the accumulator is clear (equals 0), command execution will continue; otherwise, the next two commands in the command line or the macro will be skipped.
Page 49
SMAC LAC-25 Technical Reference Manual Command: aIPn -- Interrupt on Absolute Position 'n' -- Argument: -2,147,483,647 <= n <= 2,147,483,647 This command is used to determine when servo axis 'a' has achieved the specified position 'n' referenced by the home position (or zero). When that position has been reached, the "breakpoint reached"...
Page 50
SMAC LAC-25 Technical Reference Manual Command: -- Wait ÔnÕ milliseconds -- Argument: 0 <= n <= 65,535 This command causes a wait period of 'n' milliseconds before going on to the next command. Command: aWEn -- Wait for Edge --...
Page 51
SMAC LAC-25 Technical Reference Manual Command: aWPn -- Wait for Absolute Position 'n' -- Argument: -2,147,483,647 <= n <= 2,147,483,647 This command is used to determine when servo axis 'a' has achieved the specified position 'n' referenced by the home position (or zero). Until that position has been reached, command execution will be suspended.
LAC-25 Technical Reference Manual 4.6 Learned Position Storage (LPS) Commands The LAC-25 uses part of its nonvolatile RAM (NVRAM) to create a 256 item table for storing positions. This table overlaps the last 256 registers of the register table. The LPS table is normally accessed by three commands: Learn Position (LP), Learn Target (LT) and Move to Position (MP).
It should be noted that macros can use indirect as well as direct arguments. The LAC-25 allows for the creation of 256 macros consisting of a total of nearly 2,300 command instructions. Macro calls via the Macro Call (MC) command or the interrupt system, may be nested up to 25 calls deep.
Page 54
SMAC LAC-25 Technical Reference Manual Command: -- Jump to Command, Absolute -- Argument: 0 <= n <= 31 This command causes execution of a macro to jump to the absolute command specified by 'nÕ. Commands are numbered sequentially starting from 0. If 'n' is specified whereas the command would attempt to jump past the end of the macro, command execution will resume as i f the macro had ended.
Page 55
This command may be used to "Jump" to a previously defined macro command. Once the LAC-25 begins executing the new macro, it has no record of how it got there. This means that any commands that appear after the Macro Jump (MJ) command will not be executed. If there is no macro defined by the number 'n', an error will be reported.
Page 56
"MD" and the individual macro number. This is useful when downloading programs from the LAC-25 to a computer in that you need not re-enter the Macro Define (MD) command and number at the beginning of each macro.
LAC-25 Technical Reference Manual 4.8 Input / Output (I/O) Commands The user is able to manipulate the LAC-25's I/O channels via the use of several commands. These include setting or clearing outputs, reading inputs and altering the logic type of both.
Page 58
SMAC LAC-25 Technical Reference Manual Command: -- Make I/O Channel 'n' Active Low -- Argument: 0 <= n <= 63 Default: Active high or active "on" This command causes I/O channel 'n' to assume an active "off" mode. Related Commands: CH Command: -- Turn I/O Channel 'n' "On"...
LAC-25 Technical Reference Manual 4.9 Future Expansion Interface For future expansion, the LAC-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 of input and output. This provides custom expansion...
LAC-25 Technical Reference Manual 4.10 Serial Communications and Miscellaneous Commands These commands control operation of the serial communication's interface and cover the balance of the LAC-25 functions not fitting in the other categories. Command: -- Break -- This command will cause the rest of the command line or macro to be skipped. This command is used along with the Sequence Commands for conditional command execution.
Page 61
SMAC LAC-25 Technical Reference Manual Command: -- Capture Data -- Argument: 0 <= n <= 16383 This command allows for the capture and recording of data from an internal variable with the user being able to later download and plot this data for analysis. The number of samples that can be recorded depends on the amount of macro memory available at the time that the Capture Storage (CS) command is issued.
Page 62
SMAC LAC-25 Technical Reference Manual Command: -- Capture Storage -- Argument: 0 <= n <= 16383 This command is used to allocate storage space for the data recorder commands. The argument determines the maximum number of samples that can be recorded. If an argument is used that is greater than the macro memory available, then an error will be reported.
Page 63
SMAC LAC-25 Technical Reference Manual Command: -- Echo On -- Default: Echo On This command causes characters received from the serial communication's interface to be echoed as they are received. It is normally used in the full-duplex mode of operation in serial communications.
Page 64
(see Sequence Commands). Command: -- Reset -- This command performs a complete restart of the LAC-25, including restoration of all default conditions, such as acceleration and velocity, and leaves all servo axis' in the "off" state.
Page 65
SMAC LAC-25 Technical Reference Manual Command: VI[[""][:n][:N]] -- Variable Input -- Argument: 0 <= n <= 255 This command allows for the display of an optional text string, an optional carriage return / linefeed (CRLF) and the entry of integer numeric operator input to a register variable.
Page 66
Argument: n = 123 This command re-formats and re-initializes the LAC-25's non-volatile static ram (NVRAM). This means that any macros will be deleted and their space recovered, register contents will be set to 0 and the baud rate (among other things) will be set to their 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 error indicates that attempt was made to define a macro while a servo axis the was enabled (i.e.: "MN"). This is not allowed on the LAC-25 as to prevent loss of program and/or servo control due to macro memory space definition contention.
Page 68
This error indicates that the memory space set aside for this purpose has been exhausted and no more "calls" may be attempted. The LAC-25 is capable of macro calls nested 25 deep. 12 - MACRO MUST BE FIRST COMMAND. When defining a macro, the "MD" command must be the first command in the command line.
SMAC LAC-25 Technical Reference Manual 6. Appendix B, Summary of LAC-25 Commands Parameter Commands -- Find Edge (Index) UM -- Unpush Macro GH -- Go Home DB -- Set Dead Band GO -- Go (start motion) Serial Comm. and Misc. Commands...
SMAC LAC-25 Technical Reference Manual 7. Appendix C, LAC-25 Connector Pin Definitions P O W E R RS-232 I/O EXP USER I/O SERVO INTERFACE POWER INTERFACE S T A T U S J1 - Power Interface 2. Transmit Data- output 3.
Need help?
Do you have a question about the LAC-25 and is the answer not in the manual?
Questions and answers