文档库 最新最全的文档下载
当前位置:文档库 › LAC-1

LAC-1

SMAC

LAC-1

T ECHNICAL R EFERENCE M ANUAL Revision 1.0, October 1997

S.M.A.C.

5807 V AN A LLEN W AY

C ARLSBAD, CA 92008

P HONE: 1-760-929-7575 / F AX: 1-760-929-7588

F OR T ECHNICAL A SSISTANCE C ALL: 1-760-929-7575

?C OPYRIGHT A UTOMATION M ODULES, I NC. 1993 - 1997

Table of Contents

1. INTRODUCTION (7)

1.1 S PECIFICATIONS (7)

1.2 D IGITAL I/O I NTERFACE (8)

1.2.1 Dedicated Digital Inputs (8)

1.2.2 General Purpose Digital Inputs (9)

1.2.3 General Purpose Digital Outputs (9)

1.2.4 Digital I/O "States" (9)

1.2.5 I/O Technical Specifications (10)

1.3 E NCODER I NTERFACE (11)

1.4 O UTPUT D RIVER I NTERFACE (11)

1.5 A NALOG TO D IGITAL C ONVERSION (A/D) I NTERFACE (11)

1.6 S ERIAL I NTERFACE (12)

2. MACRO INTERRUPT SYSTEM (13)

2.1 T HE I NTERRUPT V ECTOR T ABLE (13)

2.2 E NABLING AND D ISABLING I NTERRUPTS (13)

2.3 I NTERRUPT S OURCES (14)

2.4 I NTERRUPT P RIORITY (14)

2.5 I NTERRUPT C OMPLETION (15)

2.6 I NTERRUPT L ATENCY (15)

3. ENTERING COMMANDS (17)

3.1 D OWNLOADING C OMMANDS (18)

4. INTRODUCTION TO COMMANDS (19)

4.1 P ARAMETER C OMMANDS (19)

4.2 R EPORTING C OMMANDS (29)

4.3 M OTION C OMMANDS (36)

4.4 R EGISTER C OMMANDS (41)

4.4.1 Internal Variables (41)

4.5 S EQUENCE C OMMANDS (49)

4.6 L EARNED P OSITION S TORAGE (LPS) C OMMANDS (54)

4.7 M ACRO C OMMANDS (55)

4.8 I NPUT / O UTPUT (I/O) C OMMANDS (59)

4.9 F UTURE E XPANSION I NTERFACE (61)

4.10 S ERIAL C OMMUNICATIONS AND M ISCELLANEOUS C OMMANDS (62)

5. APPENDIX A, LAC-1 ERROR CODE DEFINITIONS (69)

6. APPENDIX B, SUMMARY OF LAC-1 COMMANDS (71)

7. APPENDIX C, LAC-1 CONNECTOR PIN DEFINITIONS (72)

8. INDEX (73)

1. Introduction

The LAC-1 is a one 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.

The LAC-1 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-1 can interface to the real world via the onboard DC motor driver, a quadrature type encoder interface, 8 channels of HCT TTL digital input and 8 channels of HCT TTL type digital output, with additional TTL inputs serving for limit, home and fault functions, 4 channels of 10-bit analog to digital (A/D) conversion (1 of which is reserved for monitoring amplifier output current), and an RS-232 serial communications link. A proprietary RS-422 interface is provided for I/O expansion modules.

1.1 Specifications

Description Stand-Alone 1 Axis Servo Motor Controller / Driver

Operating Modes Position, Velocity, Torque

Filter Algorithm PID

Max. Servo Loop Rate200 μS

Trajectory Generator Trapezoidal

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 Range32 Bits

Velocity Range32 Bits

Acceleration Range32 Bits

8 HCT TTL Inputs, 8 HCT TTL Outputs

General Purpose Digital

I/O

Dedicated Digital Inputs Limit+, Limit-, Home and Fault, all TTL

Analog Inputs 4 Channels With 10-Bit Resolution, 3 are user accessible

Expansion I/O Optional Expansion to 64 I/O

Communication Interface RS-232 Serial Interface, Adjustable Baud Rate, 8 Bits, 1 Stop Bit,

No Parity, XON/XOFF Handshake

Supply Voltage+11 To +50 VDC

Motor Voltage+12 To +48 VDC

Dimensions Approximately 5.0ó Long by 3.3ó Wide by 1.1ó Thick

