ACR1000 COMMAND SET [option_a I option_b I option_c) { option_a, option_b, ...}

QUICK REFERENCE

choose exactly one of these options. include zero or any number of these options.

? (see PRINT) ACC { [ Px I xxx ]} (XACC { [ Px I xxx ]} or YACC { [ Py I yyy ]} for vS.x) ADD [ Px I xxx ] , Py AND [ Px I xxx] , Py AOUT [ axiS# I axiS#, value] AUT

BLK BSC [@ startpos, size{ =value#1, value#2•..• } I (index){ =value_index. value_index+1 ••.• } ] SSC [ ON I OFF I index I index,count ] CAM [ @ startpos, length{ =value#1, value#2 •... } I (index){ =value_index. value_index+1 •.•. } ] CAM [ ON I OFF I L I R. rotary modulus I OF5. offset I FLZ. offset I 5, encoder number] CAM [ index I index, count ] CAP [± 0 {, 5, encoder#} I OFF] CHKJMP {IF} CIRCLE rotdir, radius, i, jt distance CLEAR { [ CAM I SSC I P ( ) ] } CLRxx COS Pxx DEC xxx (XDEC xxx or YDEC xxx for vS.x ) DELREM DIM # of elements, size DIV [Px I xxx] , Py Py 0 DWLxxxx END EXC xxxx (XEXC xxx or YEXC xxx for vS.x ) FED (XFED or YFED for vS.x) FLZ xxx (XFLZ xxx or YFLZ xxx for vS.x) FOV [ xxx I Px ] FTB { aa, bb, ... } GOTO line# GSB line# HDWOFF (XHOWOFF or YHOWOFF for vS.x ) HOWON {[ 3 I 4 l} (XHDWON {x} or YHOWON {y} for vS.x ) HELP HOME (XHOME or YHOME for vS.x) IF condition THEN command { : command2 : command3 ... } ( else continue on next line. ) INH [± xx I ii jj ] IHPOS ± [ xxx I Pxx 1{ , 5 , encoder# } { , T , timeout } INP Pxx , Tyy • Tzz INPUT { ; } { • prompt string • [ ; I , ] } P~, Py INT ± xx (XINT ± xx or YlNT ± xx for vS.x ) IPS xxx (XIPB xxx or YIPS xxx for vS.x ) IPR xxx { , yyy} (XIPR xxx{ , yyy} or XlPR xxx { , yyy} for vS.x )

=

25

Chapter 7, Command Set

11

ACR1000 COMMAND SET

QUICK REFERENCE

( option_a I option_b I option_c ]choose exactly one of these options. { option_a, option_b, ...} include zero or any number of these options. JOG ± ( XJOG ± or YJOG ± for vS.x ) UST { from line# } { , } { to line# } MEM {Px} MOVE { I } ± xxx ( XMOV { I } ± xxx or YMOV { I } ± xxx for vS.x ) MUL [ xxx I Px ) , Py

NEW NOTPx OR [ xxx I Px ] • Py PBOOT (If used must be first line of program.) PEEK start-hex { • /ength-hex} PIC { P pp • } { 1 ii • } { 10 id} { IL iI ,} (XPID or VPID for vS.x ) POF POKE start-hex = aa { , bb • cc , dd ... } PON {[ + II]} PRINT {[ -string" I Px] {; [-string" I Px]} } PRINT CHR$( [ xx I Py I &Hzz ] ){;} PROM { IT } { IU } ROFE {Px} ROPOS encoder#. { • Px } REM any-string REN {X} RES {X} RET RNM { {new} • { old} . { inc} , { limit} } RUN SAMP Sx. Tx SET [xx I aa bb] SIN Pxx SQRT Pxx STP xxx (XSTP xxx or YSTP xxx for vS.x ) SUB [ xxx I Px 1• Py TAN Pxx TLM { [ xxx I Px ] } TRON TROFF VEL { ( xxx f Px ]} {XVEL { ( xxx I Px ]} or YVEL { ( xxx I Px]} for vS.x ) XOR [ xx I Px ] • Py

=

=

=

=

=

ACR1000 Users Guide

26 III

Chapter 7 The ACR1000 Command Set AXIS MOVE MATH BRANCHING WAITrrlMEOUT

110 INPUT/OUTPUT STATUS PROGRAM FLOW PROGRAM OPTIMIZING CARDON/OFF SETTING PARAMETERS MISCELLANEOUS P.LC INITIALIZE POSITION DEBUGGING MEMORY ALlOCATION FEEDRATE OVERRIDE MASTER SLAVE RATIOING GAIN, OFFSET

ACC, CIRCLE, DEC, FED, HDWON, HDWOFF, HOME,INT, IPR, JOG, MOVE, STP, VEL, ctrl-K. ctrt-C. ADD, AND, COS, DIV MUL, NOT, OR. SIN, SUB,SORT, TAN, XOR IF, GOTO, GSa INH, INHPOS, OWL AOUT,SET, CLR INPUT, PRINT, CHR$(X) ctrt-N, ctrl-O, ctrt-P, ctrt-T, ctrt-U, ctrt-V, ctrl-W, ctrt-x. ctrt-Y ctrt-SHIFT-6-xx. RDPOS. AUT, BLK. RUN, GOTO, GSB, PBOOT .CHKJMP,DELREM,RNM ctrt-A, ctrt-B BSC,CAM,EXC,F~IPB,TlM,~

END, HELP, LIST, NEW, REM, PROM PEEK. POKE, PON, POF REN,RES,RES1,RES2 AUT, BlK. TRON, TROFF CLEAR, DIM, MEM FOV, FlB, ctrt-# HDWON, CAP, IPR PIO

Command Descriptions In the following deScriptions, the arguments are given in the form xxxx. The number of X's specifies the maximum number of digits allowed.

?

(see PRINT)

ACC Format: Unit: Range:

ACe { [ Px I xxx ]} (XACe { [ Px I xxx ] } or YAee { [ Py I yyy ] } for v5.x) units/sec 1 - 255

The ACC command sets the acceleration ramp for subsequent MOVE commands. Acceleration ramps in the ACR1 000 are linear. In v2.6x, v3.x & v5.x an ACC value of 1 corresponds to an acceleration ramp of 35555.5 pulses per second per second. As an option, a version is also offered with slow ramps. In this version, ACC 1 corresponds to 4444.44 pulses per second per second. With v2. 7.x, automatic ACCIDEC between velocities is not implemented. With v4.x, automatic deceleration between velocities while maintaining interpolation is implemented and goes in increments of 1n7.7 pulses per second squared. If the acceleration distance plus the deceleration distance is more than -the total travel distance, of the move, the programmed ACC I VEL I DEC values will not be followed. On these short moves, the result will be a triangular profile in which the axis will accelerate for half the distance and then decelerate for the second half. The smaller of the ACe and STP ramp will be used in both the acceleration and the deceleration phase creating a symetrical profile.

ADD Format:

ADD [ Px I xxx ] , Py

This command adds the contents of Pxx and Pyy and stores the result into PY. The first argument may be a parameter reference or a constant.

AND Format:

AND [ Px I xxx ] Py I

This command logically and's Py by a constant xxx or a Px and stores the result back into Py. This is NOT addition. (6 AND 5 4 )

=

27

Chapter 7, Command Set

11

AOUT Format:

AOUT [ axis# I axis#, value]

Units:

units/mV

Range:

-4096 - +4095

This command allows direct control of the auxiliary analog output. Where the second argument may be an integer in the range -4096 to 4095. A value of 4095 outputs maximum positive voHage. A value of -4096 outputs maximum negative voHage. A value of 0 outputs zero voRs. Values greater than 4095 or less than -4096 will act as if they were maximum values. If no argument is given the current output value will be returned.

Exampies I AOUT2,2048 AOUT2 AOUT2,4095

Outputs + 112 full scale voltage (+Sv)

Prints the current output.valuc Outputs + full scale voltage (+ 1Ov)

-r-

AOUT 2, 49544 P34=-2048 : AOUT 2,P34 Outputs - 112 full scale voltage (-Sv) NOTES: ACR1000/16 The full scale voHage range is factory set to +/-10V. This may be adjusted by turning POT1 (GAIN). The zero voH adjustment is controlled by POT2 (OFFSET). See drawing in back of manual for POT locations.

AUT Format:

AUT (this is a toggle command)

The AUT command cancels the BLK mode and allows a program to be run continuously. On power-up up the system will start in this mode.

BlK Format:

BlK (this is a toggle command)

BlK cancels the AUT mode. When running a program, the operatorwill have to Cycle Start (dr1-C) the system after each command line. This is a way to step through a program line by line. The BlK command is also a way to Single step through the program for debugging purposes.

BSC mode Format:

See detailed examples below

Defined in Versions 2.6x and 3.x only. This is the Ballscrew Com~nsation command. The ACR-1000 has the ability to precisely compensate for errors in the axis ballscrew. Typically. a person measures the position error at discrete increments along the length of the ballscrew and enters this data into a table. Once ballscrew compensation is enabled, the controller will add or subtract to the error signal based on the current position of the axis and this table data .. NOTE: The resolution of the ballscrew table is currently fIXed at 2048 pulse position increments. Defining The Contents of the Ballscrew Table

Format:

SSC @ startpos.size{=value n ,value n+1 •... }

Use this to initially define the start and length of the Ballscrew table. is the absolute position of the start of the tame, In pulses. . defines the size of the ballscrew table. Optionally, you may enter the data for the table at the same time by including the "=" followed by a list of items separated by commas. Any unspecified table values are zeroed. Example: BSC @ O. 5 = 1,2,3,4,5 would set up a 5 element table, referenced to home (0). The table is indexed from right to left, as motion proceeds in a positive direction.

Format:

BSC(index)=value n, value n+1 •...

Specifying an index allows editing a specific location in the table. You then have the option of entering or changing a single table item or range of items. NQte: index numbering begins at (0). The index argument is optional, omitting the index defauHs to index (0). Ranges: starlpos ±2147483647 pulses.' size 0-32766. The table may be as large as memory space in the ACR 1000 allows. value n ±32767 pulses. Note that values may be either negative or positive. index 0-32766. Same limitations as size. ACR1000 Users Guide 28

= = = =

111

Displaying The Contents of the Sallscrew Table

Format:

SSC {index}{.}{count}

SSC followed by an optional index and/or count will selectively return Ballscrew table data. If an index is given, that entery will be returned. If an index is followed by a comma only. the esc table will be displayed from the index to the end of the table. If the comma is followed by a count parameter. then. starting with index. count entries will be displayed. If no parameters are given. the ACR1000 will display the SSC table in the following format: @ startpos.size=va/ue n.va/ue n+1 •... This allows the list to be easily captured. modified and sent back to the ACR1000.

esc ON

Fonnat:

Enables ballscrew compensation.

esc OFF

Fonnat:

Disables ballscrew compensation.

The following actions will disable ballscrew compensation.

I•

• Eading an existing or defining a new Ballscrew Table. • Executing an RES command on the cUffently active axis. • Executing an REN command. Remember to execute a BSC ON command after any of these actions if you wish for the Sallscrew Compensation to remain active.

Examples 8Se @O,2048 8Se (0)=0,1,2,3,4 P30=10: sse (P30) -rsse (10) sse -rsse 0,

Define space for 2048 entry BSC table. Valid indexes are 0 .. 2047. Sets the first five BSe values to 0,1,2,3 and 4. Print the value of the tenth entry in the BSe table.

Print the entire BSe table. If all of the above commands were executed the following would be returned. @O, 2048=0, 1,2,3 14,0,0,0 ...

CAM mode Fonnat:

See detailed examples below

Defined in Version 3.x only. The CAM mode is used to allow an encoder to determine an arbitrary command position for an axis. In the Unear (default) mode.1the position derived from a source encoder is used as an index into a CAM table. The entry for that index becomes the command position. Thus by changing the entries in the CAM table. any arbitrary profile may be achieved. The Rotary mode is the true electronic CAM mode. In the rotary mode the modulus of the source position is taken. using the modulus argument specified in the CAM R command. before using it as an index into the CAM table. So. like a real CAM. it does not matter how many times the encoder has turned. just the current rotational position matters. Since the modulus arguments can be only certain values (see syntax listing). if an electronic cam is desired. a source encoder with the correct PPR needs to be used.

CAM Table

PositionSource Encoder

~ Format:

Modulus in Rotary Mode

..... Index Value 7

1 AddFLZ value

,"-

Command Position From CAM Table \1

AddOFS Value

CAM (index){,}{number of entries}

If the index parameter is specified. then value of the index will be printed. If the comma is the last option. Chapter 7, Command Set

29

the CAM table, starting with index if it is specified or the lowest index if it is not, to the end of the CAM table will be printed. If the number of entries is specified after the comma, then the number of entries, starting with index if it is specified or the lowest index if it is not. will be printed. If no parameters are specified, the entire CAM table, the source, and, if in the rotary mode an R: followed by the rotary modules will be printed.

Format:

CAM @ start position, length {=value #1}{, value #2}

This will allocate memory space for the CAM table. The first entry, start position, is the smallest value of the index into the CAM table and is usually zero. The second entry, the CAM table length, is the number of entries to make room for. Note that the valid index values will be sIatt position to (start position+length1); so if the command CAM @O,1024 is given, the defined indexes will be 0 •. 1023. The values of the CAM table can be optionally specified after the first. two parameters. Format: CAM (index){=value at index, value at index +1. value at in(je~-:f"2, ... } This will specify the value for the given index and optionally the following index values.

Format:

CAM S, encoder number

Specify the source for the CAM index to be derived from, source Main 1, Aux 2 (MS), Aux 3 (AE1), Aux4 (AE2).

Format:

CAM FLZ,offset

This will advance or retard the pointer into the CAM table by the given amount. Note that this is done before the modules operation in the Rotary mode. (Value Range is +/- 2147483641)

Format:

CAM OFS,offset

This will add or subtract a value range +/- 32767 from each entry in the cam table as it is used. (This does not effect the original table entry)

Format:

CAM R,rotary modules

Put the CAM into the Rotary mode with the specified modules. The valid values for modules are 256,512, 1024,2048,4096 and 8192.

Format:

CAM L

This will cancel the Rotary mode and put the CAM into the Linear mode again. Note the default for the CAM mode is the Linear mode.

Format:

CAM ON

This will tum on the CAM mode.

Format:

CAM OFF

This will tum off the CAM mode.

Format:

CLEAR CAM

This reallocates the memory reserved by the CAM @ command.

Examples CAM @O,2048 CAM R,2048 CAM (0)=0,1,2,3,4 P30=10: CAM (P30) -or- CAM (10) CAM

Derme ~ for 2048 enjI)' CAM table. Valid indexes are 0..2047. Tum on R~ CAM mode with modules of2048. Sets the rust five CAM values to 0,1.2,3 and 4. Print the value of the tenth entJy in the CAM table. Print the entire CAM table. If all of the above commands were executed the following would be retmned.

.

S:2 R:2048 @0,2048=0,1,2,3,4,0,0,0 ..•

The CAM data IS added to wherever the main axis is at any given moment. This allows the CAM adlon to -ride- on top of any programmed motion, or allows moving the main axis to establish a reference point for the CAM data. It is important to know that when the CAM is turned on, whatever the source encoder is pointing to in the table will be added to the current axis position. So, if a large value is the first thing indexed, there will be a correspondingly large jump. Another thing that will cause a jump is moving the main axis with the CAM on, then executing an RES command. Generally. the axis should be at home, the source encoder at 0, and the table data property aligned before executing a CAM ON or CAM OFF command. A little cautious experimentation on your own will make things clearer. To control this jump an acceptable practice is the use the ~ command (Torque Limit) to limit the speed at which this initial jump happens. After the initial alignment. the TLM command can be used again to allow full torquelvelocity to ~m~oc

ACR1000 Users Guide

.

30 ~

CAPTURE mode Format:

See detailed examples below

Defined in Version 3.x only. The CAPTURE mode is designed to simplify measuring the offset between two signals. It can be used to control the relative position of an axis with respect to some external signals. When the CAPTURE mode is enabled the ACR1 000/16 will wait until the first signal comes and then will start counting pulses on the specified encoder. When the second signal comes, it compares the measured offset to the window parameters and if it is good, P14 will be incremented by 1 and the (absolute) offset will be added to P31. Thus by dividing P31 by P14 when P14>O, the average offset for the last P14 cycles is measured. The window parameters are included to facilitate noise control and multiple second signals. The Signals may be derived from any sources that can be connected to the inputs of the Aaoloop card. Nonnally these Signals generate an interrupt on the card. When the input signals are to generate an interrupt, they must be wired to inputs 10 and 11 and the jumper blocks JS6 and JS7 must be placed in the middle position. The interrupt will be generated by a falling edge on the voltage at the input (input going from not-conducting to conducting). If the jumper blocks are in the bottom position (see card diagram in back of the ACR1000 programming manual for more details.) then encoder marker signals may be used. The Signals need only to be a micro-second wide. A separate executive version is available that will poll inputs 4 & 5 every 468 ~S instead of using interrupts. This should be used only if the interrupts are being used for another purpose. Dedicated parameters P12: Minimum window P13: Maximum window P14: Number of cycles measured P31: Total measured offset since P31 and P14 were last cleared. USER 0: The BUSY bit. To keep foreground references to P14 and P31 from interfering with the background measurement process, the foreground must set this bit (SET 71) before and clear this bit (CLR 71) after referencing P14 or P31. USER 1,2,3: These are used by the CAPTURE process and should not be used by the user.

Format:

CAP D{,S,encoder number}

This will tum on the CAPTURE mode measuring from INPUT 11 to INPUT 10 the distance the specified encoder moved. If the source encoder is not specified, it will default to the main encoder (encoder 1). If the polled version is used, this mode will measure from INPUT 4 to INPUT 5.

Format:

CAP -D{,S,encoder number}

This is the same as above except that measurement will be made from INPUT 10 to INPUT 11 or, if the polled version is used, this mode will measure from INPUT 5 to INPUT 4.

Format:

CAP OFF

This will tum off the CAPTURE mode and clear bits USERO through USER3.

Encoder numbers and names. 1: main P1 connector on the ACR1 000 encoderdau 2: handwheel PS connector on the ACR1000 For a detailed example on using the capture mode to control a web, see chapter 11.

CHKJMP Format:

CHKJMP {If}

In Versions 2.6x, 3.x and S.X. The CHKJMP command allows the user to check a program for branching errors before running. CHKJMP will examine all GOTO/GSBITHEN commands for valid destination line numbers and report any "syntax", "missing line tr, and "branch to REM" errors it finds. CHKJMP can also be used to speed up the execution of an application program and eliminate the need to put subroutines near the top of a program. GOTO/GSBITHEN commands normally search from the top of a program to find the destination line, causing increasingly longer branch times as program size grows. Executing CHKJMPIF will cause all branching commands to be checked for errors and destination addresses calculated. If no errors are found, the program is tagged as having pre-calculated branches. Running the program will now use the branch information directly and GOTO/GSBITHEN commands will branch very rapidly. Modifying the program in any way will clear the fast branch information and the program will revert back to the old search method of branching.

Chapter 7, Command Set

31 _1

CIRCLE Format:

CIRCLE rotdir, radius, I , J, distance

In Versions 2.7x and 4.x. This command performs a circular interpolated move. Refer to chapter 8 for details.

CLEAR Format:

CLEAR { [ CAM I BSC I P ( ) ] }

Only needed in v3.x and vS.x. the CLEAR command is used to de-allocate areas of RAM assigned for use by the CAM, SSC, or DIM'ed Parameter arrays. CLEAR CAM Frees memory allocated by the CAM startpos,size command. CLEARSSC Frees memory allocated by the SSC startpos,size command. CLEAR PO Frees memory allocated by the DIM index,size command. CLEAR Frees all memory allocated by the DIM, SSC and CAM commands. (Notice order not important.) Due to the method that is used in allocating/de-a/Jocating memory in the ACR1ooo, one important precaution must be exercised. CLEAR commands must be executed in reverse order from the order that the CAM, asc, and DIM commands were done in. In other words, if the CAM was allocated last, it must be cleared first before others may be cleared. This is to prevent "holes· in memory space that would soon waste large amounts of memory. Use the MEM command to check the amounts of memory each command allocates / de-allocates.

I•

CLR Format:

CLR xx

Clears the output relay, timer, or counter number xx. This command is modal. The output will remain in the clear state until commanded using the SET command or changed by a PLC program. The valid output numbers are 12 through 83 and 108 through 117. If xx is 116, all 12 outputs [12 through 23] will be cleared. Note that the PLC, since it runs in the background, may, for example, tum on an output that the user program has turned off.-

COS Format: Units:

COS Pxx radians

Returns the COSINE of the value in Pxx back into Pxx. Unless Pxx can handle decimal fractions the return values will look alot like zero. So use Pxx >= P36. The argument is assumed to be in radians.

Ctrl-commands I Immediate commands Control code commands, or Immediate commands, are commands that are executed immediately upon recieving them. The ACR1oo0 will execute these commands even before finishing a program that is running. This alloWs it number of interesting things to happen. You can get a status report tum an VO on or off or change the Axis you are talking to without stopping the program running on the ACR1 000.

SET/CLRVO Two Control commands allow setting and clearing of relays while the ACR1000 is running a program. To set a relay, send a FS (ASCII 28d, 1Ch) followed by a character with an ASCII value equal to the relay's address. For example, to set OUTPUT12 (address OCh) on the ACR1000: send . The ASCII value of control-L is OCh~ To clear a relay, send ~ GS character (ASCII29d, 1Dh) followed by a charader equal to the relay's address. These commands may be sent to the ACR1000 at anytime, regardless of· what the ACR1 000 is doing. The relay address number follows the same restrictions as the SET and CLR commands, but with an additional restriction: you may not control relays above address 127 (7Fh). This includes USER4-USER7 and the external USER117 Relay. ACR1000 User's Guide

32

III

TURN ON AXIS: ctrt-A x (1d,01h) Turns ON card number x in a muHiaxis system. Here x is an ASCII-HEX digit in the range of 0,1,2, ... D,E,F. This way, up to sixteen cards can be turned ON by a 2-digit command. If the x is a , all the cards are turned ON. There should be no spaces between the ctrt-A and the ADDRESS. If the card address is specified, there should be NO caniage return after it TURN OFF AXIS: ctrt-B x (2d, 02h) Turns OFF card number x in a muHiaxis system. Here x Is a ASCII-HEX digit in the range of 0,1.2. ••• D,E.F. This way, up to sixteen cards can be turned OFF by a 2-digit command. If the x is a . all the cards are turned off. CYC LE-S TART: ctrt-c (3d, 03h) This is the CYCLE-START command. This command cancels the FEED-HOLD command. If the axis was stopped during a MOVE command by setting the· FEED-HOLD relay using the FEED-HOLD command, the CYCLE-START command will resume the move from where it left off. If the axis was not moving. the CYCLE-START command is ignored. To CYCLE-START from a program or PLC, set bit 78. To CYCLESTART the Y axis in v5.x, set bit 35. . ESC: ctrl [ (27d, 1Bh) Sending an Escape to a ACR1000 will tenninate the currently executing immediate mode command. It will also tenninate an executing program, and halt axis movement. To do this from within a program or PLC, set bit 79. FEED-HOLD: ctrl-K (11 d, OSh) This is the FEED-HOLD command. This makes the axis do a controlled stop if it was moving. This command cancels the JOG+ and JOG- commands. The axis will use the current DECEL parameter to come to a halt. If the DECEL parameter is 0, the axis will haH abruptly. If the axis was not moving when this command was given, it will prevent the axis from moving on the NEXT move command. To FEEDHOLD from a program or PLC set bit 75. To FEED-HOLD the Yaxis, set bit 32.

Status Commands: ctrl-N ... ctrl-Z These commands give a status report on the state of various variables in the controller. All values returned are in ASCII-HEX fonnat. These commands may not be embedded in a program, but can be sent to the card while a program is running or while an immediate mode command is being executed. They are not buffered and will be executed immediately once received. The status request commands are described as follows: Status commands marked with an asterisk (j are available in v5.x for the Y axis. To get this status for the Yaxis, precede the status request by drt-_ (31d,1 Fh). Input Status: ctr1-N (14d, OEh)

4- digit number showing status of inputs 00 through 11. The least significant bit is INPUTO. Output Status: ctrl-O (15d, OFh)

4- digit number showing status of outputs 12 through 23. The least significant bit is OUT12. -Following Error: ctrl-P (16d, 10h) Shows the FollOwing Error as ~ 8 digit signed HEX number. -Theoretical Position: ctrl-T (20d, 14h) This status returns the position the axis should (ideally) be at. -Actual, Target Position: ctrt-U (21d, i5h) Adual & Target Position. 1st 8 digits are signed hex Adual Position. The next 8 digits are signed hex Target Position. *Sit Status 1: ctrl-V (22d, i6h) This status returns the state of the following relays. BIT7 BITS BITS BIT4

IN-ACCEL (M.S. bit) IN-DECEL MOVE_IN_PROGRESS NOT_IN_POSITION

Chapter 7, Command Set

33

.1

'",: .. :

.... ... :-. ~

". :. :-. ~.:,~~ .. '.' .. : .. '

........ ..... .,; .... .... ".. .. '

"

"

BIT3

BIT2 BIT1 BITO

NOT EXCESS ERROR INPUT ERROR IN FEEDHOLD CYCLE CPU_READY. This indicates that the card is ready to receive communication.

·Feed, ACC, DEC Status: ctrt-W (23d, 17h) 4 digits of current feed, 4 digits of target feed. On v2.7.x & v4o.x, these 4 digits of target feed are followed by 2-digits of MOVE-INC. To get the actual target feed muHiply target feed by this MOVE-INC.) 4 digits of accel ramp. 4 digits of decel ramp. 4 digits of stop ramp. Program Une Number In Run Mode: ctrI-X (24d, i8h) This status returns the currently executing line number. This is a 4 digit hex number. Bit Status 2: ctrl-Y (25d, 19h) This status returns the state of the following relays. BIT7 BITS BITS BIT4 BIT3 BIT2 BIT1 BITO

HANDWHEEL MODE JOG_MODE FEED_DIRECTION [0 =positive,1= negative] RUN_PROGRAM_MODE FEEDHOLD_CYCLE_OVER INCREMENTAL mode STATE OF CANCEL MOVE RELAY 118 (Hex 6A) STATE USER RELAY 117 (Hex 94)

Print Parameters, Relays, Counters, Timers: ctrl_A-xx (30d, 1Eh)(xxd) Versions 4.x, 3.x and 5.x have the capability to print system parameter values and status of various PLC relays, timers and counters while an ACR1000 program is running. A two character status code is required. The first character is ctr1-" (ctrt-shift-6) (3Od, 1Eh). The second character can be "0" .."6" (ASCII characters 48 .. 57) or "=" .. "n" (ASCII characters 61 .. 110 ). See ASCII table in appendix A for details. 0: P.L.C. SEQUENCER 1st digit: 0 2nd digit: BIT 0: RESET SEa 56 (38H) BIT 1: SHIFT SEa 57 (39H) BIT 2: REVERSE SEa 58 (3AH) BIT 3: 0 Digits 3-10: SEa31 - SEaO 24-55 (18H-37H) 1: P.L.C. TIMER/COUNTER STATUS BITS 1st digit: 0 RESETCNTO-RESETCNT3 2nd digit: BITS 0-3: 3rd digit: BITS 0-3: CNTO-CNT3 4th digit: BITS 0-3: CNTOF - CNT3F 5th digit: BITS 0-3: TIMO- TIM3 TIMOF - TIM3F 6th digit:._ . BITS 0-3: 2: USER RELAY STATUS 1st digit: 0 2nd digit: BITS 0-3: USERO - USER3 3: P.L.C. TIMER SET VALUES Digits 1-4: TIMERO .1s & .01s SET VALUES Digits 5-8: TIMER1 .1s & .01s SET VALUES Digits 9-12: TIMER2 .1s & .01s SET VALUES Digits 13-16: TIMER3 .1s & .01s SET VALUES 4: P.L.C. TIMER ACTUAL COUNTS . TIMERO .1 s & .01 s ACTUAL COUNT Digits 1-4: Digits 5-8: TIMER1 .1s & .01s ACTUAL COUNT Digits 9-12: TIMER2 .1s & .01s ACTUAL COUNT Digits 13-16: TIMER3 .1s & .01s ACTUAL COUNT 5: P.L.C. COUNTER SET VALUES ACR1000 Users Guide

34

III

6:

Digits 1-2: COUNTERO SET VALUE Digits 3-4: COUNTER1 SET VALUE COUNTER2 SET VALUE Digits 5-6: COUNTER3 SET VALUE Digits 7-8: P .l.C. COUNTER ACTUAL COUNTS Digits 1-2: COUNTERO ACTUAL COUNT Digits 3-4: COUNTER1 ACTUAL COUNT Digits 5-6: COUNTER2 ACTUAL COUNT Digits 7-8: COUNTER3 ACTUAL COUNT 61 .. 110: Parameters.

For example, ASCII(61) for P1, ASCII(88) for P28, ASCII(110) for PSO, etc. Na-camage returns or line feeds should be sent. The parameter values are returned in ASCII-HEX digits. For 16-bit parameters, 4 digits are returned, For 32-bit parameters, 8 digits are returned. For 40-bit floating point parameters (p36-P50). two cases arise. If the parameter contains an integer value. it is returned as a 10 digit integer. If the parameter contains a fractional number, it is returned in floating point form with a 2 digit (1 Byte) exponent and an 8 digit (4 Byte) mantissa. EXAMPLE: In the case that P32 in the ACR1000 contains the value 1000 and it receives the status bytes: CHR$(30) followed by CHR$(92) from the host. the board will respond with. 000003E8 (1000d 3E8h)

=

(Notice: CHR$(30)

=drt shift 6-and CHR$(92) =drt \ when typed by hand.)

DEC Format: Units: Range:

DEC xxx (XDEC xxx or YDEC xxx for v5.x) units/secJsec

1 - 255

Sets the deceleration ramp for all moves entered after this command. This command is used to set the rate the axis will go from a higher velocity to a slower velocity at a desirable slope. To make the axis stop moving with a desirable ramp. use the STP command. The standard ramp is linear. In Versions 2.6x and 3.x a DEC value of 1 corresponds to ao deceleration ramp of 35555.5 pulses/sec/sec. With v2. 7 .x, automatic deceleration between velocities is not implemented. With v4.x, automatic deceleration between velocities while maintaining interpolation is implemented and goes in increments of 17n. 7 pulses per second squared.

DELREM Format: Range:

DELREM Effects the entire program.

Only in Versions 2.6x, 3.x and S.x. Since REM commands take up so much space, it may be desirable to remove them in order to fit larger programs into the ACR-1000's memory. Executing DELREM will remove all REM statements from a program. If any REM commands are destinations of GOTO/GSBITHEN commands, subsequent running of the program will result in -MISSING LINE # ERR-. Thus it is highly recommended to ~xecute CHKJMP before DELREM. Removing or shortening remarks one at a time is preferred since it leaves your program more readable.

DIM Format:

DIM # of elements size I

Only in v3.x and 5.x. The DIM command is used to set aside part of memory as an array in which to store data. A single array is available on the ACR1000. The # of elements parameter defines how many data items can be stored in the array, it is limited by: (ft. of elements) * (size) < unallocated memory. Size tells the system how large each element is. It is important to realize that size also detennines the range of

Chapter 7, Command Set

35

values that may be contained in an array element. The sizes and corresponding ranges available are as follows: size =, 2 = 16 ~its. Range ±32767. size = 4 = 32 bits. Range :t2147483647. size = 5' = 40 bits. These are treated as floating point, and have all the same properties of standard floating point parameters. Dimensioning must be done prior to referencing or assigning values to array elements. Refer to the CLEAR and MEM commands for more details.

OIV Format: Range:

OIV [ Px I xxx ] , Py Py 0

Divides the contents of parameter Px by parameter Py and stores the result in Py. Instead of Px, a constant number can be specified.

OWL Format: Units: Range:

OWL xxxx .01 secs 0 < xxxx < 65536

Pauses program or typed command execution for a period of xx.xx seconds. This delay can be halted by an ESC. Each dwell unit is 10 milliseconds'long. For example, OWL 234 will dwell for 2.34 seconds, OWL 60000 will dwell for 10 minutes.

END Format:

END

Signals the end of program and forces the board to stop execution. This command can be used to separate two different programs. If this command is left out, the system will automatically stop after the last command in memory.

EXC Format: Units: Range:

EXC xxxx (XEXC xxx or YEXC xxx for v5.x) encoder pulses O=disable, 1 ... 65535

Allows the user to enable an Excess Following Error flag to detect when the following error exceeds ±xxxx number of pulses. When this happens, the Not Excess Error relay (#105 for main (X) axis and #45 for Y axis) will be de-energized. This feature is used to detennine when the motor is lagging too far behind. This can be due to low gain or a motor runaway condition. A zero value disables this function and Not Excess Error flag is always on.

FED Fonnat: F.~D _ (XFEO or YFED for vS.x) This command cancels the IPR mode and sets the IPR ratio back to 1:1. On power-up, the system is in FED mode. The IPR mode is used when the system is in master/slave shaft synchronization. It does not cancel HDWON command.

FLZ Format: Units: Range:

FLZ xxx (XFLZ xxx and YFLZ xxx on Vers 5.x) encoder pulses ' ±2147483647

Allows setting a Floating Zero for the axis. This is useful if a program is needed to be run with different offsets at different times. If the axis is sitting at 10000 pulses and an FLZ 0 command is done, an offset of 10000 pulses will be added to every MOVE command done from there on. Actually the argument of the FLZ command is subtracted from the current position of the axis and the result is stored in parameter P27.

ACR1000 Users Guide

36

11

Then for any subsequent MOVE command, the parameter P27 is added to the MOVE command argument. FLZ will be cleared by doing a HOME but you can simply set P27 to zero to lose the offset. (Vers 5.x YFLZ uses P30.)

FOV Format: Range:

FOV [XXX)( I Px] 0 - 65535

Only in Vers 4.x. This command is used to change an axis velocity at any time during a move in progress. The axis will accel or decel automatically (using values set by the ACC & DEC commands) to the new velocity. This capability is known as feed rate ovenide. FOV works by multiplying the velocity (set by the VEL command) by a fraction. In this way. a series of programmed moves can be scaled by any amount desired without affecting relative velocities commanded within a program. An FOVeommand may be given at any time. Once received, the current as well as any subsequent move velocities will be scaled by the FOV fraction. It stays in effect until the next FOV command is received. It is important to keep this in mind when using FOV. It is necessary to issue an FOV 256 when it is no longer desired for programmed velocities to be scaled. There are three varieties of the FOV command: 1. FOV argument This is the simplest form, and may be entered from- any terminal. This form may be used from within a program or when the ACR1 000/16 controller is being given commands in the immediate mode argument must have a value in the range from 0 to 65535, where 256 represents 1:1. This gives the FOV command a range of scaling from 0:1 to 255.996:1. To determine the proper value, simply muHiply the decimal fraction desired by 256 and round up to the nearest whole number. EXAMPLE To command the axis to move at 1/4 speed, since.25 x 256 64, the correct command would be FOV64 2. For PC BUSS (ISA bus) users, a second form of the FOV command is provided. It may be sent at any time, regardless of whether the ACR 1000 is executing a program or the input buffer is full of other commands. It is executed immediately after being received. The format consists of a ctrt-G followed by 2 bytes of binary fraction, as follows: BYTE 0 : #7 (drt-G ) BYTES 1-2 : Fraction (unsigned integer, least Significant byte first) 3. For serial mode, a variation of the drt-G form is available. Since the serial RS-232 protocol does not allow binary numbers, the serial ctrt-G form is made to behave differently when the ACR1000 is set for serial command mode. In this form, the drt-G is followed by a single byte in the range of (30 - 4F) hexadecimal. This allows the FOV fraction to take on one of 32 possible values. These 32 values must be entered ahead of time by the user into the FOV Table by using the FTB command. Read the discription of the FTB command and syntax.

=

FTB Format: Range:

FTB {aa, bb, 0 - 65535

CC, ... }

Only in Vers 4.x. The FTB command is used to set up to 32 FOV values into the FOV Table for the serial. dJ1-G FOV command. These values aa, bb, cc, ... can be in the range of 0 to 65535. If no values are given FTB will respond by printing out the currently active FOV fraction followed by the Fov Table. The FTB method of using the FOV command limits the user to 32 FOV fractions, but the user is free to enter any value thet may be required, anywhere in the table. Upon receiving the serial drt-G command, the second byte will be used to index into the Fov Table. If the byte is 30h ·0·, the first table entry is selected. If the byte is 4Fh ·0". then the last table entry is selected.

GOTO Format: Range:

GOTO line# only defined line numbers

Causes an unconditional jump to line'. (See CHKJMP for details on speeding up GOTO's).

37

Chapter 7, Command Set

11

GSB Format: Range:

GSB line# only defined line numbers

Calls a subroutine at Dne#. The system will allow 10 levels of subroutine depth. Each subroutine must be tenninated by a RET command. (See CHKJMP for details on speeding up GSB's.)

HDWOFF Format:

HDWOFF (XHDWOFF or YHDWOFF in Vers S.x)

Tenninates all the different hand wheel modes enabled by the HDWON, HDWON3 and HDWON4 modes. If in an offset mode (mode 3 or 4), the HDWOFF command will leave the axis where it was in the "shifted" position. If the axis is needed to be left "unshifted". the RES2 command must be done. --

HDWON Format:

HDWON {[ 3 I 4 ]} (XHDWON {x} or YHDWON {y} in Vers S.x)

This command enables the Aux. feedback to be used as a hand wheel input. After this command. the Axis will move according to pulses coming in on the Aux. feedback. The Aux. feedback in this case could be wired to an encoder that is linked to a transfer line. The axis will move on a 1:1 (default) ratio. This ratio can be changed by the IPR command. In Vers 3.x. this command can be used with the CAM mode as well as regular MOVEs. Also in Vers 3.x RUN and ESC will tum off the HDWON mode.

HDWON 3 This command sets the card for the offset mode. In this mode the pulses coming in on the Aux. Encoder port (P9) are added (or subtracted) to the move or series of moves currently in progress. This feature allows an existing profile to be shifted up or down. left or right by feeding pulses into the Aux. Encoder port. This shifting will be done with the ratio set by the IPR command (on the fly if needed!). As a practical example. this command allows an XY-water jet cutting machine to cut patterns on a moving sheet of material if an encoder is mounted on the moving belt and fed into the Aux. Encoder port of the axis.

HDWON 4 This command is identical to HDWON 3 except it uses the PC BUSS (ISA bus) port for pulses.

HELP Format:

HELP

Displays the version number. card address and all the available commands. In multiaxis systems it is sometimes difficult to remember which card has been addressed during debug sessions. and this provides a method of verifying which card is being addressed.

HOME Format:

HOME (XHOME or YHOME in Ver S.x)

Executing this command causes the axis to seek its reference position. For the reference position, the system can be configured to seek a home limit switch and then a marker pulse or it can be configured to only seek the marker pulse. This can all be set up in the home parameters.

Home Sequence-

1.

-

When the HOME command is given, the axis starts to travel [either positive or negative] towards the user supplied home limit switch using an ACC of P21 and a VEL of P23. Bit 4 (Run Program Mode) of status 2 (ctrl-Y) is set. P23 defines how fast it is desired for the axis to travel towards the user supplied limit switch. This is usually set quite high to facilitate rapid homing. There are two factors that put a ceiling on the homing speed. The first is that the homing switch must be kept on even after the overshoot, which is proportional to the approach speed, occurs. The second factor is that any hard travel limits need to be avoided. P26 contains both the direction to home to and the number of pulses to move past where the home switch doses. If P26 is set to 1 the home will be done in the positive direction and the final home position will be 1 pulse beyond the first marker encountered after the home switch doses: if -1, the home will be done in the negative direction.

ACR1000 Users Guide

38

III

After the HOME limit switch (defined by the bit number in P25) is closed, the axis will continue moving P26 pulses. It is during this move of the P26 pulses that then STP ramp will be used. If P26 is very small, there will be no noticeable STP ramp and the motor will come to a quick halt. NOTE: It is important to ensure that the home switch remains closed the entire time the machine is beyond where the home switch doses. For this reason it is recommended that P26 be ±1 unless it is important that a STP ramp be used to decelerate to a stop. 3. The motor will then reverse direction and, using P24 for VEL, will move back P26 pulses. P24 defines how fast the axis will travel away from the limit switch after it first hits the switch. This is usually set quit slow compared to P23. It is a good idea to keep P24 small enough to prevent the marker pulse from being missed. At this point the motor is at the place where the home switch is first dosed. 4. When the switch opens, the axis reverses direction again and keeps on going until it sees a marker pulse. It will then move P26 pulses back from the marker pulse and Reset the position. The home sequence is complete and the current position will now read 00000000. Bit 4 of status 2 is cleared. Since the marker pulse is generated by the encoder once every revolution of the encoder at precisely the same shaft position, the axis will stop in precisely the same point every time. Example: P21 10 ACC 10 STP 10 P22 10 VEL 100 P23 100 VEL 10 P24 10 INPUT RELAY 00 P25 0 MOV 1 P26 1 Given the above values, the axis will travel at velocity 100 in the positive direction until INPUT 00 is energized and 1 pulse has been counted. Then the axis will travel in the negative direction at VEL 10 until INPUT 00 is de-energized. Then axis will then move in the positive direction at VEL 10 until it sees the marker pulse and then it moves 1 additional pulse. Then the axis zeros out the position registers and ends the home sequence. 2.

= = = = =

=

Homing A Rotary Table Sometimes it will be necessary to have the axis not seek the limit switch but instead only seek the marker pulse on the encoder. In this case parameter P25 can be changed to an input that keeps changing all the time. This will simulate the limit switch opening and closing rapidly. An input that will do this is the 0.1 second TICK. The number of this input is 101. The PLC must be tumed on for the PLC tick to work. As an example: 10 P25 101 20 P21 = 10 30 P22 = 10 40 P23 =100 50 P24 =10 60 P26 =1 70 PON 80 HOME Custom Home Sequences The following sub-routine is the FastBasic equivalent to the program the HOME command runs. This program may be modified and run (with a GOSUB) in place of HOME for special homing applications. 110 ACC P21 :REM set up ACC, STP and VEL (to horne) parameters 120 STP -P22130 VEL P23 140 INT P25 :REM move pulses beyond where closes 150 MOV P26 160 INH -96 :REM wait until move is done 170 OWL 5 180 VEL P24 :REM set up VEL (from home) parameter 190 INT -P25 :REM move -p26 pulses beyond where opens 200 MOV -P26 210 OWL 5 220 INH -96 :REM wait until move is done (at horne switch) 230 INT -106 :REM move pulses beyond next marker pulse 240 MOV P26 250 INH -96

39

Chapter 7, Command Set

111

260 RES 270 RET

IF THEN Format:

IF statement THEN command { : command} ( else continue on next line. )

This type of command is called a conditional. If the statement part is true, the program will execute the command following the THEN. If the statement is false, the rest of the line will be ignored and the program will execute the command on the next numbered line. The command following the THEN can be any valid command from the command set, optionally· followed by a : and another command. If the command is a GOTO, program execution will transfer to that line number. Statement can check the status of various inputs, outputs. miscellaneous relays. value of timers and counters. All of these must be referenced by their unique address number. For comparisons. statement can use the following operators. < less than >

=

greater than equal to less or equal to greater or equal to . not equal to

= The default condition is to test for non-zero. values. For example, IF 12 1 THEN GOTO 100 can be abbreviated IF 12 THEN GOTO 100. NOTE: When comparing the state of relays, only the equal to condition should be used. This is because a relay can either be equal to 0 (OFF) or 1 (ON). The rest of the conditions are used for comparing counters. timers or parameters. For example, to jump to line 10 if counterO (address 110) is greater than 5. one would use the following: IF 110 > 5 THEN GOTO 10 Because the command can be another conditional, multiple IFs may be included on the same line. For example: 100 IF 0 THEN IF 1 THEN IF 2 THEN MOV 1000 On running line 100, the axis will move to 1000 if inputs 0, 1 and 2 were all energized. A complete list of various inputs, outputs is given in Section 4.7 . . When referencing inputs indirectly, load the input number into a parameter, then precede the parameter reference by a #. For example: IF #P10 = 1 THEN PRINT "INPUT #";P10;" IS ON" When comparing parameters, simply use Pxx where xx is 1 through 50. For example: IF P10=55 then PRINT "PARAMETER 10 has value 55"

INH Format:

INH [± xx

=

III =JJ ]

These commands are used to halt program execution until some 110 condition has been met. INH:I: xx results in the program waiting until relay number xx becomes HI or LOW as indicated by + or - sign (the + sign is optional). INH II JJ will wait until timer or counter# II becomes equal to JJ (JJ is a number between 0 - 255 and II is a number between 108 - 115). This command can be tenninated by the ESC (escape) command. The valid range for xx are addresses 00 through 107 and 118. (For the table of all inputs and outputs see chapter 10. With an INH command in progress, the PLC section and any on-going MOVE will continue on uninterrupted.

=

IHPOS Fonnat:

IHPOS

± [ xxx I Pxx ] { • S. encoder number} { , T, timeout value }.

Only available in Ver 3.x. The IHPOS (Inhibit position) command will halt the foreground program until the encoder reaches the given position or the optional time-out value is reached. There are two optional parameters to this command-Source and TIme-out. The Source (5) parameter allows the user to specify an encoder other than the defauH main encoder. The Time-out (T) parameter will allow the user to specify the maximum amount of time the II-iPOS command will wait, in hundredths of a second. A positive [ xxx I Pxx ] value will cause a wait until the encoder value is !Teater than the position or the time-out value has been reached. A negative [ xxx I Pxx ] value will cause a wait until the encoder value is equal to or less than the position or the time-out value has been reached.

ACR1000 User's Guide

40

Examp.es IHPOS P30 IHPOS -10020 IHPOS P30,S,2

Wait until the main encoder value is greater than the value in P30. Wait until the main encoder value is less than or equal to -H)()20. Wait until the handwheel encoder value is greater than the value in P30. IHPOS P30, T,200 Wait until the main encoder value is greater than the value in P30 or two seconds have ~, whichever comes first. IHPOS -P30,S,2, T,500 Wait until the handwheel encoder value is less than or equal to the value in P30 or five seconds have ~ whichever comes first. NOTE: When both the source (S) and Time-out (T) parameters are specified, the Source parameter must come first. Lower-case letters are not allowed.

Programming examples 100 110 120 130

RDPOS 1,P30 ADD 1000,P30 IHPOS P30 REM wait for position to be 1000 pulses ahead of location in line 100

100 105 110 120 130

IHPOS SOO,S,2,T,400 REM wait for aux. encoder to get to 500 or 4 seconds to pass. JOG: REM JOG axis IHPOS lS00,S,2 : REM until aux. encoder gets to 1500 SET 75: REM set feed hold request to cancel JOG

INP Format:

INP Px Tyy , Tzz I

Only available in Ver 2.7x and 4.x. Reads the thumbwheel input module THS16 into a specified parameter. The thumbwheel module is addressed as each digit positions. The positions are TO ... T1S. The INP command allows reading up to 4 digit at a time into 16 bit parameters and 8 digits at a time into 32 and 40 bit parameters via a single command. The numbers are read in BCD fonn. The Px specifies the parameter, Tyy specifies the starting thumbwheel position and Tzz specifies the end thumbwheel position. The starting thumbwheel pOSition will be the least Significant digit and the ending thumbwheel position, the most significant digit.

INPUT Format:

INPUT { ; } { " prompt string

tI [

;

I, ] } Px,

Py

Only available in Ver 2.6x, 3.x and S.x. The INPUT command allows numbers or characters to be entered from a RS-232 device connected to the ACR1000 The command needs two parameters as arguments. The first parameter, Px, controls the mode in which the INPUT command works and holds any error codes that INPUT may return after it is done. The second parameter, Py, holds the value that was collected by the INPUT command. This may be a number or an ASCII value. This will get a number or character, as specified by Px, and place the result into Py. Certain return codes may be returned in Px. If the first semi-colon is included (after the INPUT command) then the characters the user types in response the command will not be echoed back to the user. If the prompt string is included it will be printed out before the input takes place. A semi-colon after the prompt string will suppress the nonnal characters from being sent after the prompt string. If a semi-colon is not used, a comma nlfedS to be put after, the prompt string.

card.

Px values and valid return codes

1: Get a decimal number. Vali,d input characters are 0.. 9,.,- and +. The number may be either fractional or integer, however remember that a fractional number cannot be assigned to a integer Py parameter (PO .. P3S). The INPUT command will continue to collect characters until a is found or a Fonnat Error occurs. Return codes 8: No digits entered, only was typed. Px will hold a zero. 10: Fonnat error. Got a character not in the set (0 .. 9,+,-,.) while getting a number. 2: Wait for the next character, return its ASCII value. There are no defined return values for this mode. 4:

Get a character that is already in the input buffer and return it's ACSII valu&-do not wait for a new character. If no characters are in the input buffer, Py will retum holding a zero, which is the ASCII value

41

Chapter 7, Command Set

III

· ~. ~ ,

~;,

. ...... , ...... '....

for null. There are no defined return values for this mode.

Examp Ies P8=1 INPUT P8,P15 P8=1 INPUT P8,P40

Get a number and return it is PIS. Only integers may

be put into PIS.

Get a number and return it is P40. P40 may hold an integer or a fractional number.

Programming examples 100 110 120 130 140 150 160 170 10 20 30 40 50 60

PRINT "ENTER NUMBER. HIT JUST TO QUIT" P8=1 INPUT P8,P40 PS=P40 PRINT: PRINT "NUMBER YOU TYPED,";P40 PRINT "INTEGER PART OF WHAT YOU TYPED: "iPS IF P8=8 THEN PRINT "DONE •.• ": END GOTO 100

P8=4 INPUT "HIT A KEY. TO QUIT.",P8,PS IF PS=O THEN PRINT "."i: GOTO 10 PRINT: PRINT "KEY WITH ASCII VALUE "iPSi" WAS HIT." IF PS13 THEN GOTO 110: REM 13 IS ASCII VALUE FOR PRINT "DONE ... ": END

INT Format:

INT ± xx (XINT ± xx or YINT ± xx for Ver 5.x )

This command sets up the next MOV yyyyyyy command to work in the interrupt mode. In this mode, the system will start to move the axis in the desired direction. This movement will continue until input number xx becomes HI or LOW as specified by +xx or -xx. After this the system will move the axis the incremental distance of yyyyyyy. This mode of operation is only active for one MOVE. The valid range for xx is addresses 00 through 107 and 118. (For the table of all inputs and outputs see chapter 10.

IPS Format: Units: Range:

IPS xxx (XIPB xxx or YIPB xxx for Ver 5.x ) encoder pulses O=disable. 1 ... 255

This command sets the In Position Band. If an axis move is no longer in progress, and position is within the IPB window, the Not In Position (104 for Main axis) flag will clear. To set this band, use IPB xxx where xxx is the number of pulses desired. Zero will disables the fundion and 104 always returns clear.

IPR Format: Units: Range:

IPR xxx { • yyy} (XIPR xxx{ YYY } or YIPR xxx { YYY } for Ver 5.x ) 1/65536 O=disable,1 -16777215 J

J

This command sets up the rate-muHiplier mode for applications that require Master/Slave shaft synchronization. xxx can be a number between 1 and 16777215 (0 will cancellPR mode aHogether). When the number is 1, the pulse ratio is 1:65536. When the number is 65536, the ratio is 1:1. When the number is 16777215, the ratio is 256:1 ~ The optional yyy is a position offset that can be obtained when the IPR mode is entered. This position offset will cause the axis to immediately JUMP, forward or backward, by the number of pulses entered. Versions 2.6.x & 3.x have provision for an optional High Precision IPR mode. In this mode 1:1 is . represented by 16777216-thus the steps have 256 times the resolution as the normal IPR. Contad the fadory about details on getting this "feature. If followed by a HDWON command, IPR sets the ratio between handwheel and axis movement. IPR can be changed ·on the fly" without having to disable the handwheel. If followed by a MOVE command, it sets the ratio as well, but the handwheel is used to control the velocity of the desired move. Changing IPR during a move will not change the ratio for that move, but set the ratio for the next move. The FED command cancels IPR mode, resetting 1:1 ratio.

ACR1000 Users Guide

42

III

.

JOG Format:

JOG ± (XJOG ± or YJOG ± for Ver 5.x )

This command starts the Axis moving in the positive direction. The motion will continue until a Feed-hold or ESC is hit. As an alternative, ctr1-F can also be used to Jog in the positive direction and ctr1-R can also be used to Jog in the negative direction.

LIST Format:

LIST { from line# } {

Range:

0 - 65535

I

}

{

to line# }

This command will list part or all of the program in memory. The ACR1000 will list all commands in their complete, rather than abbreviated fonn. Program line#'s are in the range of 0 - 65535. Without the optional arguments the command will list the entire program. LIST Following the LIST command with a line# will list only that line#. LIST 100 Following the from line# with a comma will list from that line to the end of the program. LIST 100, Preceding the to line# with a comma will list the program from the beginning to the specified line. LIST ,100 Following the LIST command with the from line#, comma, to line#, will list the program from the first line up to and including the second line. LIST 100,200

MEM Format:

MEM { Px }

For versions 3.X and S.x executing a MEM command will return the RAM memory available in bytes. Optionally. following MEM with a parameter will load the parameter with this value.

MOVE MOVE { I } 1: xxx (XMOV { I } 1: xXx or YMOV { I } 1: xxx for Ver 5.x ) encoder pulses This command causes the axis to move to the absolute position xxx. For incremental moves, preface the move distance with a slash. i.e. MOV Ixxx. The system will ramp the axis up or down to the velocity last

Format: Units:

commanded by the VEL command using the ramp last commanded by the ACC or DEC commands. If STP is zeroed out, the Axis will be traveling at the programmed velocity (providing the length of the MOVE is of sufficient length) at the end of its move. If STP has been set to a non zero value. the axis will ramp down to a stop at the end of the MOVE. ACCIDEC/STPNEL must all be set prior to executing a MOVE, and will remain active until changed. Ver 4.x will allow users to change VELOCITY on the fly. See FOV command. If no MOVE is already in progress when a MOVE command is received, the ACR1000 will start the motion and immediately continue on to the next instruction in the program. If it is desired to wait for motion to complete, ~~_e ACR1000 must specifically be instructed to do so. INH -96 or INH -104 are two convenient commands for this purpose. In the case that a MOVE command is received while one is already in progress, the ACR1000 will wait for the previous MOVE to finish before starting the new one. If running a program, the program will pause for this duration. If MOVE commands are being sent to the ACR1000 in the command mode, the commands will back up in the communication buffer. Being aware of the way the system buffers move commands allows applications to be streamlined and eliminates delays between subsequent moves. As in the case with most commands, instead of specifying a number as an argument, a Parameter reference can be used. This way, the number of pulses to move to can be read from P1, P2, ... P50. The ACR1 000 is capable of both linear and circular interpolated motion. Refer to chapter 8 for more details. I

Chapter 7, Command Set

43 III

MUL Format:

MUl [ xxx I Px ] , Py

This command multiplies Py by a constant xxx or a Px and stores the result back into Py.

NEW Format:

NEW

This command clears the entire program memory. This command should only be used when a brand new program is going to be entered into the program memory. Parameter values, as well as CAM and SSC tables remain intact.

NOT Format:

NOTPx

This command logically inverts the value of Parameter Px. 00 not confuse this with the additive inverse. (NOT 5 6)

=-

OR Format:

OR [ xxx I Px ] , Py

This command logically OR's Py by a constant xxx or a Px and stores the result back into Py. This is NOT addition. (2 OR 2 2 )

=

PBOOT Format:

PBOOT

This command allows a user program to be run automatically whenever the ACR1000 card is powered up. When the power is first applied to the board the system checks to see if the first command is PBOOT, if so, it automatically starts to execute the rest of the program. This command only works, if it is the VERY FIRST command in the program.

PEEK Format:

PEEK start-hex { , length-hex}

This command will print length-hex number of bytes starting at hex address starl-hex. If only the start address is given, the contents of one byte is printed. For example: PEEK 4400, 10 will print out the first 16 (= 10 hexadecimal) bytes of the first PLC scan.·

PID Format:

PIO { P

=pp • } { 1=ii , } { 10 =id} { IL =il,}

(XPIO or YPIO for vS.x)

The arguments for the PIO command are all optional. If all arguments are omitted, the ACR1000 will respond by printing out all PIO values. The PIO command provides software controlled Proportional and Integral gains. The I gain creates an auto-balance feature which automatically compensates for any position offset when the motor is at rest. In v3.x and v5.x, if the 10 argument is set to 0, the I term will be active during the move as well. Proportional Gam (P) The P tenn of the PIO sets the proportional servo gain. The valid range for this parameter is 1-255. This corresponds to a range of gains between .0625 and 15.9375. To select a proper P value, multiply the gain required by 16 and round up to the nearest whole number. P value Gain 40 2.5 16 1 8 .5 4 .25 Setting a value greater than 255 (gain of 15.9375) will return a -range erro('. f

Integral-Gain (I) The I term of the PIO sets the degree of response the signal will have to a given amount of offset error

ACR1000 User's Guide

44

11

while at rest, or following error while in motion. Setting this value too large will result in overcompensation and oscillation will occur when the system is at rest. It is best to start with 1, and work up from there. Setting this parameter to 0 will disable the integration aHogether, but still use whatever offset has been derived during the time the integration was enabled. Since the error in a typical system at rest tends to oscillate within a pulse or so, having the integration on may increase the size of this "flutter". Zeroing the gain parameter once any offset has been compensated for, allows the user to minimize this adion. Having the integration enabled maintains an offset value which is added to the error signal produced by the card. The action of disabling the integration leaves this value intact. The value is no longer updated, but still used. The only way to reset this value to zero with the integrator turned off is to reset the card or set the IL parameter to 0 while the PLC is on. NOTE: In v3.x and vS.x the PLC must be turned on for the I tenn to be active.

Integration-Delay (10) The 10 parameter of the PIO sets the amount of time to wait (delay) after a move is over before enabling the I term. Always in v4.x or when the 10 tenn is not set to zero in the other versions, the integrator is turned off whenever an axis' internal motion counters are moving. As the normal behavior of a following error based servo control is for the physical motion to lag slightly behind this internal position counter, a delay must be used to establish when to enable the integrator. This delay should be set long enough to allow the motion to settle before the integrator is turned on. Failure to do so will result in adding oscillation to the end of a movement. The range of this value is from 0 (no delay) to 255. In v3.x or v5.x, if the 10 term is set to 0 the integrator will be enabled during the move. This can be used to zero out a small amount of following error. Note that since the maximum value of the IL term is 127, this will not usually be able to get rid of all of the follOwing error unless it is used in conjunction with the Feed Forward system parameter(s). The actual time delay is derived by following formula: delay (in ms) = 10*7 ver 3.X and ver 5.X delay (in ms) = 10*15 ver 4.X

1 limit (IL) The IL term of the PIO sets a limit on the contribution the integrator can make to the error signal. The value has a range from 0 to 127 (unsigned). This keeps the integrator from winding itself up to full voltage in case of a jam. What to do with the GAIN & OFFSET Pots With the PIO feature, the user need not adjust the factory settings of the gain and offset pots on the ACR1000/16 but the pots will indeed affect the output. In general, the GAIN Pot is first set so it gives UNITY gain. This means that for a departure of 4095 pulses it should put out -10v. This adjustment, if needed, must be made with the Proportional Gain set to 1(PIO P=16). The offset pot can be used to . adjust a system offset. See chapter 13 for details.

POF Format:

POF

This command turns off the PLC portion of the ACR1000. The 12 outputs will remain in the state they were in when the POF was executed. This instruction is forced by the system whenever the PLC program is modified by the user. Therefore, after any PLC modification, the user must do a PON instruction to restart the PLC program.

POKE Format: POKE start-hex = aa {, bb , CC, dd ... } This command allows entering hex numbers into sequential memory locations. Byte aa will be stored into hex address start-hex, bb will go into address start-hex+1, cc into start-hex+2, dd into start-hex+3 and so on for each byte on the list. This can be used to enter 1 to 20 bytes on the same line. Care should be taken when using this command. The only valid memory locations that the user can poke into are the 6 separate ranges allocated to the Programmable Logic Controller (PLC) and setting up TIMERS and COUNTERS. See chapter 10 for detail~ on the PLC. WARNING: Poking values outside of the valid range may have very serious consequences.

45

Chapter 7, Command Set

III

PON Format:

PON { [ + II ] }

This command instructs the system to scan the Programmable Logic Controller [PLC] memory for the users program [referred to as the PLC program]. If the memory contains a program that the user has entered, the system will check the entire program for invalid commands. After verification, the PLC relays, timers, and sequencer will be initialized then the ladder logic will start executing. The 12 outputs and other internal relays then follow the directions of the PLC program, starting at the first bank of PLC code. In order to re-start the PLC without initialization, use PON+. This will continue the PLC from where it left off when the POF command was given (see POF). A very powerful extension has been added to the basic PON that will allow custom machine language code to run simultaneously with the execution of the main BASIC program. Using PON I to tum on the PLC eliminates the normal validity check and allows this custom code to run. Applications for this include position monitoring, custom flags, etc. Nonnally. the proper code for unique applicatio~ WlU have to be supplied by AMCS as a thorough knowledge of ACR1 000 internals is required. WARNING: Do not use this command for nonnal PLC program applications, any erroneous PLC command codes entered will not be spotted and may cause unpredidable behavior of ACR1000 fundions.

PRINT Format:

PRINT { [ "string" I Px] {; [ "string" I Px ]} }

Instead of PRINT a question mark may be used. For example to find the value of P1 use PRINT P1 or ?P1. The PRINT statement can also be used to print any ASCII string delimited by double quotation marks. PRINT "PRESS CYCLE START" will result in the message being printed. A semicolon after the PRINT command will suppress the carriage return and line feed that normally follows the printed item. CHR$(xx)- Used With PRINT Command (v2.6x,v3.x and v5.x) This function is used in conjunction with the PRINT statement to send non standard control codes to the output. In the command. xx can be any number in the range of 00 .. 127. This feature allows interfacing to display devices that require special control codes to operate.

Format:

PRINT CHR$( [ xx I Py I &Hzz ] ){;}

Where xx = decimal value 0-127; Py = parameter number; Hzz = hexadecimal value 0-7Fh. The optional semi-colon will suppress the normal from being sent out.

PROM Format:

PROM {IT} {/U}

For dedicated applications that run entirely on ACR-1 000, it may be desirable to install the program into an EPROM. The PROM command allows dumping the program to an EPROM burner that is capable of understanding INTEL-HEX format. It works by "merging" the application program with the executive program to create an EPROM that replaces the executive EPROM (IC26). A 250 nanosecond or faster 27256 is required on ACR 1000 boards with 16 MHTZ or slower crystal. A 70 nanosecond or faster 27256 is required on ACR1 000 boards with 19 MHTZ or faster crystal.

I•

Before executing the PROM command, it is a good idea to run·CHKJMP to make sure the program is free of any branch-related errors. CHKJMPIF should be executed if you wish for program branching to be sped up for this EPROM (see CHKJMP for details). If the program needs to automatically start running on power-up, make sure the first line is a PBOOT command.

Executing PROM will result in display of the program size and the amount of space available in the executive EPROM to contain it. If there is insufficient space, the PROM command will abort. displaying "NOT ENOUGH SPACE". (If DELREM has not been run. doing so may reduce the program sufficiently to allow it to fit. REM's take a lot of space! See DELREM for details.) If all is OK, the command will wait for a' key press. then delay for a time before dumping to the burner. The delay default is 10 seconds, and may be changed with the IT switch. Example: PROM 1T25 will delay for 25 seconds before dumping. This will allow you to switch cables to connect the ACR-1 000 serial port to the ROM burner. The PROM command may be aborted at any time by sending an Escape to the card. Otherwise, it will dump the executive and the user program out to the PROM burner. followed by a checksum for all of the ACR1000 Users Guide

46

data sent. Once the new EPROM is burned, power down the ACR-1 000 and replace 1C-26 (a 27256 EPROM) with the new EPROM. Put the original EPROM in a safe place, as you may need it again later. (If the program in RAM is not exadly the same as the one in the new EPROM you may have to do a cold start. See Cold Starting.) Power up the card with a tenninal attached to the serial port. The card will now perfonn a validity check on the new EPROM. If anything does not check out, it will flash the red LED (User Relay) and report "ROM ERR". If this occurs, do not use this new EPROM. Detennine the cause of the problem, replace the new EPROM with the original EPROM. Load the program back into the ACR1000, correct the problem and repeat the PROM command. If all checks out OK. you now have an exact duplicate of what was in RAM and the program will function as before. This EPROM may be duplicated to produce exact copies of the application program for other ACR-1 OOO's. When the card is powered up, execution of the program will be from EPROM. The LIST command worts as before, but will now list the contents of EPROM. If for some reason, you wish to run a program from RAM on this card, stop the ~ram and issue a NEW command. You may now load up a new program. This program will only be available until RESET is pressed or the card powered down, at which time the card will revert to running the EPROM program. This feature is provided primarily for debugging purposes. As an additional time saving feature, the application program by itself may be dumped to a PROM burner using the IU switch. {Example: PROM IU . This can be combined with the timer switch in any order. To use this feature, the PROM burner must be able to recognize the address information in the INTEL-HEX dump sent to it, and must be able either to bum new infonnation into a non-blank EPROM or have separate "load" and "bum" fundions .. This allows the Original ACR1000 executive EPROM to either be modified directly (if you do not have any other EPROMS around, this is very risky), or loaded into the ROM burner prior to dumping the application program data. In most cases, it will be easier just to use the standard PROM command without this switch.

ROFE Format:

ROFE { Px }

Only in v3.x. Read Following Error anows the program to read the following error and then ad on it. If the optional Px parameter is specified, the position will be put into this parameter otherwise it will just print out the value.

ROPOS Format:

ROPOS encoder# { Px } I

This command allows the ACR1000 to read the position of encoders attached to the ACR1000. The encoder# parameter needs to be a number representing the encoder to be read, 1 being the main encoder, 2 the aux. (hand wheel) encoder, etc. If the optional Px parameter is specified, the poSition will be put into this parameter. Note that since poSitions are 32 bit numbers, this parameter should be P26 or larger.

REM Format:

REM any-string

This command inserts a Remark line in the user program. The user can write any comment following this command. This is useful for documentation. Note that it is never good practice to branch to REM commands as this will cause problems if the DELREM command is later used. Also everything on this line following the REM will be ignored, including : command separator. 10 REMEMBER this is only a remark! P2 = PS P2 is not changed.

REN Format:

REN {X}

This command reads the shaft position of the currently enabled feedback encoder into the internal command position. As a result, the DC Analog output is zeroed and the internal command position reflects the present shaft position. REN is commonly used in conjundion with an Emergency Stop fundion to prevent a jump when power is returned to the motor. (In case the motor shaft was turned while power was disconnected.) NOTE: REN1 and REN2 disable ballscrew compensation (see SSC). The ACR-1000/12 maintains position counts for both the main and auxiliary encoders. This allows one ACR-1000 to control 2 motors by switching the analog output between drive amplifiers. As long as the application does not require simuHaneous two-motor operation, this is a viable way to save cost. One can even save the cost of an amplifier by switching it between the two motors if some method of holding Chapter 7, Command Set

47

position for the de-energized motor is provided. The ACR1 000/16 can maintain position for up to 4 encoders. REN 1 (v2.6.x, v3.x) Switches the ACR1000 to use the MAIN encoder as its position feedback. REN 2 (v2.6.x, v3.x) Switches the ACR1000 to use the AUX encoder for its position feedback. REN 1, REN 2 (vS.x) For the ACR1 000/16 wN5-.0 Software, two independent axes positions are kept. In this case REN by itself will always operate on the X Axes just like REN 1. REN 2 will now operate on the Y Axes. There is no switching concept on this version software.

RES Format:

RES {X}

This command will reset currently enabled registers to default feedback and command values. RES will wait for any move in progress to complete before executing. RES clears the -currently enabled feedback ," counter, initializes the current position to zero and updates the encoder multiplier based on parameter P2 or P3. This command is used by the HOME sequence to initialize the axis. NOTE: RES1 and RES2 disable ballscrew compensation. Because the ACR 1000/12 system has the capability to look at 2 encoders, internally it maintains two separate positions, one for each encoder. (See REN command for more details.) If two encoders are being used, specialized forms of the RES command will be useful.

RES 1 Resets the main feedback counter to zero and initializes the main encoder current position count to zero. This command is used by the HOME sequence to initialize the axis.

RES 2 Resets the AUX feedback counter and initializes the aux. encoder current position count to zero. If the system was in the hand wheel 3 mode, this command will cause the axis to jump back to its non-offset position. If this jumping is not desirable, execute a HDWOFF command first.

RES 3, RES 4 Resets the 3rd and 4th feedback counters respectively and initializes the current encoder position count to zero. These commands are offered only in versions 3.x and 5.x with the Encoder Daughter board on the ACR1000/16. '

RET Format:

RET

Causes a return jump back to the line following the one that called the subroutine. This command must be the last command in a subroutine. The system allows up to 10 levels of subroutines to -be nested~ A· "RETURN W/O GOSUB" error will result if a RET command is encountered without a prior GOSUB command.

RNM Format:

RNM { {new}, { old} , { inc} , { limit} }

Available in v2.6x, v3.x and v5.x. This command allows you to renumber all or part of your program. This command renumbers the program starting at old up to limit using new as the new starting line number and inc as the step size from line to line. All parameters are optional but order dependent. Entering RNM by itself will renumber the complete program, resulting in a program starting at line 10 and numbered by 10's. The default value for new is 10. The default for old is the first line of the program. The default for inc is 10. The default for limit is the end of the program. Remember to include commas between all arguments for the RNM command. even when using default values-otherwise the command will not know which argument is which. Example: RNM • • 5 renumbers the whole program starting at 10 counting by 5's. Attempting to use RNM within a program will not wort, it is inherently an editing command. RNM checks the validity of all the branches in the program while it is executing, as it must reconcile the new destination

ACR1000 Users Guide

48

line numbers. If it finds a branch to non-existent line number, it will return the message "WARNING UNDEFINED LINE" and continue on with the rest of its task. RNM will not change the destinations for these lines. It is important to realize that after renumbering, these invalid branch lines may end up pointing to existing lines and running the program may have unpredidable results.

RUN Format:

RUN

This command internally does a HDWOFF command and starts execution of the program in memory at the very first line.

SAMP Format:

SAMP Sx. Tx

In v3.x only. The SAMP command allows the user access to position, velocity, and following error values. These values are stored in the user defined array (P) which must be set up prior to the execution of the SAMP command. A sample is taken and stored every controller cycle (468 microseconds). The SAMP command will continue taking samples until the array is filled. Sampling is not enabled until relay 122 is set. After sampling has been enabled, sampling will begin upon receipt of the next trigger. When sampling is complete (the array is full) relay 122 will be cleared. Example: 100 REM Sample main axis following error at the beginning of a MOVE command 110 DIM 2000,2 :REM Set up (P) array to hold 2000 long integer values 120 SAMP 7,71 :REM Set up sample command to sample main axis following 121 REM error trigger is set as USERO (relay 71) 130 SET 122 :REM Enable sampling 140 SET 71 :REM Set the trigger to begin sampling 150 MOVE/25000 :REM Make an incremental move of 25000 pulses 160 INH -122 : REM Wait for sampling to complete Note: The (P) array now contains 2000 main axis follOwing error values taken at intervals of 468 microseconds. Sx deSignates the SOURCE of the data to be sampled. 01 - Main encoder 02 - Auxilary encoder 03 - Encoder daughter board #1 04 - Encoder daughter board #2 05 - Main axis command position 06 - Main axis command velocity 07 - Main axis following error Note: 01 to 05 return 32 bit values(DIM x,4). 06 & 07 return 16 bit values(DIM x.2). Tx designates the trigger which starts the sampling process. 71 - USER 0 relay 96 - MOV_EN flag Note: SAMP 2, 96 should be done with HDWON 3 not HDWON. Eratica: SAMP 4,x returns following error in v3.2s & lower. Fixed in v3.26. SAMP x.71 doesn' trigger correctly in v3.24 & v3.2s.

SET Format:

SET [XX I aa = bb]

This command sets the relay at address xx or sets the counterltimer at address aa to value bb. Valid values for xx are in the ranges 12-83 and 116-120. Valid values for aa are 108-115 and for bb, 0-255. This command is modal and the output remains set until cleared by a CLR command or as commanded by the PLe program. If xx is 116. outputs 12 through 23 will all be set. This is useful for initialization. Note that the PLe has precedence on the outputs. This means that if the PLe is controlling an output in the ladder, that output may be changed by the PLC program. It is perfectly valid to set an output from a program if the PLe only uses its contad. Two control code commands allow setting and clearing of relays while the ACR 1000 is running a program. To set a relay, send a FS (28d11Ch/= P36. The argument to the function must be expressed in radians.

SQRT Format:

SQRTPx

This command takes the square root of the value in Px and retums the resuH in Px. If the-fractional part of the result is important be sure to use a Px >= P36.

STP Format: Range:

STP xxx (XSTP xxx or YSTP xxx for v5.x ) 1 - 255

Tells the system to come to a complete haH at the end of the next MOVE and use xxx as the linear decel ramp. If a continuous set of moves is required, STP must be set to O. In v2.6x and 3.x, an STP value of 1 corresponds to an acceleration ramp of 35555.5 pulses per second per second. In v2.7 (interpolation), automatic ACC/STPIDEC between velocities is not currently implemented. In v4.X (interpolation), automatic deceleration between velocities while maintaining interpolation is implemented and goes in increments of 1n7.7 pulses per second per second. In all cases, the programmed acceleration will be discarded if the STP parameter is such that the deceleration distance is more than half the total travel distance of the move. In this case, the result will be a triangular profile in which the axis will accelerate for half the distance, and decelerate for the rest, using the STP value for both slopes. o

SUB Format:

SUB [ xxx I Px ] , Py

Subtract Py from a constant xxx or from a Px, return the answer in Py.

TAN Format: Units:

radians

Returns the value of the tangent of Pxx back into Pxx. If the fractional part of the return value is important use Pxx >= P36. The argument to the function must be expressed in radians. -

TLM Format: Units: Range:

TLM { [ xxx I Px ] } DlA bits 0 - 4095

Only available in v3.x. If no argument is given, the TlM command will respond with the current setting. The argument to this command is in D/A bits. This command allows the user to limit the voltage going out to the D/A. For applications where the ACR1000/16 is controlling current, the TLM command essentially limits the maximum torque coming from the motor. For applications where the ACR1000/16 is controlling a velocity amplifier. the TLM command limits motor RPM. The command is modal in nature and defauHs to 4095 on power-up. Valid argumelJt are in the range of 0-4095. When an axis output is being clipped by the TLM mode, the AT_TORQUE_LlMIT bit (79h)°will be set. I

ACR1000 Users Guide

50 111

TRG Format: Range:

TRG ± xx vaJid 110 bit

Only available in version 3.26c or later. The trigger command is a special version of the inhibit (INH) command designed to work specifically with the MOVE command. Its argument is any valid I/O bit and it will trigger on high or low levels designated by + or-. Example: 100 REM Show the difference between the INH and TRG commands. 110 INH 11 : REM Wait for input 11 to become high. 120 MOVE 110000 : REM Make 10000 pulse move. 130 TRG -11 : REM Wait for input 11 to become low. 140 MOVE 110000 : REM Make 10000 pulse move. Due to the setup necessary to make a move, the move on line 120 will begin about 10 milliseconds after input 11 goes high. The move on line 140 will begin within 1 controller cyde (468 microseconds) after input 11 goes low since the trigger command allows the move to be setup ahead of time. This improved reaction time may be important if the application requires extremely rapid response times. Note: While the controller is waiting for the trigger at line 130 the MOVE_EN relay will be set even though no physical movement has taken place.

TRON Format:

TRON

This command turns the trace function on. The trace function is very valuable for debugging programs. When trace is turned on the ACR1000 will print out the line number of every line that it executes. TRON is canceled by the TROFF command. During TRON mode, the screen shows the line number the ACR1000 is about to execute.

TROFF Format:

TROFF

This turns off the trace function, see above explanation.

VEL Format:

VEL { [ xxx I Px ]} (XVEL { [ xxx I Px ] } or YVEL { [ xxx I Px ] } on vS.x )

This command sets the desired velocity. If no argument is given, the command will respond with the current setting. This command is modal and the velocity will be active until changed. For v2.6, 3.x and 5.x, VEL of 1 yields a pulse rate of 1000 pulses per minute. The velocity numbers follow RPM of the motor directly assuming 1000 pulses per 1 motor REV. So VEL 1 will yield 1 R.P.M. VEL 1000 will yield 1000 RPM. For Versions 2.7X and 4.X (interpolating), the velocities have finer resolution. In this case, VEL 1 yields 100 pulses per minute. This means that at 1000 pulses per rev, VEL 1 yields 0.1 RPM. In v2.6.x & v2.7.x, valid velocity values range from 1 to 65535. On the ACR1000/16 card the velocities have a range of 1 to 16777216. A velocity of 0 will result in no movement.

(see A~C)

XACC or YACC

XOR Format:

XOR [ xx I Px ] , Py

This command does an EXCLUSIVE OR of two parameters. The first operand can either be a constant or a parameter reference. The answer is stored in the second operand.

51

Chapter 7, Command Set

III

.-, ,,

ACR1000 User's Guide

52 111