SMAC LAC-25 Product manual

SMAC
LAC-25
TECHNICAL REFERENCE MANUAL
Revision 3.4, February 1998
SMAC CORP.
5807 Van Allen Way
Carlsbad, CA 92008

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

SMAC LAC-25 Technical Reference Manual
5
Table of Contents
1. INTRODUCTION ............................................................................................................................7
1.1 SPECIFICATIONS .............................................................................................................................7
1.2 DIGITAL I/O INTERFACE....................................................................................................................8
1.2.1 Dedicated Digital Inputs .......................................................................................................8
1.2.2 General Purpose Inputs.........................................................................................................8
1.2.3 General Purpose Outputs......................................................................................................9
1.2.4 Digital I/O "States"................................................................................................................9
1.2.5 I/O Technical Specifications..............................................................................................10
1.3 ENCODER INTERFACE....................................................................................................................11
1.4 OUTPUT DRIVER INTERFACE ...........................................................................................................11
1.5 ANALOG TO DIGITAL CONVERSION (A/D) INTERFACE............................................................................11
1.6 SERIAL INTERFACE ........................................................................................................................11
2. MACRO INTERRUPT SYSTEM ....................................................................................................13
2.1 THE INTERRUPT VECTOR TABLE......................................................................................................13
2.2 ENABLING AND DISABLING 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 COMMANDS................................................................................................19
4.1 PARAMETER COMMANDS................................................................................................................19
4.2 REPORTING COMMANDS.................................................................................................................30
4.3 MOTION COMMANDS .....................................................................................................................37
4.4 REGISTER COMMANDS ...................................................................................................................44
4.4.1 Internal Variables................................................................................................................44
4.5 SEQUENCE COMMANDS .................................................................................................................52
4.6 LEARNED POSITION STORAGE (LPS) COMMANDS ..............................................................................57
4.7 MACRO COMMANDS......................................................................................................................58
4.8 INPUT / OUTPUT (I/O) COMMANDS ..................................................................................................62
4.9 FUTURE EXPANSION INTERFACE ......................................................................................................64
4.10 SERIAL COMMUNICATIONS AND MISCELLANEOUS COMMANDS .............................................................65
5. APPENDIX A, LAC-25 ERROR CODE DEFINITIONS ...................................................................72
6. APPENDIX B, SUMMARY OF LAC-25 COMMANDS.....................................................................74
7. APPENDIX C, LAC-25 CONNECTOR PIN DEFINITIONS..............................................................75
8. INDEX .........................................................................................................................................76

SMAC LAC-25 Technical Reference Manual
7
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.
The LAC-25 implements a mnemonic type command instruction set via a standard RS-232
serial communications interface. These commands can be executed directly or used to create
command macros which are stored in the onboard nonvolatile RAM (NVRAM).
The LAC-25 can interface to the real world via the onboard motor drivers, 2 channels of
quadrature type encoder interface, 4 channels of optoisolated digital input and 4 channels of
optoisolated digital output, with additional optoisolated inputs serving for limit, home and fault
functions, 5 channels of 10-bit analog to digital (A/D) conversion (2 of which are reserved for
monitoring amplifier output current), and an RS-232 serial communications link. A proprietary RS-
422 interface 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 Algorithm PID
Max. Filter Update Rate 100 µS Per Enabled Axis
Trajectory Generator Trapezoidal, Electronic Gearing
Servo Position Feedback Incremental Encoder with Index
Output (Standard) PWM Motor Drive, 3 Amps Cont. and 6 Amps Peak at 50 VDC
Max.
PWM Frequency Approximately 19.531 KHz
Encoder And Index Input Single-ended or Differential
Encoder Supply Voltage 5 VDC
Encoder Input Voltage 5.5 VDC Max., -0.1 VDC Min.
Encoder Count Rate 2 Million Quadrature Counts per Second
Position Range 32 Bits
Velocity Range 31 Bits
Acceleration Range 31 Bits
General Purpose Digital
I/O
4 Optoisolated Inputs, 4 Optoisolated Outputs
Dedicated Digital Inputs Limit+, Limit-, Home and Fault for each axis
Analog Inputs 5 Channels With 10-Bit Resolution, 3 are user accessible
Analog Outputs 2 Channels With 12-Bit Resolution, ±10VDC.
Communication Interface RS-232 Serial Interface, Adjustable Baud Rate, 8 Bits, 1 Stop Bit,
No Parity, XON/XOFF Handshake
Supply Voltage +18 To +50 VDC
Motor Voltage +12 To +48 VDC
Dimensions Approximately 7.6Ó Long by 3.3Ó Wide by 1.1Ó Thick
Weight Approximately 1 Lb.
Table 1. Specifications.