Weight Approximately 1 Lb.

Table 1. Specifications.

1.2 Digital I/O Interface

The LAC-1 includes 8 channels of HCT TTL general purpose digital input and 8 channels of HCT TTL general purpose digital output. Additionally, there are four channels of TTL dedicated digital input. The general purpose I/O are buffered with 74HCT541. An expansion interface allows for optional expansion of I/O to 64 channels.

1.2.1 Dedicated Digital Inputs

The LAC-1?s dedicated digital inputs are Limit+, Limit-, Home and Fault. Figure 1. LAC-1 Dedicated Input. illustrates one of these inputs. All of these inputs are active low and have 2.7K ohm pull up resistors. To activate one of these inputs, the user need only connect that input to the controller?s ground.

The Limit inputs are intended for signaling the LAC-1 that an axis has reached it?s end of travel. When such an event occurs, the LAC-1 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 motor/actuator over-temperature.

Note:The external Fault input is tied to the internal over-temperature signal from the onboard driver. 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 a 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 Fault bit i n 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-1 Dedicated Input.

1.2.2 General Purpose Digital Inputs

Figure 2 illustrates one of the LAC-1?s general purpose inputs. These inputs are of the type HCT TTL. Each of these inputs has a 15K pull up resistor.

Figure 2. LAC-1 General Purpose Input.

1.2.3 General Purpose Digital Outputs

Figure 3 illustrates one of the LAC-1?s general purpose outputs. These outputs are of the HCT TTL type.

Figure 3. LAC-1 General Purpose Output.

1.2.4 Digital I/O "States"

There are several commands that deal with controlling the general purpose digital I/O.

The Channel High (CH) and Channel Low (CL) commands provide the user with the ability to determine whether a channel is ON in the HIGH state (CH) or ON in the LOW 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 HIGH or LOW depending on the CH and CL commands as stated previously.

The (CH) command causes the following interpretation of the inputs and outputs:

? A HIGH output is considered to be ON (e.g., Channel On òCNó command).

? A LOW output is considered to be OFF (e.g., Channel Off òCFó command).

? A HIGH input is considered to be ON (e.g., Do If On òDNó command).

? A LOW 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:

? A HIGH output is considered to be OFF (e.g., Channel Off òCFó command).

? A LOW output is considered to be ON (e.g., Channel On òCNó command).

? A HIGH input is considered to be OFF (e.g., Do If Off òDFó command).

? A LOW input is considered to be ON (e.g., Do If On òDNó command).

òCHóòCLóInput VoltageòCHóòCLóOutput

Voltage

HIGH ON OFF HIGH ON OFF

LOW OFF ON LOW OFF ON

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 before it is considered valid and the change is detectable.

1.2.5 I/O Technical Specifications

1.2.5.1 General Purpose I/O Nominal Specifications.

Parameter Conditions Typ.Units

Symbo

l

2.0V

V IH Minimum High

Level Input Voltage

V IL Maximum Low

0.8V

Level Input Voltage

|I OUT| <= 6.0mA 3.84V

V OH Minimum High

Level Output

Voltage

V OL Maximum Low

|I OUT| <= 6.0mA0.33V

Level Output

Voltage

I IN Maximum Input

V IN = HIGH or LOW±0.1uA

Current

Table 3: General Purpose I/O Specifications

1.2.5.2 Dedicated I/O Nominal Specifications.

Parameter Conditions Typ.Units

Symbo

l

1.9V

V IH Minimum High

Level Input Voltage

0.9V

V IL Maximum Low

Level Input Voltage

V IN = HIGH or LOW±0.5uA

I IN Maximum Input

Current

Table 4: Dedicated I/O Specifications

1.3 Encoder Interface

The LAC-1 has one channel 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 are 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-1 onboard output driver is a PWM switching amplifier capable of supplying 3 Amps continuous and 6 Amps peak (for 200 mS minimum) at a switching frequency of approximately 19.531 KHz. This driver is intended for driving DC brush type motors or actuators. The peak voltage output to the motor will be nearly that of the main power supply.

The output driver includes 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 the status word.

1.5 Analog to Digital Conversion (A/D) Interface

The LAC-1 provides a 4 channel, 10 bit A/D conversion interface with a +5 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 7, 8 and 9 while channel 0 is used internally for monitoring the output current of the onboard driver. 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 is executed, the "current monitoring" channel is converted and the result is stored for later access.