SMAC LAC-25 Technical Reference Manual
8
1.2 Digital I/O Interface
The LAC-25 includes 4 channels of general purpose digital input and 4 channels of
general purpose digital output. Additionally, there are four channels of dedicated digital input for
each of the two axis'. All of these I/O are protected through the use of optoisolators.
1.2.1 Dedicated Digital Inputs
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.
The Limit inputs are intended for signaling the LAC-25 that an axis has reached itÕs end of
travel. When such an event occurs, the LAC-25 can ignore the event or stop the servo in some
controlled fashion. The Home input is for detecting some sort of "home position" sensor. This can
be used with the encoder index input to implement a very accurate 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-temperature signal from the onboard
drivers. When a fault condition occurs, that is either the internal over-temperature signal or
external Fault signal go active, the 16-bit internal variable FCNT (see Internal Variables)
begins to increment at 1 rate of once per millisecond. If the fault condition clears then the
FCNT variable is also cleared. If the fault condition remains present long enough for the
FCNT variable to count up to the value assigned to the FCMP variable, then the over Fault
bit in the status word will be set and the servo will be disabled (assuming the Fault interrupt
has not been enabled). The default value for FCMP is 10000 which will give a 10 second
delay before causing the Fault bit to be set.
Figure 1. LAC-25 Dedicated Input.
1.2.2 General Purpose Inputs
Figure 2 illustrates one of the LAC-25Õs general purpose inputs. These inputs are
galvanically isolated from the LAC-25. Current of the proper polarity must be supplied to the circuit
to activate the input.

SMAC LAC-25 Technical Reference Manual
9
Figure 2. LAC-25 General Purpose Inputs
1.2.3 General Purpose Outputs
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. LAC-25 General Purpose Output
1.2.4 Digital I/O "States"
There are several commands that deal with controlling the digital I/O. All of these
commands operate based on the following philosophy: With regard to an input, "active" means
there is sufficient current flowing through that input and "inactive" means there is lack of sufficient
current through that input. With regard to outputs, "active" means the ability for an output 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 active in the "on" state (CH) or active in the "off" state (CL). This
is analogous to a switch and to whether it is normally open or normally closed. The Channel On
(CN) and Channel Off (CF) commands do exactly as they imply in that they will turn a given output
either on or off, which will make that output either active or inactive depending on the CH and CL
commands as stated previously.
The (CH) command causes the following interpretation of the inputs and outputs:
• An "activated" output is considered to be ON (e.g., Channel On ÒCNÓ command).
• An "inactivated" output is considered to be OFF (e.g., Channel Off ÒCFÓ command).
• An "activated" input is considered to be ON (e.g., Do If On ÒDNÓ command).
• An "inactivated" input is considered to be OFF (e.g., Do If Off ÒDFÓ command).
The (CL) command causes the following interpretation of the inputs and outputs:

SMAC LAC-25 Technical Reference Manual
10
• 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).
• An "inactivated" input is considered to be ON (e.g., Do If On ÒDNÓ command).
Input Current ÒCHÓ ÒCLÓ Output Current ÒCHÓ ÒCLÓ
Flowing On Off Flowing CN CF
No Flow Off On No Flow CF CN
Table 2. I/O States.
Another feature of the digital input system is the ability for software input debouncing. All of
the general purpose digital inputs are automatically sampled once every millisecond. Depending
on the debounce delay set by the Input Debounce (ID) command, a given input must remain in the
same state during one or more samplings before it is considered valid. If an input were to be 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: if a "ID5" command has been issued, then a given input must remain in the same state
for 5 samplings or for 5 milliseconds.
1.2.5 I/O Technical Specifications
1.2.5.1 General Purpose I/O Nominal Specifications.
Unit Specification
5 V Minimum voltage to activate input.
0.83 mA Input current at minimum activation voltage.
24 V Maximum input voltage.
4.87 mA Input current at maximum voltage.
1.1 V Maximum voltage to deactivate input.
6 V Absolute maximum reverse input voltage.
40 V Maximum voltage output can sustain.
100 mA Maximum current output can sustain.
Table 3: General Purpose I/O Specifications
1.2.5.2 Dedicated I/O Nominal Specifications.
Unit Specification
10 ΩMaximum external circuit resistance to activate
input.
1KΩMinimum external circuit resistance to deactivate
input.
Table 4: Dedicated I/O Specifications

SMAC LAC-25 Technical Reference Manual
11
1.3 Encoder Interface
The LAC-25 has two channels of quadrature type encoder interface with optional index
signal input and the ability to supply +5 VDC at a minimum of 50 mA (or greater depending on
other demands put on the internal 5 VDC power supply). The phase A+ and phase B+ inputs are
pulled up to +5 VDC with 2.7K resistors, and the phase A- and phase B- inputs a biased at +2.5 VDC
with 2.7K resistors. This arrangement which will accommodate both open collector and totem pole
single-ended output encoders or differential output encoders. The phasing of the channels as well
as the index signal sense can be changed via program command.
1.4 Output Driver Interface
The LAC-25 onboard output drivers are PWM switching amplifiers capable of supplying 3
Amps continuous and 6 Amps peak (for 200 mS minimum) at a switching frequency of
approximately 19.531 KHz. These drivers are intended for driving DC brush type motors or
actuators. Both drivers share the main power supply input and the peak voltage output to the motor
will be nearly that of what is supplied.
The output drivers include an over-temperature sensor. If this sensor determines that the
amplifierÕs temperature is greater than 140¡ C, the amplifier will then be disabled and the Over-
Temperature bit will be set in that axis' 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 for
each axis. In applications where external drivers are not required, the analog outputs can be used
for other purposes (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. The other channels
are unavailable and should be ignored.
Whenever a Tell Analog "TA" or Get Analog "GA" command is issued, the specified A/D
channel is converted and the result is either reported or stored for access by the user. Also,
whenever the servo loop for an axis is executed, the "current monitoring" channel for that axis is
converted and the result is stored for later access.
1.6 Serial Interface
The LAC-25 communicates with a host computer or a "dumb" terminal via an RS-232 serial
interface. The baud rate is user selectable from 300 to 19,200 baud with 9600 baud being the
default. Characters are fixed at 8 bits in length with 1 stop bit and no parity. Software XON / XOFF
handshaking is provided. Hardware handshaking is not supported at this time.

SMAC LAC-25 Technical Reference Manual
13
2. Macro Interrupt System
The LAC-25 employs a "Macro Interrupt System" to provide additional versatility in
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. This happens to be similar procedure to that which the Macro
Call (MC) command follows.
2.1 The Interrupt Vector Table
The Interrupt Vector Table consists of an entry for each interrupt source and each entry will
correspond to that interrupt's level (level 0 = entry 0, level 1 = entry 1, etc.). A particular table entry
must be loaded with the number of a valid macro to be executed should that interrupt source
become active. The method for loading a vector table entry is provided by the Load Vector (LV)
command. The user must first 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 command. If an interrupt is generated and that vector
table entry has not been defined (equal to 0) then the interrupt will not be executed. Note that this
implies that macro "0" cannot be used as an interrupt macro. If an interrupt is generated and it's
vector table entry has been defined but the macro it specifies has not, then an error will be
reported.
2.2 Enabling and Disabling Interrupts
Loading a vector table entry will not enable an interrupt for operation. The Enable Vector
(EV) command must be used for this purpose. When the EV command is used, it will enable the
interrupt source (specified with the command) to function. In the event that it is necessary to
disable an interrupt source, there is a Disable Vector (DV) command that functions in a similar
manner as the EV command.
In order to prevent multiple or continuous interrupts, as an interrupt is taken it is
automatically disabled. This means that the user must re-enable that interrupt using the EV
command before it will occur again.

SMAC LAC-25 Technical Reference Manual
14
2.3 Interrupt Sources
The following table lists all the possible interrupt sources.
Interrupt Source Level / Vector Interrupt Source Level/Vector
Axis 0 Error 31 Reserved 15
Axis 1 Error 30 Reserved 14
Reserved 29 Reserved 13
Reserved 28 Reserved 12
Axis 0 Fault 27 Reserved 11
Axis 1 Fault 26 Reserved 10
Reserved 25 Reserved 9
Reserved 24 Reserved 8
Axis 0 Limit 23 Reserved 7
Axis 1 Limit 22 Reserved 6
Reserved 21 Reserved 5
Reserved 20 Reserved 4
Axis 0 IP/IR 19 Digital Input 3 3
Axis 1 IP/IR 18 Digital Input 2 2
Reserved 17 Digital Input 1 1
Reserved 16 Digital Input 0 0
Table 5. Macro Interrupt Sources.
The Axis Error interrupts indicate that the position following error for a given axis has
exceeded the limit set by the Set Error (SE) command. Normally, when this limit is exceeded, the
servo is disabled and the "Error" bit in that axis' status word is set. If 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
condition) has arisen. Normally, when this condition is detected, the servo is disabled and the
"Fault" bit in that axis' status word is set. If the interrupt for this condition is enabled, the "Fault"
bit will still be set but the servo will not be disabled.
The Axis Limit interrupts indicate that either a Limit+ or Limit- condition for an axis has
been detected. Whether or not a limit input will be recognized is determined by the Limit On (LN)
and Limit Off (LF) commands. The action taken is determined by the Limit Mode (LM) command.
Digital Inputs 00 - 03 provide 4 levels of undedicated, user definable interrupts. The
interrupt for a given input will be active when that input is active.
2.4 Interrupt Priority
If more than one interrupt source becomes active at the same time, then the source with
the higher level will be executed first. Level/vector 31 has the highest priority and level/vector 0
has the lowest priority.