1.6 Serial Interface

The LAC-1 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.

2. Macro Interrupt System

The LAC-1 employs a "Macro Interrupt System" to provide additional versatility i n programming the LAC-1. This system comprises 12 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.

2.3 Interrupt Sources

The following table lists all the possible interrupt sources.

Interrupt Source Level / Vector Interrupt Source Level/Vector

Axis Error31Reserved15

Reserved30Reserved14

Reserved29Reserved13

Reserved28Reserved12

Axis Fault27Reserved11

Reserved26Reserved10

Reserved25Reserved9

Reserved24Reserved8

Axis Limit23Digital Input 77

Reserved22Digital Input 66

Reserved21Digital Input 55

Reserved20Digital Input 44

Axis IP/IR19Digital Input 33

Reserved18Digital Input 22

Reserved17Digital Input 11

Reserved16Digital Input 00

Table 5. Macro Interrupt Sources.

The Axis Error interrupt indicates that the position following error for the 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 interrupt indicates 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 the 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 interrupt indicates that either a Limit+ or Limit- condition for the 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 - 07 provide 8 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.

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 to the user.

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 i n 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.

3. Entering Commands

Immediately after power-up, the LAC-1 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-1 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-1 will respond with a question mark "?" and space ò ò followed by a code indicating the type of error. These codes are listed i n Appendix A, LAC-1 Error Code Definitions. Also, the òStatusó LED on the controller will begin to flash.

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:

Command[Argument]

or...

Command[Argument],Command[Argument],...etc.

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.

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-1. However, if commands are downloaded to the LAC-1 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-1 using a communications program such as ProComm? or the Microsoft? Windows? Terminal 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-1 time to interpret and store the commands that were just sent.

4. Introduction to Commands

The LAC-1 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:DBn-- Dead-Band --

Argument:0 <= n <= 16383

Default:0

This command sets the position following error dead-band. 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 in motion (when the Trajectory Complete bit is set in the servo status word).

Related Commands: TF

Command:FAn-- 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 the servo.

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, i n 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, OO

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:FRn-- Set Derivative Sampling Period --

Argument:0 <= n <= 127

Default:0

This command allows for the adjustment of the derivative sampling interval for the servo. 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

Command:FVn-- 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 the servo.

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, i n 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, OO

Command:ILn-- 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 thereby reducing integral òwind upó. 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:LFn-- Limit Switch Input Off --

Argument:0 <= n <= 3

Default:0

This command disables one or more of the limit switch inputs. The valid arguments to this command determine which inputs will be disabled and are as follows:

n Limit Switch Inputs Disabled

Limit+ and Limit-

0, 3 or no

argument

1Limit+

2Limit-

Related Commands: LM, LN

Command:LMn-- Limit Switch Input Mode --

Argument:0 <= n <= 2

Default:0

This command is used to select how the LAC-1 will react when a limit switch is activated. The valid arguments for this command are as follows:

n Action

0Turn servo off, continue commands

1Stop abruptly, continue commands

2Decelerate smoothly, continue

commands

3Interrupt only

In all cases, the Error flag in the status word will be set. This will prevent the LAC-1 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

Command:LNn-- Limit Switch Input On --

Argument:0 <= n <= 3

This command is used to enable one or both of the limit switch inputs. 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-

1Limit+

2Limit-

Related Commands: LF, LM

Command:OOn-- Output Offset --

Argument:-32767 <= n <= 32767

Default:0

This command allows the user to set a continuous output for the servo. 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

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. 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 Normal0

Output Phase Reversed1

Encoder Phase Normal0

Encoder Phase Reversed2

Index Active Level Low0

Index Active Level High4

Home Sense Active "ON"0

Home Sense Active "OFF"8

Limit+ Sense Active "ON"0

16

Limit+ Sense Active

"OFF"

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.

Command:RIn-- 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 the servo. 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

Argument:0 <= n < 1,073,741,823

Default:0

This command sets the acceleration rate for the servo. 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

Command:SCn-- Set Current Mode Gain --

Argument:0 <= n <= 32,767

Default:0

This command sets the "current mode" gain 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. A low SC value will provide slow response to load changes while a high SC value will provide quick response to load changes. If SC is set is too low then inadequate control may occur. If the SC setting is too high then the system may be unstable. A good "general" value for SC is about 8000.

Related Commands: QM, SQ

相关文档