SMAC LAC-25 Technical Reference Manual
15
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). In cases where it is undesirable to return to the interrupted macro, the Unpush
Macro (UM) command can be used to remove the previously pushed macro from the macro stack.
This command can also be used to completely reset the macro stack in order that the user program
can be restarted.
2.6 Interrupt Latency
Interrupt sources are sampled before each command in a macro is executed. This means
that the amount of time that an interrupt is held off before execution (also known as interrupt
latency) depends on 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 for Index (WI) would normally be a source of unacceptable delay in that
they can quite often be indeterminate in length. This problem has been avoided by making these
instructions interruptable. For example, if a WA10000 command (a 10 second delay) is currently in
progress and an interrupt comes along, the remaining delay period will be saved and then returned
to after the interrupt has completed. If the interrupt were to take 3 seconds to execute, then the
total wait time of the WA10000 command would be extended to 13 seconds.
The Position Mode (PM), Torque Mode (QM), Velocity Mode (VM), Wait for Position
Absolute (WP) and Wait for Position Relative (WR) commands and any command that uses the
serial communications link are all commands that could cause unacceptable interrupt latency.
Therefore, their usage should be carefully considered where interrupts are possible.

SMAC LAC-25 Technical Reference Manual
17
3. Entering Commands
Immediately after power-up, the LAC-25 is ready to accept commands. To verify this, you
can hit the ESC key. If everything is working properly, this should cause a greater than sign (">")
prompt to appear on your display. If not, you need to verify that the power and communications
connections are correct and verify the compatibility of the communications protocol.
Commands are entered via a "dumb" terminal or host computer such as a PC compatible.
Commands sent to the LAC-25 should consist of standard ASCII characters, and the command lines
should be followed by a carriage return. Linefeeds are not necessary since they are used for
formatting and therefore they are ignored. As characters are entered at the keyboard, they should
be echoed on your display. If your display echoes its own transmitted characters, you will want to
issue the 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.
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 your mind, hitting the ESC key will cancel the line and
give a new ">" prompt.
Once a command line has been entered and has finished executing, hitting the RETURN
key will cause the same command line to be re-executed. While a set of commands are
executing, hitting the space bar will cause command execution to pause until the space bar is hit
again. Also, if the ESC key is hit during execution or pause, command execution will be
terminated, and you will receive a new ">" prompt.
Command instructions are intended for use with the following syntax:
[Axis#]Command[Argument]<CR>
or...
[Axis#]Command[Argument],[Axis#]Command[Argument],...etc.
The axis number is normally specified as being from "1" to "2" with "0" being used to refer
to both axis' at the same time. Once an axis has been specified, the same one will remain in effect
until another is specified. For example, if the following were entered:
1SG100,SD500,SV1000000<CR>
or...
1SG100<CR>
SD500<CR>
SV1000000<CR>
the SG command specifies the axis number, so the subsequent SD and SV commands are
performed on the same axis. If the following command were issued:
0TP<CR>
it would have the same affect as issuing these commands:
1TP<CR>
2TP<CR>

SMAC LAC-25 Technical Reference Manual
18
During interrupts and macro calls, the axis number is saved and then later restored. After an
interrupt macro entered or a macro call is taken, it is a good idea for the user to make sure an
axis number (if necessary) gets set during one of the first commands encountered.
The numerical range of an argument will vary depending on the command with which it is
used. The mathematical interpretation of the argument will depend on whether the Decimal Mode
(DM) or Hexadecimal Mode (HM) was the last issued (DM is the power on default). Both decimal
and hexadecimal numbers less than zero should be entered with a preceding minus "-" sign. If no
argument is given, then it will be assumed as "0". The exceptions to this are the Macro Define
(MD), Macro Jump (MJ), Macro Call (MC),Macro Sequence (MS), Reset Macro (RM) and Tell
Macro (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 filter gains.<CR>
then the ";" and anything following it to the end of the line will be ignored. This feature is not
particularly useful if you are entering commands manually, as comments are not retained by the
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.
3.1 Downloading Commands
In many cases, it is more convenient to enter commands using a text editor on a host
computer and then download that text file to the LAC-25 using a communications program such as
ProCommor the MicrosoftWindowsTerminal program. Whatever communications software is
used, it must have the ability to provide a short delay (approx. 100 mS) after transmitting each line
to give the LAC-25 time to interpret and store the commands that were just sent.

SMAC LAC-25 Technical Reference Manual
19
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. PID filter gains, velocity, acceleration and etc.).
Command: aDBn -- Dead-Band --
Argument: 0 <= n <= 16383
Default: 0
This command sets the position following error dead-band for servo axis 'a'. The purpose for
the DB command is to allow an acceptable static position error for which there will be no restoring
force. This has the affect of reducing or eliminating "hunting" which is the continuous movement
at or about a position in trying to seek that position. This is useful for applications that cannot
tolerate this condition. Please note that the DB command is only in effect when the servo is not i n
motion (or when the Trajectory Complete bit is set in the servo status word).
Related Commands: TF
Command: aFAn -- Feed-forward, Acceleration --
Argument: 0 <= n <= 32767
Default: 0
This command allows for the adjustment of the PID digital filter acceleration feed-forward
term for servo axis 'a'.
During the course of a Position Mode (PM) or Velocity Mode (VM) move, at any point
during acceleration or deceleration (with a consistent load), the ideal required value of the servo
output is fairly consistent and somewhat predictable.
During acceleration or deceleration:
OUTPUT = (VELOCITY * FV_CONSTANT) + (ACCELERATION * FA_CONSTANT)
During constant velocity:
OUTPUT = (VELOCITY * FV_CONSTANT)
If this 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, thereby enhancing performance.
Related Commands: FV, OM, OO

SMAC LAC-25 Technical Reference Manual
20
Command: FF -- Fail Input Off --
Default: Off
This command has no effect but is retained for backward compatibility purposes.
Command: FN -- Fail Input On --
Default: Off
This command has no effect but is retained for backward compatibility purposes.
Command: aFRn -- Set Derivative Sampling Period --
Argument: 0 <= n <= 127
Default: 0
This command allows for the 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 argument and "S" is the sample period
count specified by the Servo Speed (SS) command. For example, if the value previously set by the
SS command is 10 and the value set by the FR command is 1, then the derivative sample period
will be:
(1+1) * 10 * 0.000100 = .002000 S or 2 mS
This command is useful in tuning the PID servo loop to the inertial properties of the system.
Related Commands: RI, SS

SMAC LAC-25 Technical Reference Manual
21
Command: aFVn -- Feed-forward, Velocity --
Argument: 0 <= n <= 32767
Default: 0
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.
During acceleration or deceleration:
OUTPUT = (VELOCITY * FV_CONSTANT) + (ACCELERATION * FA_CONSTANT)
During constant velocity:
OUTPUT = (VELOCITY * FV_CONSTANT)
If this 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, thereby enhancing performance.
Related Commands: FA, OM, OO
Command: aGRn -- Gear Ratio --
Argument: -8388607 <= n <= 8388607
Default: 0
This command sets the electronic gearing ratio for axis 'n'. A negative argument will cause
a direction reversal in the electronic gearing. The argument to this command is the desired
gearing ratio scaled by 65536.
Examples:
GR65536 ; Slave gear ratio is 1:1
GR131072 ; Slave gear ratio is 2:1
GR32768 ; Slave gear ratio is .5:1
GR6554 ; Slave gear ratio is .1:1 (actual gear ratio is
; .100006103516:1).
GR-65536 ; Slave ratio is 1:1 with direction reversal
Related Commands: EG

SMAC LAC-25 Technical Reference Manual
22
Command: aILn -- Set Integration Limit --
Argument: 0 <= n <= 16,383
Default: 0
This command clamps the level of influence that the PID digital filter integral term can use
to reduce the static position error of servo axis 'a'. When properly adjusted, this can enhance loop
stability and operation. The Integral Limit (IL) and Set Integral Gain (SI) must both be set to a non-
zero value in order for the integral term to have any effect.
Related Commands: SI
Command: aLFn -- Limit Switch Input Off --
Argument: 0 <= n <= 3
Default: 0
This command disables one or more of the limit switch inputs for servo axis 'a'. The valid
arguments to 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 Switch Input Mode --
Argument: 0 <= n <= 3
Default: 0
This command is used to select how the LAC-25 will react when a limit switch is activated
for servo axis 'a'. The valid arguments for this command are as follows:
n Action
0 Turn servo off, continue commands
1 Stop abruptly, continue commands
2 Decelerate smoothly, continue
commands
3 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).
Related Commands: LF, LN

SMAC LAC-25 Technical Reference Manual
23
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. These flags will
remain set until the servo is turned back on with the Motor On (MN) command. Once the servo is
turned back on, it can be moved out of the limit switch region with any of the standard motion
commands. The argument to this command determines which of the limit switch inputs will be
enabled. The coding is as follows:
n Limit Switch Inputs Enabled
0,3 or no argument Limit+ and Limit-
1 Limit+
2 Limit-
Related Commands: LF, LM
Command: aOMn -- Output Mode --
Argument: 0 <= n <= 255
Default: 0
This command allows the user to determine what data gets sent to the 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 output data from
the same axis. If no redirection is specified, the default data used is that of the current axis.
Note: When outputting the servo output command, if no redirection is specified, then the output
command as phase adjusted by the PH command will be output. If redirection is specified,
then the normalized data as reported by the TQ command will be output.
ÔnÕ Value Output
0 Servo Output Command
1 Servo Following Error Ôn+Õ Redirect Channel
2 Servo Following Error * 64 0 Default
3 Variable USER1 16 1
4 Low Bits of Encoder Position 32 2
5 Reserved
6 Reserved
7 Reserved
Examples:
1OM0 ; Send axis 1 servo output command to D/A channel 1.
1OM16 ; Send axis 1 servo output command to D/A channel 1.
2OM0 ; Send axis 2 servo output command to D/A channel 2.
2OM32 ; Send axis 2 servo output command to D/A channel 2.
1OM0 ; Send axis 1 servo output command to D/A channel 1.
2OM17 ; Send axis 1 following error to D/A channel 2.

SMAC LAC-25 Technical Reference Manual
24
Command: aOOn -- Output Offset --
Argument: -32767 <= n <= 32767
Default: 0
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. In cases like these, where there is a predictable load, the OO command can be used to
provide a continuous restoring force that will be combined with the output of the PID digital filter.
This has the affect of improving the performance of the PID digital filter in that because it is not
saturated with static load, it has a better dynamic response to load disturbances.
Related Commands: FA, FV, OM
Command: aPHn -- Set Servo Phasing --
Argument: 0 <= n <= 63
Default: 0
This command is used to set the output polarity, encoder phasing, Index input sense, Home
input sense, Limit+ and Limit- input sense for servo axis Ô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 increase or decrease for a valid encoder input
sequence. The Index sense determines what logic edge will cause the Index input to be active.
The Limit+, Limit- and Home sense determines whether these signals are active ÒonÓ or active Òoff.
To determine the argument to be used with the PH command, use the follow table and add
the required values together.
Add to 'n'
Output Phase Normal 0
Output Phase Reversed 1
Encoder Phase Normal 0
Encoder Phase Reversed 2
Index Active Level Low 0
Index Active Level High 4
Home Sense Active "ON" 0
Home Sense Active "OFF" 8
Limit+ Sense Active "ON" 0
Limit+ Sense Active
"OFF"
16
Limit- Sense Active "ON" 0
Limit- Sense Active "OFF" 32
For example, if it were necessary to reverse the encoder phasing and to set the Limit+ and
Limit- inputs to active "OFF", then 'n' would be (2 + 16 + 32) or 50. The default phasing and sense
is equivalent to issuing this command with a argument of 0.

SMAC LAC-25 Technical Reference Manual
25
Command: aRIn -- Sampling Rate of Integral --
Argument: 0 <= n <= 127
Default: 0
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
where "T" is the period in seconds, "n" is the RI command argument and "S" is the sample period
count specified by the Servo Speed (SS) command. For example, if the value previously set by the
SS command is 10 and the value set by the RI command is 1, then the integral sample period will
be:
(1+1) * 10 * 0.000100 = .002000 S or 2 mS
This command is useful in tuning the PID servo loop to the inertial properties of the system.
Related Commands: FR
Command: aSAn -- Set Acceleration --
Argument: 0 <= n < 1,073,741,823
Default: 0
This command sets the acceleration rate for servo axis 'a'. The 32 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
accelerating or decelerating. If this command is executed during a Position Mode move, it will be
ignored.
Example:
Encoder: 500 lines or 2000 Counts/Rev
Desired Acceleration: 75 Rev/Sec2
Servo Loop Interval: 1,000 Hz
9830.4 = ((75 Rev/Sec * 2000 Counts/Rev) / 1000 Hz2) * 65536
To achieve an acceleration of 75 Rev/Sec2, the command SA9830 would be issued. A
simpler way to calculate the acceleration argument would be to determine a constant for your
application by which to calculate desired acceleration.
131.072 = K = ((1 Rev/Sec * 2000 Counts/Rev) / 1000 Hz2) * 65536
9830.4 = 75 Rev/Sec * K
Please note that if the Set Acceleration (SA) command is used with an argument of "0",
then you have commanded the velocity to change in steps of zero which means if the servo is
stopped it will not be able to move, and if the servo is moving it will not be able to change velocity.
Related Commands: SS, SV
Table of contents
Other SMAC I/O System manuals