PMAC and PMAC2 Software
PMAC and PMAC2 Software
^2 PMAC / PMAC2
^4 3Ax-602204-xSxx
Table of Contents
PMAC COMMAND AND VARIABLE SUMMARY ..............................................................................................1
Notes .........................................................................................................................................................................1
Definitions.................................................................................................................................................................1
On-Line Commands ..................................................................................................................................................1
On-line Global Commands ...................................................................................................................................1
Addressing Mode Commands ..........................................................................................................................1
Communications Control Characters................................................................................................................1
General Global Commands ..............................................................................................................................2
Global Action Commands ................................................................................................................................2
Global Status Commands .................................................................................................................................2
Register Access Commands .............................................................................................................................2
PLC Control Commands ..................................................................................................................................3
Global Variable Commands .............................................................................................................................3
Buffer Control Commands ...............................................................................................................................3
MACRO Ring Commands ...............................................................................................................................4
On-line Coordinate System Commands ................................................................................................................4
Axis Definition Commands..............................................................................................................................4
General Coordinate-System Commands...........................................................................................................4
Program Control Commands ............................................................................................................................4
Coordinate-System Variable Commands .........................................................................................................4
Axis Attribute Commands................................................................................................................................5
Buffer Control Commands ...............................................................................................................................5
On-Line Motor Commands ...................................................................................................................................5
General Motor Commands ...............................................................................................................................5
Jogging Commands ..........................................................................................................................................5
Reporting Commands.......................................................................................................................................6
Buffer Control Commands ...............................................................................................................................6
Motion Program Commands .....................................................................................................................................6
Move Commands .............................................................................................................................................6
Move Mode Commands ...................................................................................................................................6
Axis Attribute Commands................................................................................................................................7
Move Attribute Commands ..............................................................................................................................7
Variable Assignment Commands .....................................................................................................................7
Program Logic Control.....................................................................................................................................7
Miscellaneous Commands................................................................................................................................8
PLC Program Commands..........................................................................................................................................9
Conditions.............................................................................................................................................................9
Actions ..................................................................................................................................................................9
PMAC I-Variable Summary....................................................................................................................................10
General Divisions ...............................................................................................................................................10
Global I-Variables ..............................................................................................................................................10
Motor I-Variables x = Motor Number (#x, x = 1 to 8} ...........................................................................................11
Motor Definition I-Variables ..............................................................................................................................11
Motor Safety I-Variables ....................................................................................................................................11
Motor Movement I-Variables..............................................................................................................................11
Motor Servo Control I-Variables {Standard PID Algorithm} ............................................................................12
Motor Servo Control I-Variables {Option 6 Extended Servo Algorithm only}...................................................12
Motor Commutation I-Variables ........................................................................................................................13
Further Motor I-Variables..................................................................................................................................13
Coordinate System I-Variables................................................................................................................................13
PMAC(1) Servo Interface Setup I-Variables...........................................................................................................14
PMAC2 Servo Interface Setup I-Variables .............................................................................................................14
Global Hardware Setup I-Variables...................................................................................................................14
Table of Contents i
PMAC/PMAC2 Software Reference Manual
ii Table of Contents
PMAC/PMAC2 Software Reference Manual
iv Table of Contents
PMAC/PMAC2 Software Reference Manual
Table of Contents v
PMAC/PMAC2 Software Reference Manual
<CONTROL-H>...............................................................................................................................................168
<CONTROL-I> ................................................................................................................................................168
<CONTROL-K>...............................................................................................................................................169
<CONTROL-L> ...............................................................................................................................................169
<CONTROL-M> ..............................................................................................................................................171
<CONTROL-N>...............................................................................................................................................171
<CONTROL-O>...............................................................................................................................................172
<CONTROL-P> ...............................................................................................................................................172
<CONTROL-Q>...............................................................................................................................................173
<CONTROL-R> ...............................................................................................................................................173
<CONTROL-S>................................................................................................................................................174
<CONTROL-T> ...............................................................................................................................................174
<CONTROL-U>...............................................................................................................................................174
<CONTROL-V> ...............................................................................................................................................175
<CONTROL-X> ...............................................................................................................................................175
<CONTROL-Y> ...............................................................................................................................................176
<CONTROL-Z> ...............................................................................................................................................176
# ........................................................................................................................................................................177
#{constant} .......................................................................................................................................................177
#{constant}-> ...................................................................................................................................................178
#{constant}->0..................................................................................................................................................178
#{constant}->{axis definition}..........................................................................................................................179
$ ........................................................................................................................................................................181
$$$ ....................................................................................................................................................................181
$$$*** ..............................................................................................................................................................182
$* ......................................................................................................................................................................183
%.......................................................................................................................................................................184
%{constant} ......................................................................................................................................................185
&{constant} ......................................................................................................................................................186
& .......................................................................................................................................................................186
< {Option 6L firmware only}.......................................................................................................................187
> {Option 6L firmware only}.......................................................................................................................187
/ .........................................................................................................................................................................188
? ........................................................................................................................................................................189
?? ......................................................................................................................................................................192
??? ....................................................................................................................................................................196
@ ......................................................................................................................................................................199
@{card} ............................................................................................................................................................199
\ .........................................................................................................................................................................200
A........................................................................................................................................................................201
ABS ...................................................................................................................................................................202
{axis}={constant} .............................................................................................................................................202
B........................................................................................................................................................................203
CHECKSUM.....................................................................................................................................................204
CLEAR ..............................................................................................................................................................204
CLEARFAULT..................................................................................................................................................205
CLOSE ..............................................................................................................................................................205
{constant} .........................................................................................................................................................205
DATE ................................................................................................................................................................206
DEFINE BLCOMP ...........................................................................................................................................206
DEFINE COMP (one-dimensional)..................................................................................................................207
DEFINE COMP (two-dimensional)..................................................................................................................209
DEFINE GATHER............................................................................................................................................212
DEFINE LOOKAHEAD {Option 6L firmware only}....................................................................................213
DEFINE ROTARY ............................................................................................................................................215
DEFINE TBUF .................................................................................................................................................217
vi Table of Contents
PMAC/PMAC2 Software Reference Manual
DEFINE TCOMP..............................................................................................................................................217
DEFINE UBUFFER .........................................................................................................................................218
DELETE BLCOMP...........................................................................................................................................219
DELETE COMP ...............................................................................................................................................220
DELETE GATHER ...........................................................................................................................................220
DELETE LOOKAHEAD {Option 6L firmware only} ...................................................................................221
DELETE PLCC.................................................................................................................................................221
DELETE ROTARY ............................................................................................................................................222
DELETE TBUF.................................................................................................................................................222
DELETE TCOMP .............................................................................................................................................223
DELETE TRACE ..............................................................................................................................................223
DISABLE PLC ..................................................................................................................................................223
DISABLE PLCC................................................................................................................................................224
EAVERSION .....................................................................................................................................................225
ENABLE PLC ...................................................................................................................................................225
ENABLE PLCC.................................................................................................................................................226
ENDGATHER ...................................................................................................................................................227
F........................................................................................................................................................................227
FRAX ................................................................................................................................................................228
GATHER...........................................................................................................................................................229
H .......................................................................................................................................................................229
HOME...............................................................................................................................................................230
HOMEZ ............................................................................................................................................................231
I{constant} ........................................................................................................................................................231
I{constant}={expression} .................................................................................................................................232
I{constant}=* ...................................................................................................................................................233
INC ...................................................................................................................................................................233
J! .......................................................................................................................................................................234
J+......................................................................................................................................................................234
J- .......................................................................................................................................................................235
J/ .......................................................................................................................................................................235
J:{constant} ......................................................................................................................................................236
J:* .....................................................................................................................................................................236
J=......................................................................................................................................................................237
J={constant} ....................................................................................................................................................237
J=*....................................................................................................................................................................238
J=={constant} ..................................................................................................................................................239
J^{constant} ......................................................................................................................................................239
J^*.....................................................................................................................................................................240
{jog command}^{constant} ...............................................................................................................................240
K .......................................................................................................................................................................242
LEARN ..............................................................................................................................................................242
LIST ..................................................................................................................................................................243
LIST BLCOMP .................................................................................................................................................244
LIST BLCOMP DEF.........................................................................................................................................244
LIST COMP ......................................................................................................................................................244
LIST COMP DEF .............................................................................................................................................245
LIST GATHER ..................................................................................................................................................246
LIST LINK.........................................................................................................................................................246
LIST PC ............................................................................................................................................................247
LIST PE.............................................................................................................................................................247
LIST PLC ..........................................................................................................................................................248
LIST PROGRAM...............................................................................................................................................249
LIST ROTARY...................................................................................................................................................250
LIST TCOMP....................................................................................................................................................251
LIST TCOMP DEF ...........................................................................................................................................251
M{constant} ......................................................................................................................................................252
M{constant}={expression} ...............................................................................................................................252
M{constant}-> ..................................................................................................................................................253
M{constant} ->* ...............................................................................................................................................253
M{constant}->D:{address} ..............................................................................................................................254
M{constant}->DP:{address} ............................................................................................................................255
M{constant}->F:{address}...............................................................................................................................255
M{constant}->L:{address} ...............................................................................................................................256
M{constant}->TWB:{multiplex address}..........................................................................................................257
M{constant}->TWD:{address} .........................................................................................................................257
M{constant}->TWR:{address},{offset}.............................................................................................................258
M{constant}->TWS:{address}..........................................................................................................................259
M{constant}->X/Y:{address}............................................................................................................................262
MACROAUX.....................................................................................................................................................263
MACROAUXREAD...........................................................................................................................................264
MACROAUXWRITE .........................................................................................................................................265
MACROSLV{command} {node#} .....................................................................................................................265
MACROSLV{node#},{slave variable} ..............................................................................................................266
MACROSLV{node#},{slave variable}={constant} ...........................................................................................267
MACROSLVREAD............................................................................................................................................268
MACROSLVWRITE ..........................................................................................................................................268
MFLUSH ..........................................................................................................................................................269
O{constant}.......................................................................................................................................................270
OPEN BINARY ROTARY..................................................................................................................................270
OPEN PLC .......................................................................................................................................................271
OPEN PROGRAM ............................................................................................................................................272
OPEN ROTARY ................................................................................................................................................273
P........................................................................................................................................................................273
P{constant} .......................................................................................................................................................274
P{constant}={expression} ................................................................................................................................274
PASSWORD={string}.......................................................................................................................................275
PAUSE PLC......................................................................................................................................................276
PC .....................................................................................................................................................................277
PE .....................................................................................................................................................................277
PMATCH ..........................................................................................................................................................278
PR .....................................................................................................................................................................279
Q .......................................................................................................................................................................279
Q{constant}.......................................................................................................................................................280
Q{constant}={expression}................................................................................................................................280
R........................................................................................................................................................................281
R[H]{address} ..................................................................................................................................................281
RESUME PLC ..................................................................................................................................................282
S ........................................................................................................................................................................283
SAVE.................................................................................................................................................................284
SETPHASE .......................................................................................................................................................285
SIZE ..................................................................................................................................................................286
TYPE.................................................................................................................................................................286
UNDEFINE ......................................................................................................................................................287
UNDEFINE ALL...............................................................................................................................................287
V........................................................................................................................................................................288
VERSION ..........................................................................................................................................................288
W{address} .......................................................................................................................................................289
Z........................................................................................................................................................................289
PMAC PROGRAM COMMAND SPECIFICATION..........................................................................................292
{axis}{data}[{axis}{data}...] ............................................................................................................................292
Table of Contents ix
PMAC/PMAC2 Software Reference Manual
MACROAUXREAD...........................................................................................................................................331
MACROAUXWRITE .........................................................................................................................................332
MACROSLVREAD............................................................................................................................................333
MACROSLVWRITE ..........................................................................................................................................333
N{constant}.......................................................................................................................................................334
NORMAL ..........................................................................................................................................................335
O{constant}.......................................................................................................................................................335
OR({condition}) ................................................................................................................................................336
P{constant}={expression} ................................................................................................................................337
PAUSE PLC......................................................................................................................................................337
PRELUDE ........................................................................................................................................................338
PSET .................................................................................................................................................................339
PVT{data}.........................................................................................................................................................340
Q{constant}={expression}................................................................................................................................341
R{data} .............................................................................................................................................................341
RAPID...............................................................................................................................................................342
READ ................................................................................................................................................................343
RESUME PLC ..................................................................................................................................................344
RETURN ...........................................................................................................................................................345
S{data}..............................................................................................................................................................346
SEND ................................................................................................................................................................346
SEND^{letter} ...................................................................................................................................................348
SETPHASE .......................................................................................................................................................349
SPLINE1 ...........................................................................................................................................................350
SPLINE2 ...........................................................................................................................................................350
STOP.................................................................................................................................................................351
T{data}..............................................................................................................................................................351
TA{data} ...........................................................................................................................................................352
TINIT ................................................................................................................................................................353
TM{data} ..........................................................................................................................................................353
TS{data}............................................................................................................................................................354
TSELECT{constant} .........................................................................................................................................355
U{data} .............................................................................................................................................................355
V{data} .............................................................................................................................................................356
W{data}.............................................................................................................................................................356
WAIT.................................................................................................................................................................356
WHILE({condition}) .........................................................................................................................................357
X{data} .............................................................................................................................................................358
Y{data}..............................................................................................................................................................359
Z{data}..............................................................................................................................................................359
PMAC MATHEMATICAL FEATURES..............................................................................................................360
Mathematical Operators ........................................................................................................................................360
+ .......................................................................................................................................................................360
-.........................................................................................................................................................................360
* ........................................................................................................................................................................360
/ .........................................................................................................................................................................360
%.......................................................................................................................................................................361
& .......................................................................................................................................................................362
| .........................................................................................................................................................................362
^ ........................................................................................................................................................................363
Mathematical Functions ........................................................................................................................................363
ABS ...................................................................................................................................................................363
ACOS ................................................................................................................................................................364
ASIN..................................................................................................................................................................364
ATAN ................................................................................................................................................................364
x Table of Contents
PMAC/PMAC2 Software Reference Manual
ATAN2 ..............................................................................................................................................................365
COS...................................................................................................................................................................366
EXP...................................................................................................................................................................366
INT....................................................................................................................................................................366
LN.................................................................................................................................................................367
SIN ....................................................................................................................................................................367
SQRT.................................................................................................................................................................368
TAN...................................................................................................................................................................368
SAVED SETUP REGISTERS NOT REPRESENTED BY I-VARIABLES......................................................370
Analog Data Table Setup Registers.......................................................................................................................370
X:$0708 – Y:$070F Analog Table Setup Lines........................................................................................370
Encoder Conversion Table Setup Registers: Y:$0720 – Y:$073F ........................................................................372
Y:$0720 – Y:$073F Conversion Table Setup Lines ......................................................................................372
VME/DPRAM Addressing Setup Registers: X:$0783 – X:$078C .......................................................................389
X:$0783 VME Address Modifier................................................................................................................389
X:$0784 VME Address Modifier Don’t Care Bits .....................................................................................389
X:$0785 VME Base Address Bits A31-A24................................................................................................389
X:$0786 VME Mailbox Base Address Bits A23-A16 ISA DPRAM Base Address Bits A23-A16 .............390
X:$0787 VME Mailbox Base Address Bits A15-A08 ISA DPRAM Base Address Bits A15-A14 & Control
390
X:$0788 VME Interrupt Level ...................................................................................................................391
X:$0789 VME Interrupt Vector .................................................................................................................391
X:$078A VME DPRAM Base Address Bits A23-A20 .................................................................................391
X:$078B VME DPRAM Enable..................................................................................................................392
X:$078C VME Address Width Control.......................................................................................................392
PMAC2 Servo IC Setup Bits and Registers ..........................................................................................................393
X:$C005 etc. Bit 17 Encoder n Third-Channel Demux Control {PMAC2 only} ..........................................393
X:$C005 etc. Bit 18 Encoder n Hardware 1/T Enable {PMAC2 only}.........................................................393
X:$C014, X:$C034 Servo IC m ADC Strobe Word {PMAC2 only} ..............................................................394
PMAC I/O AND MEMORY MAP.........................................................................................................................396
Global Servo Calculation Registers.......................................................................................................................397
Motor Calculation Registers: PMAC(1), PID Servo Algorithm............................................................................399
Motor Calculation Registers: PMAC(1), Extended Servo Algorithm (ESA)........................................................401
Motor Calculation Registers: PMAC2, PID Servo Algorithm ..............................................................................404
Motor Calculation Registers: PMAC2, Extended Servo Algorithm (ESA) ..........................................................407
Buffers...................................................................................................................................................................410
Encoder Conversion (Interpolation) Table ............................................................................................................410
General Global Registers.......................................................................................................................................412
Motor and Coordinate System Status and Control Registers ................................................................................412
Buffer Management Registers...............................................................................................................................417
PMAC(1) DSPGATE Servo IC Registers .............................................................................................................418
PMAC2 DSPGATE1 Servo IC Registers..............................................................................................................420
PMAC2 DSPGATE2 I/O and MACRO Registers ................................................................................................425
Dual-Ported RAM (Option 2 Required) ................................................................................................................435
DPRAM Control Panel Registers .....................................................................................................................435
Control Panel Request Words...........................................................................................................................435
Bit Format of Request Words............................................................................................................................436
Control Panel Feedrate Override.....................................................................................................................436
Servo Fixed Data Reporting Buffer ..................................................................................................................436
Motor-Specific Registers for Servo Fixed Data Reporting Buffer ....................................................................436
Background Fixed Data Reporting Buffer ........................................................................................................438
Motor/Coordinate System Specific Registers for Background Fixed Data Buffer............................................438
Background Variable Transfer Buffers .................................................................................................................442
PMAC to Host Transfer ....................................................................................................................................442
Variable Address Buffer Format (2x16-bit words) ...........................................................................................442
Table of Contents xi
PMAC/PMAC2 Software Reference Manual
Definitions
constant – numerically specified non-changing value
variable – entity that holds a changeable value
I-variable – variable of fixed meaning for card setup and personality (1 of 1024)
P-variable – global variable for programming use (1 of 1024)
Q-variable – local var. (in coord. sys.) for programming use (1 of 1024)
M-variable – variable assigned to memory location for user use (1 of 1024)
pre-defined variable – mnemonic that has fixed meaning in card
function – SIN,COS,TAN,ASIN,ACOS,ATAN,ATAN2,LN,EXP,SQRT,ABS,INT
operator – for arithmetic or bit-by-bit logical combination of two values:
+, -, *, /, % (mod), & (and), | (or), ^ (xor)
expression – grouping of constants, variables, functions, and operators
data – constant w/out parentheses, or expression w/ parentheses
comparator – evaluates relationship between two values: =, !=, >, !>, <, !<, ~, !~
condition – evaluates as true or false based on comparator(s)
simple condition – {expression} {comparator} {expression}
compound condition – logical combination of simple conditions
motor – element of control for hardware setup; specified by number
coordinate system – collections of motors working synchronously
axis – element of a coordinate system; specified by letter chosen from X, Y, Z, A, B, C, U, V, W
buffer – space in user memory for program or list; contains up to 256 motion programs and 32
PLC blocks
On-Line Commands
(Executed immediately upon receipt by PMAC)
On-line Global Commands
Addressing Mode Commands
@n – Address card n (n is hex digit 0 to f); serial host only
@ – Report currently addressed card to host; serial host only
#n – Make Motor n currently addressed motor
# – Report currently addressed motor number to host
&n – Make coord. sys. n the currently addressed coord. sys.
& – Report currently addressed coordinate system to host
Communications Control Characters
<CTRL-H> – Erase last character from host (backspace)
<CTRL-I> – Repeat last command from host (tab)
<CTRL-M> – End of command line (carriage return)
Reporting Commands
P – Report position of motor
V – Report velocity of motor
F – Report following error of motor
? – Report status words for motor in hex ASCII form
Buffer Control Commands
DEFINE BLCOMP {entries},{count length} – Establish backlash compensation table
for motor; to be filled by specified
number of values
DELETE BLCOMP – Erase backlash compensation table for motor
DEFINE COMP {entries},[#{source},[#{target},]],{count length} –
Establish leadscrew compensation table for motor; to be filled by specified number
of values
DEFINE COMP{rows}.{columns},[#{source1},[#{source2},
[#{target},]]],{row count length},{column count length} – Establish
two dimensional leadscrew compensation table for motor; to be filled by specified number of
values
DELETE COMP – Erase leadscrew compensation table for motor.
DEFINE TCOMP {entries},{count length} – Establish torque compensation table for
motor; to be filled by specified number
of values .
DELETE TCOMP – Erase torque compensation table for motor.
Global I-Variables
I0 Serial Addressing Card Number {PMAC(1) w/Flex CPU, PMAC2 only}
Range $0 to $F (0 to 15)
Units none
Default 0
Remarks I0 controls the card number for software addressing purposes on a multi-drop serial
communications cable for all PMAC2 boards and for PMAC(1) boards with an Option 5xF
“Flex” CPU. (On other PMAC(1) boards, the card number is determined by the settings of
jumpers E40 – E43.)
If I2 is set to 2, the PMAC must be addressed with the @n command, where n matches the
value of I0 on the board, before it will respond. If the PMAC receives the @n command,
where n does not match I0 on the board, it will stop responding to commands on the serial
port. No two boards on the same serial cable may have the same value of I0.
If the @@ command is sent over the serial port, all boards on the cable will respond to
action commands. However, only the board with I0 set to 0 will respond to the host with
handshake characters and/or data responses. All boards on the cable will respond to
control-character action commands such as <CTRL-R>, regardless of the current
addressing.
Note:
RS-422 serial interfaces must be used on all PMAC boards for
multi-drop serial communications; this will not work with RS-232
interfaces. If the RS-422 interface is not present as a standard
feature on the PMAC board, the Option 9L serial converter module
must be purchased. It is possible to use an RS-232 interface on the
host computer, connected to the RS-422 ports on the PMAC2
boards.
Typically multiple PMAC2 boards on the same serial cable will share servo and phase
clock signals over the serial port cable for tight synchronization. If the servo and phase
clock lines are connected between multiple PMACs, only one of the PMAC boards can be
set up to output these clocks (E40 – E43 all ON for a PMAC(1), E1 jumper OFF for a
PMAC2). All of the other boards in the chain must be set up to input these clocks (one or
more of the jumpers E40 – E43 OFF for a PMAC(1), E1 jumper ON for a PMAC2).
Note:
Any PMAC(1) board with one or more of E40 – E43 OFF, or any
PMAC2 board with jumper E1 ON, is expecting its SERVO and
PHASE clock signals externally from a Card 0. If it does not
receive these clock signals, the watchdog timer will immediately
shut down the board and the red LED will light.
If the PMAC2 has E1 ON to receive external SERVO and PHASE clock signals for
synchronization purposes, but is not using multi-drop serial communications, I0 does not
need to be changed from 0.
To set up a board to communicate as Card 1 to Card 15 on a multi-drop serial cable, first
communicate with the board as Card 0. Set I0 to specify the card number (software
address) that the board will have on the multi-drop cable. Also, set I1 to 2 to enable the
serial software addressing. Store these values to the non-volatile flash memory with the
SAVE command. Then turn off power; if the board is to input its clocks, put a jumper on
E1; connect the multi-drop cable; restore power to the system.
I1 Serial Port Mode
Range 0 .. 3
Units none
Default 0
Remarks I1 controls two aspects of how PMAC uses its serial port. The first aspect is whether
PMAC uses the CS (CTS) handshake line to decide if it can send a character out the serial
port. The second aspect is whether PMAC will require software card addressing,
permitting multiple cards to be daisychained on a single serial line.
There are four possible values of I1, covering all the possible combinations:
Setting Meaning
0 CS handshake used; no software card address required
1 CS handshake not used; no software card address required
2 CS handshake used; software card address required
3 CS handshake not used; software card address required
When CS handshaking is used (I1 is 0 or 2), PMAC waits for CS to go true before it will
send a character. This is the normal setting for real serial communications to a host; it
allows the host to hold off PMAC messages until it is ready.
When CS handshaking is not used (I1 is 1 or 3), PMAC disregards the state of the CS input
and always sends the character immediately. This mode permits PMAC to “output”
messages, values, and acknowledgments over the serial port even when there is nothing
connected, which can be valuable in stand-alone and PLC-based applications where there
are SEND and CMD statements in the program. If these strings cannot be sent out the
serial port, they can “back up”, stopping program execution.
When software addressing is not used (I1 is 0 or 1), PMAC assumes that it is the only card
on the serial line, so it always acts on received commands, sending responses back over the
line as appropriate.
When software addressing is used (I1 is 2 or 3), PMAC assumes that there are other cards
on the line, so it requires that it be addressed (with the @{card command) before it
responds to commands. The {card} number in the command must match the card
number set up in hardware on the card with jumpers or DIP-switches.
See Also Serial Port, Multiple-Card Applications (Talking to PMAC)
I-variable I6
Program Commands SEND, CMD
Connectors J4 (PMAC-PC, -Lite, -VME), J1, J3 (PMAC-STD)
Jumpers E40-E43 (PMAC-PC, -Lite, -VME)
DIP-switches SW1-1 – SW1-4 (PMAC-STD)
I2 Control Panel Disable
Range 0 .. 3
Units none
Default 0
Remarks I2 allows the enabling and disabling of the control panel discrete inputs (on the JPAN
connector). I2=0 enables these control panel functions; I2=1 disables them. When
disabled, these inputs can be used as general purpose I/O. The reset, handwheel, and wiper
inputs on the JPAN connector are not affected by I2.
When I2=0, the IPOS, EROR and F1ER status lines to JPAN and the Programmable
Interrupt Controller (PIC), and the BREQ status line to the PIC, reflect the hardware-
selected coordinate system (by BCD-coded lines FPDn/ on JPAN); when I2=1, they reflect
the software-addressed coordinate system (&n).
When I2=3, the discrete inputs on the JPAN connector are disabled, and the dual-ported
RAM control panel functions are enabled. Refer to the descriptions of DPRAM functions
for more detail.
See Also Using Interrupts (Writing a Host Communications Program)
I-variables I16-I18
Custom Inputs Example (JOGSWTCH.PMC)
Connector JPAN (J2)
DPRAM Control Panel Functions
I3 I/O Handshake Control
Range 0 .. 3
Units none
Default 1
Remarks I3 controls what characters, if any, are used by PMAC to delimit a transmitted line, and
whether PMAC issues an acknowledgment (handshake) of a command.
Note:
With checksum enabled (I4=1), checksum bytes are added after the
handshake character bytes.
ERR017 Motor(s) in C.S. not at halted (should move motor(s) back to halted
position to restart after / or \ position with J=)
command
See Also Talking to PMAC
Writing a Host Communications Program
I-variables I3, I4
On-line commands R, S
I7 In-Position Number of Cycles
Range 0 .. 255
Units Background computation cycles (minus one)
Default 0
Remarks I7 permits the user to define the number of consecutive scans that PMAC motors must
satisfy all “in-position” conditions before the motor in-position bit is set true. This permits
the user to ensure that the motor is truly settled in the end position before executing the
next operation, on or off PMAC. I7 + 1 consecutive scans are required.
PMAC scans for the in-position condition of each active motor during the “housekeeping”
part of every background cycle, which occurs between each scan of each enabled
uncompiled background PLC (PLC 1-31). All motors in a coordinate system must have
true in-position bits for the coordinate-system in-position bit to be set true.
See Also Control Panel Port (Connecting PMAC to the Machine)
Using Interrupts (Writing a Host Communications Program)
I-variable Ix28
On-line commands ?,??
Suggested M-variable definitions Mx40
Memory registers Y:$0814, Y:$08D4, etc., Y:$0817, Y:$08D7, etc.
DPRAM Control Panel Functions
JPAN connector
I8 Real Time Interrupt Period
Range 0 .. 255
Units Servo Interrupt Cycles
Default 2
Remarks I8 controls how often certain time-critical tasks, such as PLC 0 and checking for motion
program move planning, are performed. A value of 2 means that they are performed after
every third servo interrupt, 3 means every fourth interrupt, and so on. The vast majority of
users can leave this at the default value. In some advanced applications that push PMAC’s
speed capabilities, tradeoffs between performance of these tasks and the calculation time
they take may have to be evaluated in setting this parameter.
Note:
A large PLC 0 with a small value of I8 can cause severe problems,
because PMAC will attempt to execute the PLC program every I8
cycle. This can starve background tasks, including
communications, background PLCs, and even updating of the
watchdog timer, for time, leading to erratic performance or possibly
even shutdown.
DWELL1000
RETURN
With I9=2:
I125 .................. ; Request address I-variable value
$C000................ ; PMAC reports just value, in hexadecimal
With I9=3:
I125 .................. ; Request address I-variable value
I125=$C000 ; PMAC reports whole statement, in hexadecimal
See Also Talking to PMAC
On-line commands I{constant}, M{constant}->, LIST
I-Variables I19-I44, I47, Ix02-Ix05, Ix25, Ix83, Ix93
I10 Servo Interrupt Time
Range 0 .. 8,388,607
Units 1 / 8,388,608 msec
Default 3,713,707
Remarks I10 tells PMAC how much time there is between servo interrupts (which is controlled by
hardware circuitry), so that the interpolation software knows how much time to increment
each servo interrupt.
The fundamental equation for I10 is:
8 ,388 ,608
I 10 = = 8 ,388 ,608 * ServoTime( m sec)
ServoFrequency( kHz )
On PMAC(1), the servo interrupt time is determined by the settings of hardware jumpers
E98, E29-E33, and E3-E6. The proper value of I10 can be determined from the settings of
these jumpers by the formula:
I 10 = 232 ,107 * E 98 JumperFactor * PhaseJumperFactor * ServoJumperFactor
640
I 10 = (2 * I 992 + 3)(I 997 + 1)(I 998 + 1)
9
I10 is used to provide the “delta-time” value in the position update calculations, scaled
such that 223 – 8,388,608 – means one millisecond. Delta-time in these equations is
I10*(%value/100). The % (feedrate override) value can be controlled in any of several
ways: with the on-line ‘%’ command, with a direct write to the command ‘%’ register,
with an analog voltage input, or with a digital input frequency. The default % value is 100,
and many applications can always leave it at 100.
Note:
Even if Ix60 (servo cycle extension) has been changed from its
default value of 0 for any or all motors, the value of I10 should
reflect the time between servo interrupts, not between consecutive
servo cycle calculations.
See Also Setting the Servo Update Time (Servo Features)
Jumpers E3-E6, E29-E33, E98
Connector J4 Pins 21-24 (PMAC-PC, -VME), J4 Pins 1 & 8 (PMAC-Lite), J3 Pins 5-8
(PMAC-STD).
I11 Programmed Move Calculation Time
Range 0 .. 8,388,607
Units msec
Default 0
Remarks I11 controls the delay from when the run signal is taken (or the move sent if executing
immediately) and when the first programmed move starts. If several PMACs need to be
run synchronously, I11 should be set the same on all of the cards. If I11 is set to zero, the
first programmed move starts as soon as the calculation is complete.
This calculation time delay is also used after any break in the continuous motion of a
motion program: a DWELL, a PSET, a WAIT, or each move if Ix92=1 (a DELAY is
technically a zero-distance move, and so does not constitute a break).
The actual delay time varies with the time base (e.g. at a value of 50, the actual delay time
will be twice the number defined here), which keeps it as a fixed distance of the master in
an external time base application. If it is desired to have the slave coordinate system start
up immediately with the master, I11 should be set to zero, and the program commanded to
run before the master starts to move.
Note:
If I11 is greater than zero, defining a definite time for calculations,
and PMAC cannot complete the calculations for the first move of a
sequence by the end of the I11 time, PMAC will terminate the
running of the program with a run-time error.
See Also External Time Base (Synchronizing PMAC to External Events)
I-variables I12, I13
Program commands DWELL, DELAY
Note:
When I13=0, moves are done without this ongoing spline technique,
and CIRCLE mode moves are done as LINEAR mode moves.
See Also Circular Interpolation, Cutter Radius Compensation (Writing a Motion Program)
On-line commands /, \
Program commands {axis}{data}{vector}{data}, CIRCLE1, CIRCLE2,
CC0, CC1, CC2
I14 Auto Position Match on Run Enable
Range 0 .. 1
Units none
Default 1
Remarks I14, when set to 1, performs an automatic re-matching of motor and axis starting position
registers to current motor commanded positions whenever a motion program is started. A
mismatch can occur whenever a motor move (jog, open-loop, abort, or limit) changes the
motor’s target position without letting the axis position “know” of the change, or on
power-up when an absolute position sensor starts up with a position other than zero.
With I14=1, PMAC will execute the PMATCH function on any Run or Step command to
make sure that the axes in the motion program have the proper starting-position
information. The only users who would not want this function, setting I14 to 0, are those
who cannot afford the extra millisecond (approximately) of calculation time this requires.
With I14=0, PMAC uses the last motion program target position as the starting point for
the calculations of the next move, even if these do not match the positions currently
commanded for the motors assigned to the axes.
See Also Axis-Motor Position Re-Matching (Setting Up a Coordinate System)
On-line command PMATCH
Suggested M-variable definitions Mx61, Mx63, Mx64 Mx65
I15 Degree/Radian Control for User Trig Functions
Range 0 .. 1
Units none
Default 0 (degrees)
Remarks I15 controls whether the angle values for trigonometric functions in user programs (motion
and PLC) and on-line commands are expressed in degrees (I15=0) or radians (I15=1).
See Also SIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2 (Computational Features)
I16 Rotary Buffer Request On Point
Range 0 .. 8,388,607
Units Command lines.
Default 5
Remarks I16 controls the point at which an executing rotary program will signal that it is ready to
take more command lines (BREQ line taken high, coordinate system Rotary Buffer Full
status bit – Y:$0817 bit 11 – taken low).
This occurs when the executing point in the program has caught up to within fewer lines
behind the last line sent to PMAC than the value in this parameter. This can be detected as
an interrupt to the host or be checked by the host on a polled basis.
Note:
The BREQ line to the interrupt controller reflects the status of the
hardware-selected coordinate system (by JPAN pins FPDn/) if the
control-panel inputs are enabled (I2=0); it represents the status of
the software-host-addressed coordinate system if the control-panel
inputs are disabled (I2=1). In virtually all applications using this
feature, the user will want to set I2 to 1 so the BREQ line reflects
the status of the coordinate system to which he is currently talking.
Example With I17=10 and I16=5, as program lines are sent to PMAC, PMAC will keep requesting
more lines (BREQ goes high, Rotary Buffer Full bit stays 0) until there are 10 lines in the
buffer ahead of the executing line. BREQ will then be held low and Rotary Buffer Full bit
stays 1 until enough program lines have executed so that there are less than 5 lines in the
buffer ahead of the execution point. At this time, BREQ will be set high again, and Rotary
Buffer Full will become 0.
See Also Using Interrupts (Writing a Host Communications Program)
Rotary Motion Program Buffers (Writing a Motion Program)
Coordinate-system Rotary Buffer Full status bit (Y:$0817, etc., bit 16)
On-line commands PR, ??
I-variables I2, I17, I18
I17 Rotary Buffer Request Off Point
Range 0 .. 8,388,607
Units Program lines
Default 10
Remarks I17 controls how many lines ahead of the executing line the host can provide a PMAC
rotary motion program buffer before it signals that it is not ready for more lines (BREQ
line held low, coordinate system status bit Rotary Buffer Full becomes 1). This status
information can be detected either by polling (??or PR) or by using the interrupt line to
the host.
If you send a program line to the rotary buffer, the BREQ line will be taken low (at least
momentarily). If there are still fewer than I17 number of lines in the buffer ahead of the
executing line, the BREQ line will be taken high again (giving the ability to generate an
interrupt), and the Rotary Buffer Full status bit will stay 0. If there are greater than or
equal to I17 lines in the buffer ahead of the executing line, the BREQ line will be left low,
and the Rotary Buffer Full status bit will become 1.
Normally at this point, the host will stop sending program lines (although this is not
required) and wait for program execution to catch up to within I16 lines and take BREQ
high again.
Note:
The BREQ line to the interrupt controller reflects the status of the
hardware-selected coordinate system (by JPAN pins FPDn/) if the
control-panel inputs are enabled (I2=0); it represents the status of
the software-host-addressed coordinate system if the control-panel
inputs are disabled (I2=1). In virtually all applications using this
feature, the user will want to set I2 to 1 so the BREQ line reflects
the status of the coordinate system to which he is currently talking.
Example If the word address were $0720 (1824 decimal), I21=$000720 would denote gathering of
the Y word; I21=$400720 would denote gathering of the X word; I21=$800720 or
I21=$C00720 would cause gathering of both words. (You may specify this parameter in
decimal form, but it is much more tricky.)
See Also Data Gathering (Analysis Features)
On-line commands GATHER, ENDGATHER, <CTRL-E>
I-variables I19, I21-I44.
I22–I44 Data Gathering Source 2 thru 24 Addresses
Range $000000 .. $FFFFFF (0 .. 16,777,215)
Units Modified PMAC addresses
Default 0
Remarks I22 – I44 control the addresses of the second thru twenty-fourth data items to be gathered.
See I21 for more details.
Note:
Normally these parameters are controlled automatically by the
PMAC Executive Program’s Gathering and Tuning routines.
See Also Data Gathering (Analysis Features)
On-line commands GATHER, ENDGATHER, <CTRL-E>
I-variables I19, I21-I44.
I45 Data Gathering Buffer Location and Mode
Range 0 .. 3
Units none
Default 0
Remarks I45 controls where the data gathering buffer will be located when it is defined, and whether
it will wrap around when it is filled. It can take the following values:
0: ......................Locate buffer in regular RAM. Do not permit wrap-
around (stop gathering when end of buffer is reached).
1: ......................Locate buffer in regular RAM. Permit wraparound upon
..........................reaching end of buffer. Note: Wraparound feature not
..........................supported by PMAC Executive program data gathering and
..........................tuning routines.
2: ......................Locate buffer in dual-ported RAM (PMAC Option 2
..........................required). Do not permit wraparound. Not very useful.
3........................Locate buffer in dual-ported RAM (PMAC Option 2
..........................required). Permit wraparound upon reaching end of
..........................buffer (usual mode for dual-ported RAM).
When I45 is set to 2 or 3, the gather buffer starts at PMAC address $D240 – host address
[base + $0900] – and occupies the number of PMAC addresses specified in the DEFINE
GATHER command.
Note:
In firmware version 1.16B and older, these addresses were 0x0100
($0040) lower.
See Also Data Gathering (Analysis Features)
Option 2 Dual-Ported RAM
On-line commands DEFINE GATHER, GATHER, ENDGATHER, DELETE GATHER,
LIST GATHER
I46 CPU Frequency Control {PMAC w/Flex CPU only}
Range 0 .. 15
Units Multiplication Factor
Default 0 (jumper-set frequency)
Remarks I46 can control the operational clock frequency of the CPU in an Option 5xF “Flex” CPU
by controlling the multiplication factor of the phase-locked loop (PLL) inside the CPU.
The PLL circuit multiplies the input 10 MHz (actually 9.83 MHz) clock frequency by a
factor of (I46 + 1) to create the clock frequency for the CPU. Formally, this is expressed
in the equation:
CPU Frequency (MHz) = 10 * (I46 + 1)
If I46 is set to 0, or an older style of CPU (not “Flex”) is used, the CPU frequency is set by
jumpers (E48 on a PMAC(1); E2 and E4 on a PMAC2).
I46 should usually be set to create the highest CPU frequency for which the CPU is rated.
For the Option 5AF 40 MHz CPU, it should be set to 3; for the Option 5CF 80 MHz CPU,
it should be set to 7; for the Option 5EF 160 MHz CPU, it should be set to 15. With any of
the Flex CPU options (5xF), the PMAC will not permit the CPU to run at higher than the
rated frequency, and it will reduce I46 to the matching value..
I46 is actually used at power-on/reset only, so to make a change in the CPU frequency
with I46, change the value of I46, store this new value to non-volatile flash memory with
the SAVE command, and reset the card with the $$$ command.
I47 Address of Pointer for Control-W Command
Range $0000 .. $FFFF (0 .. 65,535)
Units Legal PMAC ‘Y’ addresses
Default 0
Remarks I47 specifies the address of the register that tells the <CONTROL-W> command where to
pick up its command string.
The <CONTROL-W> command permits the host to load command strings into dual-ported
RAM (Option 2 required), instead of the normal command interface, then cause the
command to be accepted by sending a single byte (ASCII 23D is <CTRL-W>) to the
command interface.
Note:
The <CONTROL-W> function is now effectively obsolete. The
newer bidirectional DPRAM ASCII communications feature
enabled by I58 is superior and should be used instead.
Example For instance, if I47 is set to $D200, PMAC will look to its memory register Y:$D200
(wherever it sits in the host memory space) on receipt of a <CTRL-W> to see where to
look for the command string. If Y:$D200 holds a value of $D700, PMAC will take the
command string starting at register Y:$D700, incrementing addresses until it finds the null
character (value 0).
See Also Option 2 Dual-Ported RAM Manual
Memory-map registers $D000-$DFFF.
I-variables I56, I58
On-line command <CONTROL-W>
I48 DPRAM Servo Data Enable
Range 0 .. 1
Units none
Default 0
Remarks I48 enables or disables the dual-ported RAM (DPRAM) servo data reporting function.
When I48=1 and the GATHER command has been issued, PMAC copies key data from the
servo control registers to fixed registers in the DPRAM every I19 servo cycles for easy
access by the host computer. Servo data for motors up to the number specified by I59 are
reported.
When I48=0, the DPRAM servo data reporting function is disabled. Regular data
gathering can be enabled in this mode.
Refer to the description of DPRAM functions for more information.
See Also DPRAM Servo Data Reporting (Option 2 DPRAM Manual)
I-variables I19, I49, I59
On-line commands GATHER, ENDGATHER
I49 DPRAM Background Data Enable
Range 0 .. 1
Units none
Default 0
Remarks I49 enables or disables the dual-ported RAM (DPRAM) background data reporting
function. When I49=1, PMAC copies key data from the background information registers
to fixed registers in the DPRAM for easy access by the host computer. Each time the host
computer reads these registers and signals it is done, PMAC will copy the data again. Data
for motors and coordinate systems up to the number specified by I59 are reported.
When I49=0, the DPRAM background data reporting function is disabled.
Refer to the description of DPRAM functions for more information.
Example To execute a full stop in one second with the default servo update time (I10 = 3,713,707)
and a move segmentation time of 10 msec, I52 should set to 3,713,707 * 10 / 1000 =
37,137.
See Also Stop Commands (Making Your Application Safe)
I-variables I13, Ix95
On-line commands \, H
I53 Program Step Mode Control
Range 0 .. 1
Units none
Default 0
Remarks I53 controls the action of a Step (S) command in any coordinate system on PMAC. At the
default I53 value of zero, a Step command causes program execution through the next
move, DELAY, or DWELL command in the program, even if this takes multiple program
lines.
When I53 is set to 1, a Step command causes program execution of only a single program
line, even if there is no move or DWELL command on that line. If there is more than one
DWELL or DELAY command on a program line, a single Step command will only execute
one of the DWELL or DELAY commands.
Regardless of the setting of I53, if program execution on a Step command encounters a
BLOCKSTART statement in the program, execution will continue until a BLOCKSTOP
statement is encountered.
See Also Control Panel Port STEP/ Input (Connecting PMAC to the Machine)
On-line commands <CTRL-R>, <CTRL-S>, Q, R, S
Program commands BLOCKSTART, BLOCKSTOP
I54 Serial Baud Rate {PMAC(1) w/Flex CPU or PMAC2 only}
Range 0 .. 15
Units none
Default 8 (9600 baud) PMAC(1)
12 (38400 baud) PMAC2
Remarks I54 controls the baud rate for communications on the serial port for all PMAC2 boards, and for
PMAC(1) boards with an ACC-5xF Flex CPU. PMAC2 uses I54 only at power-up/reset to set
up the frequency of the clocking circuit for the serial port.
To change the baud rate, it is necessary to change the value of I54, store this value to non-
volatile flash memory with the SAVE command, and reset the card. At this time, PMAC2 will
establish the new baud rate.
The possible settings of I54 and the baud rates they define are:
I54 Baud Error with Error with Error with Error with
Rate CPU at 40 CPU at 60 CPU CPU
MHz MHz at 80 MHz at 160 MHz
0 600 0 (Disabled) 0 0
1 900 -0.05% 0 -0.03% -0.01%
2 1200 0 0 0 0
3 1800 -0.1% 0 -0.05% -0.03%
4 2400 0 0 0 0
5 3600 -0.19% 0 -0.10% -0.05%
6 4800 0 0 0 0
7 7200 -0.38% 0 -0.19% -0.10%
8 9600 0 0 0 0
9 14,400 -0.75% 0 -0.38% -0.19%
10 19,200 0 0 0 0
11 28,800 -1.5% 0 -0.75% -0.38%
12 38,400 0 0 0 0
13 57,600 -3.0% 0 -1.5% -0.75%
14 76,800 0 0 0 0
15 115,200 (Disabled) 0 -3.0% -1.5%
CPUs run at 30 MHz, 90 MHz, 120 MHz, or 150 MHz, as well as 60 MHz, also have zero baud
rate errors at all of these baud rates. Some users may want to slow down their CPU frequencies
from the maximum rated frequency in order to get accurate high baud rates.
Because of the nature of the clock generation circuitry, odd values of I54 on a PMAC2 with a
CPU operating at 40 MHz (Jumper E2 OFF) produce non-exact baud rates. The error in baud
rate is small enough that communications should still be valid.
If your host computer baud rate cannot be made to match the PMAC2’s baud rate, either
PMAC2’s baud rate must be changed through the bus communications port, or the PMAC2
must be re-initialized by resetting or powering up with the E3 jumper ON. This forces the
PMAC2 to the default baud rate of 38,400.
I55 DPRAM Background Variable Buffers Enable
Range 0 .. 1
Units none
Default 0
Remarks I55 enables or disables the dual-ported RAM (DPRAM) background variable read and
write buffer function. When I55 is 0, this function is disabled. When I55 is 1, this
function is enabled. When enabled, the user can specify up to 128 PMAC registers to be
copied into DPRAM each background cycle to be read by the host (background variable
read) and up to 128 PMAC registers to be copied each background cycle from values
written into the DPRAM by the host (background variable write).
See Also DPRAM Background Variable Read Buffer (Option 2 DPRAM Manual)
DPRAM Background Variable Write Buffer (Option 2 DPRAM Manual)
For the ACC-36 board automatically converted using I60 and I61, the board must never be
accessed in user programs, but user programs may read the memory registers in PMAC to
which the ADC values are copied.
If I60 is set to 0, no automatic conversion will take place. If the first two hex digits of I60
are set to anything except $FF, PMAC will automatically change them to $FF.
ADCs 1 to 8 are copied into the low 12 bits of registers Y:$0708 to Y:$070F, respectively.
ADCs 9 to 16, if they exist on the addressed board, are copied into the low 12 bits of
registers X:$0708 to X:$070F. These registers should be treated as signed registers.
Note:
It is easier to specify this parameter in hexadecimal form ($ prefix).
If I9 is set to 2 or 3, the value of this variable will be reported back
to the host in hexadecimal form.
Example A PMAC system has an ACC-14D at address $FFD0, and an ACC-36 at address $FFD8.
It is desired to automatically convert all 8 registers on the ACC-36. I60 is set to $FFD8,
and I61 is set to 7.
See Also Parallel Position Feedback Conversion (Setting Up a Motor)
I-variables I61, Ix10
Memory and I/O Map registers $FFD0 to $FFFE
ACC-36 User’s Manual
I61 Number of Auto-Converted ADC Registers {PMAC(1) only}
Range 0 .. 7
Units Number of registers minus 1
Default 0
Remarks I61 permits the user to specify the number of analog-to-digital converter (ADC) registers
on the ACC-36 specified by I60 that will be automatically converted and copied into
PMAC(1) memory. There are two 12-bit converters per 24-bit register. The number of
registers converted automatically is equal to I61 + 1.
On a PMAC2 board, this function is controlled by the more flexible structure of the analog
data table.
Each phase cycle (9 kHz default), PMAC copies the contents of an ACC-36 register into
RAM, then selects the next register, so the conversion can start and the results will be
ready for the next phase cycle. PMAC will cycle through the first I61+1 registers on the
ACC-36 in this fashion. If I61 is set to 0, PMAC will cycle through all 8 registers on the
ACC-36 (equivalent to I61=7).
If you have more than one ACC-36 connected to PMAC, only one board may be used in
this manner. All other boards must be accessed in user programs. For the ACC-36 board
automatically converted using I60 and I61, the board must never be accessed in user
programs, but user programs may read the memory registers in PMAC to which the ADC
values are copied.
ADCs 1 to 8 are copied into the low 12 bits of registers Y:$0708 to Y:$070F, respectively.
ADCs 9 to 16 are copied into the low 12 bits of registers X:$0708 to X:$070F. These
registers should be treated as signed values.
Example The system has 8 axes with analog feedback. There are 4 phase cycles per servo cycle,
and it is important to have new feedback values every servo cycle. Therefore an ACC-36
with Option 1 is ordered, so there are 2 ADCs per register, and I61 is set to 3 to convert
the first 4 registers in a cyclic fashion. ADCs 1 to 4 are copied into Y:$0708 to Y:$070B,
respectively; ADCs 9 to 12 are copied into X:$0708 to X:$070B, respectively.
See Also Parallel Position Feedback Conversion (Setting Up a Motor)
I-variables I60, Ix10
Memory and I/O Map registers $FFD0 to $FFFE
ACC-36 User’s Manual
I62 Internal Message Carriage Return Control
Range 0 .. 1
Units none
Default 0
Remarks I62 permits the user to control whether internally generated messages sent from PMAC to
the host computer are terminated with the carriage return (<CR>) character or not. It
affects only those messages generated by a CMD, SEND, SENDP, or SENDS statement in a
PMAC motion or PLC program. The ability to suppress the <CR> provides more
flexibility in controlling the format display of a terminal window or printer.
If I62 is set to the default value of 0, these messages are terminated with a <CR>. If I62 is
set to 1, the <CR> is suppressed. With I62 set to 1, if it desired for a PMAC program to
cause a <CR> to be sent, the SEND^M command must be used (the carriage return
character is <CTRL-M>).
Note:
Do not set I62 to1 if using dual-ported RAM ASCII
communications (I58=1).
Example With program code:
I62=1.............. ; Suppress <CR> on SEND
SEND “THE VALUE OF P1 IS “ ; String sent with no <CR>
CMD “P1” ...... ; Response string follows on same line, no <CR>
SEND^M ........... ; Send a <CR>
PMAC responds with:
THE VALUE OF P1 IS 42
See Also Program Commands CMD, SEND, SENDS, SENDP
I63 Control-X Echo Enable
Range 0 .. 1
Units None
Default 0
Remarks I63 permits the PMAC to echo the <CONTROL-X> character back to the host computer
when it is received. If I63 is set to 1, PMAC will send a <CONTROL-X> character (ASCII
value 24 decimal) back to the host computer when it receives a <CONTROL-X> character.
If I63 is set to 0, PMAC will send nothing back to the host computer when it receives a
<CONTROL-X> character. This is equivalent to the action of older versions of PMAC
firmware without an I63 variable.
The host computer can use the <CONTROL-X> character to clear out PMAC’s
communications buffers and make sure that no unintended responses are received for the
next command. However, without an acknowledgement that the buffers have been
cleared, the host computer has to add a safe delay to ensure that the operation has been
done before the next command can be issued.
Setting I63 to 1 permits a more efficient clearing of the buffer, because the response
character lets the host computer know when the next command can safely be sent.
Versions of the PCOMM32 communications library 2.21 and higher (March 1999 and
newer) can take advantage of this feature for more efficient communications. I63 should
be set to 0 when using older versions of PCOMM32.
In battery-backed PMAC(1) boards with firmware versions 1.16F and 1.16G, the value of
I63 is maintained by the battery through a power cycling or reset; a SAVE command is not
required. In 1.16H and newer (and in all revisions on flash-backed boards), the value is
maintained by storing it to non-volatile memory with a SAVE command.
I64 Internal Response Tag Enable
Range 0 .. 1
Units None
Default 0
Remarks I64 permits PMAC to tag ASCII text lines that it sends to the host computer as a result of
internal commands, so these can easily be distinguished from responses to host commands.
If I64 is set to 1, a line of text sent to the host computer as a result of an internal SEND or
CMD statement is preceded by a <CONTROL-B> (“start-transmission”) character. In the
case of an error report, the <CONTROL-B> character replaces the leading <CONTROL-G>
(“bell”) character. The text line is always terminated by a <CR> (carriage return)
character, regardless of the setting of I62.
If I64 is set to 0, a text line sent in response to an internal PMAC command is not preceded
by any special character. Reported errors are preceded by the <CONTROL-G> (“bell”)
character. This is equivalent to the action of older versions of PMAC firmware, before I64
was implemented.
Regardless of the setting of I64, if I6 = 2, errors on internal commands are not reported to
the host computer.
In battery-backed PMAC(1) boards with firmware versions 1.16F and 1.16G, the value of
I64 is maintained by the battery through a power cycling or reset; a SAVE command is not
required. In 1.16H and newer (and in all revisions on flash-backed boards , the value is
maintained by storing it to non-volatile memory with a SAVE command.
Example With I64=0, lines sent from PMAC are:
Motion Stopped on Limit<CR>
<BELL>ERR003<CR>
With I64=1, the same lines from PMAC are:
<CTRL-B>Motion Stopped on Limit<CR>
<CTRL-B>ERR003<CR>
The user can set I67 to any value greater than 0 to enable the Modbus TCP buffer. When
this is done, PMAC will automatically set I67 to the address of the start of the 256-word
Modbus buffer. In most PMAC configurations, this address will be $9F00, so the buffer
will occupy the addresses $9F00 - $9FFF.
A SAVE command must be issued with I67 at a non-zero value in order for the Modbus
TCP buffer to be active after subsequent power-up or reset operations.
where:
CONFIG_W2 is the selection word for the second A/D converter set (Option 12A)
CONFIG_W1 is the selection word for the first A/D converter set (Option 12)
DATA_W2 is the matching A/D data from the second A/D converter set (Option
12A)
DATA_W1 is the matching A/D data from the first A/D converter set (Option 12)
A value of 0-7 in CONFIG_W1 tells PMAC2 to read channel ANAI00-07, respectively, as
a 0 to+5V input, resulting in an unsigned value.
A value of 8-15 in CONFIG_W1 tells PMAC2 to read ANAI00-07, respectively, as a -2.5
to +2.5V input, resulting in a signed value.
A value of 0-7 in CONFIG_W2 tells PMAC2 to read channel ANAI08-15, respectively, as
a 0 to+5V input, resulting in an unsigned value.
A value of 8-15 in CONFIG_W1 tells PMAC2 to read ANAI08-15, respectively, as a -2.5
to +2.5V input, resulting in a signed value.
Each phase update (9 kHz default), PMAC2 increments through one line of the table. It
copies the ADC reading(s) selected in the previous cycle into RAM, then writes the next
configuration words to the ADC(s). Typically, this will be used to cycle through all 8
ADCs or pairs of ADCs. To cycle through all 8 pairs of ADCs in unsigned mode, the table
should look like this:
Setup X Word X Word Result Y Word Y Word
I-Variable Upper 12 Bits Lower 12 Bits Address Upper 12 Bits Lower 12 Bits
I70 0 0 Y:$0708 ANAI08 ANAI00
I71 1 1 Y:$0709 ANAI09 ANAI01
I72 2 2 Y:$070A ANAI10 ANAI02
I73 3 3 Y:$070B ANAI11 ANAI03
I74 4 4 Y:$070C ANAI12 ANAI04
I75 5 5 Y:$070D ANAI13 ANAI05
I76 6 6 Y:$070E ANAI14 ANAI06
I77 7 7 Y:$070F ANAI15 ANAI07
If you wanted to set up all ADCs for a unipolar (unsigned) conversion, the following
commands could be issued
I70=$000000 ; Select ANAI00 and ANAI08 (if present) unipolar
I71=$001001 ; Select ANAI01 and ANAI09 (if present) unipolar
I72=$002002 ; Select ANAI02 and ANAI10 (if present) unipolar
I73=$003003 ; Select ANAI03 and ANAI11 (if present) unipolar
I74=$004004 ; Select ANAI04 and ANAI12 (if present) unipolar
I75=$005005 ; Select ANAI05 and ANAI13 (if present) unipolar
I76=$006006 ; Select ANAI06 and ANAI14 (if present) unipolar
I77=$007007 ; Select ANAI07 and ANAI15 (if present) unipolar
To set up the configuration words for bipolar analog inputs, the commands could look like
this:
I70=$008008 ; Select ANAI00 and ANAI08 (if present) bipolar
I71=$009009 ; Select ANAI01 and ANAI09 (if present) bipolar
I72=$00A00A ; Select ANAI02 and ANAI10 (if present) bipolar
I73=$00B00B ; Select ANAI03 and ANAI08 (if present) bipolar
I74=$00C00C ; Select ANAI04 and ANAI08 (if present) bipolar
Once this setup has been made, PMAC2 will automatically cycle through the analog
inputs, copying the converted digital values into RAM. These image registers can then be
read as if they were the actual A/D converters. For user program use, the image registers
would be accessed with M-variables. Suggested definitions for unipolar (unsigned) values
are:
M1000->Y:$0708,0,12,U ; ANAI00 image register; from J1 pin 1
M1001->Y:$0709,0,12,U ; ANAI01 image register; from J1 pin 2
M1002->Y:$070A,0,12,U ; ANAI02 image register; from J1 pin 3
M1003->Y:$070B,0,12,U ; ANAI03 image register; from J1 pin 4
M1004->Y:$070C,0,12,U ; ANAI04 image register; from J1 pin 5
M1005->Y:$070D,0,12,U ; ANAI05 image register; from J1 pin 6
M1006->Y:$070E,0,12,U ; ANAI06 image register; from J1 pin 7
M1007->Y:$070F,0,12,U ; ANAI07 image register; from J1 pin 8
M1008->Y:$0708,12,12,U ; ANAI08 image register; from J1 pin 9
M1009->Y:$0709,12,12,U ; ANAI09 image register; from J1 pin 10
M1010->Y:$070A,12,12,U ; ANAI10 image register; from J1 pin 11
M1011->Y:$070B,12,12,U ; ANAI11 image register; from J1 pin 12
M1012->Y:$070C,12,12,U ; ANAI12 image register; from J1 pin 13
M1013->Y:$070D,12,12,U ; ANAI13 image register; from J1 pin 14
M1014->Y:$070E,12,12,U ; ANAI14 image register; from J1 pin 15
M1015->Y:$070F,12,12,U ; ANAI15 image register; from J1 pin 16
There can be up to eight R/D converters on two ACC-8D Option 7 boards at one
multiplexer address.
Example Motor 3 has a triple resolver, with each resolver geared down by a ratio of 16:1 from the
resolver before it. The fine resolver is connected to R/D converter 4 at multiplexer address
0 (the first R/D converter on the second ACC-8D Option 7 at address 0). The medium
resolver is connected to R/D converter 5 at this address, and the coarse resolver is
connected to R/D converter 6. The following I-variable values should be used:
I310=$040100 .... ; The 0100 in the low 16 bits specifies
............................ ; multiplexer address 0; the 4 in the high 8 bits
............................ ; specifies R/D converter 4 at this address.
I93=16 ................ ; Specifies 16:1 ratio between medium and fine
I83=16 ; Specifies 16:1 ratio between coarse and medium
See Also Selecting the Position Loop Feedback (Setting Up a Motor)
I-Variables I9x, Ix03, Ix10, Ix81
ACC-8D Option 7 (R/D Converter) Manual
Note:
Do not set I89 to +1.0 (or greater). Otherwise, PMAC will try to
add an arc to every blend (even straight lines).
I89 does not affect the behavior at inside corners, where the incoming and outgoing moves
are always blended directly together, regardless of the change in directed angle.
Before V1.16 firmware, an arc was added to an outside corner if the change in directed
angle were greater than 1o.
Example If it is desired that an arc only be added if the change in directed angle is greater than 45 o,
o
then I89 should be set to 0.707, because cos ∆θ = cos 45 = 0.707
See Also Cutter Radius Compensation (Writing a Motion Program)
I90 Minimum Arc Angle
Range Non-negative floating point
Units Semi-circles (π radians; 180 degrees)
Default 0 (sets 2-20)
Remarks I90 sets the threshold between a short arc and a full circle for CIRCLE mode moves in
PMAC in all coordinate systems. I90 is expressed as an angle, with units that represent a
fraction of a half-circle. It represents the smallest angle that can be covered by a
programmed arc move.
Any programmed CIRCLE-mode move with an IJK-vector representation of the center
which covers an angle smaller than I90 is executed as a full circle plus the programmed
angle change. Any such move which covers an angle greater than I90 is executed as an arc
smaller than a full circle.
The purpose of I90 is to support the circle programming standard that permits a full-circle
move to be commanded simply by making the end point equal to the starting point (0
degree arc), yet allow for round-off errors.
Most users will be able to leave I90 at the default value of one-millionth of a semi-circle.
This was formerly the fixed threshold value. However, some users may want to enlarge
the threshold to compensate for round-off errors, particularly when using cutter-radius
compensation in conjunction with full-circle moves. Remember that no arc covering an
angle less than I90 can be executed.
If a full-circle move is commanded with cutter compensation on, and the blending from the
previous move or into the next move creates a compensated outside corner without adding
an arc (see I89), PMAC will extend the compensated move past a full circle. If I90 is too
small, it may execute this as a very short arc, appearing to miss the move completely. I90
may have to be increased from its effective default value to cover this case.
For backward compatibility reasons, if I90 is set to 0, a threshold value of 2-20 (about one-
millionth) of a semi-circle will be used.
See Also Cutter Radius Compensation
I-variable I89
number of turns (electrical cycles) the first resolver makes in one full turn (electrical cycle)
of the second resolver.
This parameter is used only during PMAC’s power-up/reset cycle to establish absolute
power-on servo position. Therefore, the parameter must be set, the value stored in
EAROM with the SAVE command, and the card reset before it takes effect.
If there is no geared second resolver on Motor x, or if absolute power-on position is not
desired, I9x should be set to zero. If Ix10 (for the primary resolver) is set to zero, I9x is
not used. In a triple-resolver system, I9x must be set greater than zero in order for I8x
(third-resolver gear ratio) to be used.
The second resolver must be connected to the next higher numbered R/D converter at the
same multiplexer address than the first resolver. If there is a third resolver, it must be
connected to the next higher numbered converter at the same multiplexer address than the
second resolver. There can be up to eight R/D converters on two ACC-8D Option 7
boards at one multiplexer address.
If Ix10 is set up for an ACC-8D Option 9 Yaskawa encoder converter, I9x represents the
counts per revolution (including x2 or x4 quadrature decode, if used) of the encoder;
effectively it is the “gear ratio” between the encoder and the revolution counter.
Example Motor 1 has a double resolver with the fine resolver connected to the R/D converter at
location 2 on an ACC-8D Option 7 board set to multiplexer address 4, and the coarse
resolver, geared down at a 36:1 ratio from the fine resolver, connected to the R/D
converter at location 3 on the same board. The following I-variable settings should be
used:
I110=$020004 .... ; Value of $0004 in low 16 bits specifies
............................ ; multiplexer address 4; $02 in high 8 bits
............................ ; specifies R/D at location 2 of this address
I91=36 ................ ; Specify 36 turns of fine resolver per turn of
............................ ; coarse resolver; R/D must be at location 3
............................ ; of multiplexer address 4
I81=0 .................. ; No third resolver
See Also Selecting the Position Loop Feedback (Setting Up a Motor)
I-Variables I8x, Ix03, Ix10, Ix81
ACC-8D Option 7 (R/D Converter) Manual
On PMAC(1) boards, if Ix01 is set to 0 and bit 16 of Ix02 is set to 1, then only the
magnitude of the command is written to the register specified by Ix02 (e.g. I103=$1C003
to use DAC1 in this mode); the sign of the command is written to bit 14 of the flag register
specified by Ix25, which is usually the AENA/DIR output. If this sign-and-magnitude
mode is used, bit 16 of Ix25 should be set to 1 so this bit is not used for the amplifier-
enable function. This mode is usually used with the ACC-8D Opt 2 voltage-to-frequency
converter to generate pulse-and-direction signals for stepper-motor drives. Sign-and-
magnitude mode is not available on PMAC2; for stepper applications it uses a fully
digitally generated pulse train as described below.
In PMAC2 systems, if a single analog output is desired for the servo, it is usually the A
DAC for the channel. The following table shows these addresses:
Channel Address Channel Address
DAC1A $C002 DAC9A $C042
DAC2A $C00A DAC10A $C04A
DAC3A $C012 DAC11A $C052
DAC4A $C01A DAC12A $C05A
DAC5A $C022 DAC13A $C062
DAC6A $C02A DAC14A $C06A
DAC7A $C032 DAC15A $C072
DAC8A $C03A DAC16A $C07A
Channels 9 – 16 are on an ACC-24P/V2 board. For B-channel DAC
registers, add 1 to the matching A-channel address
When using a PMAC2 Ultralite board to command the servo over the MACRO ring, the
command output is typically written to the MACRO node register 0. For the MACRO
Type 1 protocol used with Delta Tau MACRO Stations, the addresses are shown in the
following table:
Channel Address Channel Address
Node 0 Reg. 0 $C0A0 Node 8 Reg. 0 $C0B0
Node 1 Reg. 0 $C0A4 Node 9 Reg. 0 $C0B4
Node 4 Reg. 0 $C0A8 Node 12 Reg. 0 $C0B8
Node 5 Reg. 0 $C0AC Node 13 Reg. 0 $C0BC
One common application type for which the default value of Ix02 cannot be used is the
direct pulse-and-direction output for stepper motor drives (PMAC2 only). This mode uses
the C output register alone for each channel, and I9n6 for Channel n must be set to 2 or 3
to get pulse frequency output.
In this case, the following values should be used:
Channel Address Channel Address
PWM1A $C002 PWM9A $C042
PWM2A $C00A PWM10A $C04A
PWM3A $C012 PWM11A $C052
PWM4A $C01A PWM12A $C05A
PWM5A $C022 PWM13A $C062
PWM6A $C02A PWM14A $C06A
PWM7A $C032 PWM15A $C072
PWM8A $C03A PWM16A $C07A
Channels 9 – 16 are on an ACC-24P/V2 board.
When commanding in this mode over the MACRO ring, the address specified is that of
Register 0 for the MACRO node. The following table shows these addresses:
Channel Address Channel Address
Node 0 Reg. 0 $C0A0 Node 8 Reg. 0 $C0B0
Node 1 Reg. 0 $C0A4 Node 9 Reg. 0 $C0B4
Node 4 Reg. 0 $C0A8 Node 12 Reg. 0 $C0B8
Node 5 Reg. 0 $C0AC Node 13 Reg. 0 $C0BC
See Also Selecting the Output (Setting Up a Motor)
I-variables Ix01, Ix25, Ix70-Ix83
Memory-I/O registers Y:$C000-Y:$C03F
Ix03 Motor x Position Loop Feedback Address
Range Extended legal PMAC “X” addresses
Units Extended legal PMAC “X” addresses
Default Variable PMAC(1), Source with PMAC2 Source with
PMAC2 Default Table Ultralite Default Table
I103 $0720 Converted ENC1 $0721 Converted Node 0
I203 $0721 Converted ENC2 $0723 Converted Node 1
I303 $0722 Converted ENC3 $0725 Converted Node 4
I403 $0723 Converted ENC4 $0727 Converted Node 5
I503 $0724 Converted ENC5 $0729 Converted Node 8
I603 $0725 Converted ENC6 $072B Converted Node 9
I703 $0726 Converted ENC7 $072D Converted Node 12
I803 $0727 Converted ENC8 $072F Converted Node 13
Remarks Ix03 tells the PMAC where to look for its feedback to close the position loop for Motor x.
Usually it points to an entry in the Encoder Conversion Table, where the values from the
encoder counter registers have been processed at the beginning of each servo cycle
(possibly to include sub-count data). This table starts at address $0720 and continues until
address $073F. It is shipped from the factory configured as shown in the default table
above.
For a motor with dual feedback (motor and load), use Ix03 to point to the encoder on the
load, and Ix04 to point to the encoder on the motor.
If the position loop feedback device is the same device as is used for commutation (with
PMAC doing the commutation), then it must also be specified for commutation with Ix83.
However, Ix83 should specify the address of the encoder counter itself, not the converted
data of the table.
Hardware Home Position Capture: The source address of the position information occupies
bits 0 to 15 of Ix03 (range $0000 to $FFFF, or 0 to 65535). With bit 16 equal to zero – the
normal case – position capture on homing is done with the hardware capture register
associated with the flag inputs pointed to by Ix25. In this case, it is important to match the
encoder number, the address pointed to with Ix03, with the flag number, the address
pointed to with Ix03 (e.g. ENC1 – CHA1 & CHB1 – with HMFL1 and LIM1).
Software Home Position Capture: If bit 16 (value 65536) is set to one, the position capture
on homing is done through software, and the position source does not have to match the
input flag source. This is particularly important for parallel-data position feedback, such
as from a laser interferometer (which is incremental data and requires homing). For
example, if motor #1 used parallel feedback from a laser interferometer processed as the
first (triple) entry in the conversion table, the key I-variables would be:
I103=$10722 I125=$C000
This would permit homing on interferometer data with HMFL1 triggering.
Note:
In the extended version, it is obviously easier to specify this
parameter in hexadecimal form. With I9 at 2 or 3, the value of this
variable will be reported back to the host in hexadecimal form.
Capture on following error: If bit 17 of Ix03 is set to 1, then the trigger for position capture
of this motor is a true state on the warning following error status bit for the motor. If bit
17 is at the default of 0, the trigger for position capture is the capture flag of the flag
registers as set by Ix25. The trigger is used in two types of moves: homing search moves
and programmed move-until-triggers. If bit 17 is set to 1, the triggered position must be
software captured, so bit 16 must also be set to 1 to specify software captured bit position.
Hardware Capture with Normal-Resolution Feedback: If bit 18 of Ix03 is set to its default
value of 0 when hardware position capture is used in a triggered move such as a homing-
search move, the captured data (whether whole-count only or including sub-count data) is
processed to match servo feedback of “normal” resolution (5 bits of fractional count data
per hardware whole count). This setting is appropriate for digital quadrature feedback or
for “low-resolution” interpolation of a sinusoidal encoder.
Hardware Capture with High-Resolution Interpolated Feedback: If bit 18 (value $40000, or
262,144) is set to 1 when hardware position capture is used in a triggered move, the
captured data (whether whole-count only or including sub-count data) is processed to
match servo feedback of “high” resolution (10 bits of fractional count data per hardware
whole count). This setting is appropriate for “high-resolution” interpolation of a sinusoidal
encoder through an ACC-51x interpolator.
Whole-Count Capture: If bit 19 of Ix03 is set to 0 when hardware position capture is used
in a triggered move such as a homing-search move, only the whole-count captured position
register is used to establish the trigger position. This setting must be used on PMAC(1)
controllers, and on PMAC2 controllers with Servo ICs older than Revision “D” (Revision
“D” ICs started shipping in early 2002).
Sub-Count Capture: If bit 19 (value $80000, or 524,288) is set to 1 when hardware
position capture is used in a triggered move, both the whole-count captured position
register and the estimated sub-count position register are used to establish the trigger
position. This setting can only be used on PMAC2 controllers with Servo ICs of Revision
“D” or newer. I9n9 for the Channel “n” used for the capture must be set to 1 to enable the
hardware sub-count estimation. This setting is typically used for registration or probing
triggered moves with interpolated sinusoidal encoder feedback. (Even with interpolated
sinusoidal encoder feedback, homing-search moves will probably be done without sub-
count captured data, to force a home position referenced to one of the four “zero-crossing”
positions of the sine/cosine signals.)
See Also Selecting the Position Loop Feedback (Setting Up a Motor)
Encoder Conversion Table (Setting Up a Motor)
I-variables Ix04, Ix05, Ix25, Ix83.
Note:
When changing this parameter, make sure the motor is killed
(disabled). Otherwise, a sudden jump will occur, because the
internal position registers will have changed. This means that this
parameter should not be changed in the middle of an application. If
a real-time change in the position-following “gear ratio” is desired,
Ix07 should be changed.
In most practical cases, Ix08 should not be set above 1000 because higher values can make
the servo filter saturate too easily. If Ix08 is changed, Ix30 should be changed inversely to
keep the same servo performance (e.g. if Ix08 is doubled, Ix30 should be halved).
See Also Position Following (Synchronizing PMAC to External Events)
I-variables Ix05, Ix06, Ix07, Ix09, Ix30
Ix09 Motor x Velocity Loop Scale Factor
Range 0 .. 8,388,607
Units none
Default 96
Remarks Ix09 controls how the encoder counter used to close the velocity servo loop gets extended
into the full-length register. For most purposes, this is transparent to the user and does not
need to be changed from the default. This parameter should not be changed in the middle
of an application, because it scales many internal values. If the same sensor is used to
close both the position and velocity loops (Ix03), Ix09 should be set equal to Ix08.
If different sensors are used, Ix09 should be set such that the ratio of Ix09 to Ix08 is
inversely proportional to the ratio of the velocity sensor resolution (at the load) to the
position sensor resolution.
Example If a 5000 line/inch (20,000 cts/in) linear encoder is used for position feedback, and a 500
line/rev (2000 cts/rev) rotary encoder is used for velocity loop feedback, and there is a 5-
pitch screw, the effective resolution of the velocity encoder is 10,000 cts/in (2000x5), half
of the position sensor resolution, so Ix09 should be set to twice Ix08.
If the value computed this way for Ix09 does not come to an integer, use the nearest integer
value.
See Also I-variables Ix03, Ix04, Ix08, Ix31
Dual-Feedback Systems (Setting Up a Motor)
Parallel Data Read: If Ix10 contains a value from $08xxxx to $30xxxx, from $48xxxx to
$70xxxx, from $88xxxx to $B0xxxx, or from $C8xxxx to $F0xxxx, Motor x will do a parallel
data read of the PMAC memory or I/O register at address ‘xxxx’.
In this mode, bits 16 to 21 of Ix10 specify the number of bits to be read, starting with bit 0 at
the specified address. In this mode, they can take a value from $08 to $30 (8 to 48). If the
number of bits is greater than 24, the high bits are read from the register at the next higher-
numbered address.
In this mode, bit 22 of Ix10 specifies whether a Y-register is to be read, or an X-register. A
value of 0 in this bit specifies a Y-register; a value of 1 specifies an X-register. Almost all
common sources of absolute position information are located in Y-registers, so this digit is
almost always 0.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned or a signed value. If
the bit is set to 0, it is interpreted as an unsigned value, if the bit is 1, it is interpreted as a
signed value.
Combining these components, Ix10 values in this mode can be summarized as:
• $08xxxx - $30xxxx: Parallel Y-register read, unsigned value, 8 to 48 bits
• $48xxxx - $70xxxx: Parallel X-register read, unsigned value, 8 to 48 bits
• $88xxxx - $B0xxxx: Parallel Y-register read, signed value, 8 to 48 bits
• $C8xxxx - $F0xxxx: Parallel X-register read, signed value, 8 to 48 bits
The following table shows Ix10 values for parallel data read through an ACC-14 board.
Register Ix10 Register Ix10
1st ACC-14D/V Port A $xxFFD0 4th ACC-14D/V Port A $xxFFE8
st
1 ACC-14D/V Port B $xxFFD1 4th ACC-14D/V Port B $xxFFE9
nd
2 ACC-14D/V Port A $xxFFD8 5th ACC-14D/V Port A $xxFFF0
nd
2 ACC-14D/V Port B $xxFFD9 5th ACC-14D/V Port B $xxFFF1
rd
3 ACC-14D/V Port A $xxFFE0 6th ACC-14D/V Port A $xxFFF8
rd
3 ACC-14D/V Port B $xxFFE1 6th ACC-14D/V Port B $xxFFF9
‘xx’ represent the first two digits, which control bit width, and signed vs.
unsigned data. ACC-14 boards are always Y-addresses
For reading MLDT absolute position from a PMAC timer register, the first two hex digits of
Ix10 are set to $58. Bits 16 – 21 are set to $18 to specify a 24-bit register; bit 22 is set to 1
($40) to specify an X-register, and bit 23 is set to 0 to specify an unsigned value.
The following table shows Ix10 values for reading ACC-29 MLDT timer registers on a
PMAC(1) as parallel data:
Channel Ix10 Channel Ix10
9 $58C020 13 $58C030
10 $58C024 14 $58C034
11 $58C028 15 $58C038
12 $58C02C 16 $58C03C
The following table shows Ix10 values for reading PMAC2 built-in MLDT timer registers:
Channel Ix10 Channel Ix10
1 $58C000 5 $58C020
2 $58C008 6 $58C028
3 $58C010 7 $58C030
4 $58C018 8 $58C038
ACC-28 A/D Converter Read: If Ix10 is set to $31xxxx or $B1xxxx, Motor x will expect its
power-on position in the upper 16 bits of the PMAC Y-memory or I/O register specified by
‘xxxx’. This format is intended for ACC-28 A/D converters.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned or a signed value. If
the bit is set to 0, it is interpreted as an unsigned value, if the bit is 1, it is interpreted as a
signed value. Because ACC-28A produces signed values, Ix10 should be set to $B1xxxx
when using ACC-28A. ACC-28B produces unsigned values, so Ix10 should be set to $31xxxx
when using ACC-28B.
The following tables show Ix10 values for ACC-28A/B on PMAC(1) and Ix10 values for
ACC-28B through PMAC2, respectively.
Channel Ix10 for Ix10 for Channel Ix10 for Ix10 for
ACC-28A ACC-28B ACC-28A ACC-28B
1 $B1C006 $31C006 9 $B1C026 $31C026
2 $B1C007 $31C007 10 $B1C027 $31C027
3 $B1C00E $31C00E 11 $B1C02E $31C02E
4 $B1C00F $31C00F 12 $B1C02F $31C02F
5 $B1C016 $31C016 13 $B1C036 $31C036
6 $B1C017 $31C017 14 $B1C037 $31C037
7 $B1C01E $31C01E 15 $B1C03E $31C03E
8 $B1C01F $31C01F 16 $B1C03F $31C03F
Channels 9 through 16 are brought in through an ACC-24 board
Channel Ix10 for Ix10 for Channel Ix10 for Ix10 for
ADC A ADC B ADC A ADC B
1 $31C005 $31C006 9 $31C045 $31C046
2 $31C00D $31C00E 10 $31C04D $31C04E
3 $31C015 $31C016 11 $31C055 $31C056
4 $31C01D $31C01E 12 $31C05D $31C05E
5 $31C025 $31C026 13 $31C065 $31C066
6 $31C02D $31C02E 14 $31C06D $31C06E
7 $31C035 $31C036 15 $31C075 $31C076
8 $31C03D $31C03E 16 $31C07D $31C07E
Channels 9 through 16 are brought in through an ACC-24P/V2 board.
Sanyo Absolute Encoder Read: If Ix10 is set to $32xxxx or $B2xxxx, Motor x will expect its
power-on position from the ACC-49 Sanyo Absolute Encoder converter board at the PMAC
Y-address specified by ‘xxxx’.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned value (Bit 23 = 0,
making the first hex digit a 3) or as a signed value (Bit 23 = 1, making the first hex digit a B).
Set Ix10 to $32xxxx for unsigned, or to $B2xxxx for signed.
The following table lists the possible values of Ix10 for the ACC-49:
Enc. # on Board Ix10 for E1 ON Ix10 for E2 ON Ix10 for E3 ON
Enc. 1 $m2FFD0 $m2FFD8 $m2FFE0
Enc. 2 $m2FFD4 $m2FFDC $m2FFE4
Enc. # on Board Ix10 for E4 ON Ix10 for E5 ON Ix10 for E6 ON
Enc. 3 $m2FFE8 $m2FFF0 $m2FFF8
Enc. 4 $m2FFEC $m2FFF4 $m2FFFC
m is 3 or B depending on whether the data is to be interpreted as an unsigned or signed quantity.
Yaskawa Absolute Encoder Read: If Ix10 is set to $7100xx or $F100xx, Motor x will expect
its power-on position from the Yaskawa Absolute Encoder converter board at the multiplexer
port address specified by ‘xx’.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned value (Bit 23 = 0,
making the first hex digit a 7) or as a signed value (Bit 23 = 1, making the first hex digit an F).
Set Ix10 to $7100xx for unsigned, or to $F100xx for signed.
In this mode, I9x specifies the number of bits per revolution for a single turn of the Yaskawa
absolute encoder. (For example, with 8192 counts per revolution, there are 13 bits per
revolution.) It must be set greater than 0 to use the multi-turn absolute capability of this
encoder.
The following table shows the values of Ix10 for the ACC-8D Option 9:
Board Ix10 for Ix10 for Ix10 for Ix10 for Board Ix10 for Ix10 for Ix10 for Ix10 for
Mux. Enc. 1 Enc. 2 Enc. 3 Enc. 4 Mux. Enc. 1 Enc. 2 Enc. 3 Enc. 4
Addr. Addr.
0 $m10000 $m10002 $m10004 $m10006 128 $m10080 $m10082 $m10084 $m10086
8 $m10008 $m1000A $m1000C $m1000E 136 $m10088 $m1008A $m1008C $m1008E
16 $m10010 $m10012 $m10014 $m10016 144 $m10090 $m10092 $m10094 $m10096
24 $m10018 $m1001A $m1001C $m1001E 152 $m10098 $m1009A $m1009C $m1009E
32 $m10020 $m10022 $m10024 $m10026 160 $m100A0 $m100A2 $m100A4 $m100A6
40 $m10028 $m1002A $m1002C $m1002E 168 $m100A8 $m100AA $m100AC $m100AE
48 $m10030 $m10032 $m10034 $m10036 176 $m100B0 $m100B2 $m100B4 $m100B6
56 $m10038 $m1003A $m1003C $m1003E 184 $m100B8 $m100BA $m100BC $m100BE
64 $m10040 $m10042 $m10044 $m10046 192 $m100C0 $m100C2 $m100C4 $m100C6
72 $m10048 $m1004A $m1004C $m1004E 200 $m100C8 $m100CA $m100CC $m100CE
80 $m10050 $m10052 $m10054 $m10056 208 $m100D0 $m100D2 $m100D4 $m100D6
88 $m10058 $m1005A $m1005C $m1005E 216 $m100D8 $m100DA $m100DC $m100DE
96 $m10060 $m10062 $m10064 $m10066 224 $m100E0 $m100E2 $m100E4 $m100E6
104 $m10068 $m1006A $m1006C $m1006E 232 $m100E8 $m100EA $m100EC $m100EE
112 $m10070 $m10072 $m10074 $m10076 240 $m100F0 $m100F2 $m100F4 $m100F6
120 $m10078 $m1007A $m1007C $m1007E 248 $m100F8 $m100FA $m100FC $m100FE
m is 7 or F, depending on whether the data is to be interpreted as an unsigned or signed quantity.
MACRO Station Yaskawa Absolute Encoder Read: If Ix10 is set to $72000n or $F2000n,
Motor x will expect its power-on position from a Yaskawa Absolute Encoder through a
MACRO Station. In this mode, ‘n’ specifies the MACRO node number at which the position
value will be read by PMAC itself. Set-up variable MI11x for the MACRO Station tells the
Station how to read the Yaskawa Encoder converter connected to its own multiplexer port or
serial port.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned value (Bit 23 = 0,
making the first hex digit a 7) or as a signed value (Bit 23 = 1, making the first hex digit an F).
Set Ix10 to $72000n for unsigned, or to $F2000n for signed.
In this mode, I9x specifies the number of bits per revolution for a single turn of the Yaskawa
absolute encoder. (For example, with 8192 counts per revolution, there are 13 bits per
revolution.) It must be set greater than 0 to use the multi-turn absolute capability of this
encoder.
MACRO Station R/D Converter Read: If Ix10 is set to $73000n or $F3000n, Motor x will
expect its power-on position from an ACC-8D Opt 7 R/D converter through a MACRO Station
or compatible device. In this mode, ‘n’ specifies the MACRO node number at which PMAC
will read the position value itself. Set-up variable MI11x for the matching node on the
MACRO Station tells the Station how to read the R/D converter connected to its own
multiplexer port.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned value (Bit 23 = 0,
making the first hex digit a 7) or as a signed value (Bit 23 = 1, making the first hex digit an F).
Set Ix10 to $73000n for unsigned, or to $F3000n for signed.
If I9x is set greater than 0, the next higher numbered R/D converter at the same multiplexer
port address is also read and treated as a geared-down resolver, with I9x specifying the gear
ratio. If I8x is also set greater than 0, the following R/D converter at the same multiplexer port
address is read and treated as a third resolver geared down from the second, with I8x
specifying that gear ratio.
MACRO Station Parallel Data Read: If Ix10 is set to $74000n or $F4000n, Motor x will
expect its power-on position from a parallel data source through a MACRO Station or
compatible device. In this mode, ‘n’ specifies the MACRO node number at which PMAC will
read the position value itself. Set-up variable MI11x for the matching node on the MACRO
Station tells the Station how to read the parallel data source connected to it.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned value (Bit 23 = 0,
making the first hex digit a 7) or as a signed value (Bit 23 = 1, making the first hex digit an F).
Set Ix10 to $74000n for unsigned, or to $F4000n for signed.
EnDat Data Read (Geo PMAC only): If Ix10 is set to $75wxyz or $F5wxyz on a Geo
PMAC, Motor x will expect its power-on servo position from the optional EnDat interface that
can be built in to the Geo PMAC.
Bit 23 of Ix10 specifies whether the position is interpreted as an unsigned value (Bit 23 = 0,
making the first hex digit a 7) or as a signed value (Bit 23 = 1, making the first hex digit an F).
Set Ix10 to $75wxyz for unsigned, or to $F5wxyz for signed.
The third and fourth hex digits (wx) specify the number of bits of EnDat absolute position to
be read, as a hex value. For example, if 20 bits were to be read, these two hex digits would be
set to 14.
The fifth hex digit (y) specifies the shift of the data read, permitting the user to match the
resolution properly with that of the ongoing position. The data is first shifted left 10 bits, then
shifted right by “y” bits, so “y” should be set to (NetRightShift + 10). The object is to end up
with data whose LSB is equal to one quadrature count (1/4-line) of the encoder. Most
commonly, the data comes in with the LSB equal to 1/4 of a quadrature count (1/16-line),
requiring a net right shift of 2 bits, so “y” should be a hex digit of “C” (12 decimal).
The sixth hex digit (z) specifies the channel number used, whether the data is negated, and
whether it should be matched to ongoing digital quadrature or analog sinusoidal feedback.
Bits 1 and 0 together express the channel number minus one as a value from 0 to 3 (so Channel
1 to 4). Bit 2 is set to 0 if the ongoing feedback is analog sinusoidal processed through the
high-resolution conversion (format $F) in the conversion table, or to 1 if the ongoing feedback
is digital quadrature. Bit 3 is set to 0 to use the data without negation, or to 1 to negate the
data before using. Negating the data reverses the direction sense; this control is used to match
the direction sense of the ongoing feedback as set by I9n0.
Presently, Channels 1 and 2 are supported, and EnDat is almost always used with interpolated
sinusoidal ongoing feedback, so “z” is set to 0 or 8 for Channel 1 (regular or negated,
respectively), or to 1 or 9 for Channel 2 (regular or negated, respectively).
(killed). If the motor’s coordinate system is executing a program at the time, the program
is aborted. It is optional whether other PMAC motors are disabled when this motor
exceeds its following error limit; bits 21 and 22 of Ix25 control what happens to the other
motor (the default is that all PMAC motors are disabled).
A status bit for the motor, and one for the coordinate system (if the motor is in one) are set.
If this coordinate system is hardware-selected on JPAN (with I2=0), or software-addressed
by the host (with I2=1), the ERLD/ output on JPAN, and the EROR input to the interrupt
controller (except for PMAC-VME) are triggered.
Setting Ix11 to zero disables the fatal following error limit for the motor. This may be
desirable during initial development work, but it is strongly discouraged in an actual
application. A fatal following error limit is a very important protection against various
types of faults, such as loss of feedback, that cannot be detected directly, and that can
cause severe damage to people and equipment.
Note:
The units of Ix11 are 1/16 of a count. Therefore this parameter
must hold a value 16 times larger than the number of counts at
which the limit will occur. For example, if the limit is to be 1000
counts, Ix11 should be set to 16,000.
See Also I-variables I2, Ix12, Ix25
Following Error Limits, Amplifier Fault (Making Your Application Safe)
Control Panel Outputs (Connecting PMAC to the Machine)
Using Interrupts (Writing a Host Communications Program)
Memory registers Y:$0814, Y:08D4, etc., Y:$0817, Y:$08D7, etc.
On-line commands ?, ??.
With the same setup parameters, and the following program segment:
INC F10 TA200 TS0
X20 Y20
X-20 Y20
The rate of acceleration from the program at the corner for motor #1 (X) is ((-7.07-
2
7.07)units/sec * 10000 cts/unit * sec/1000msec) / 200 msec = -0.707 cts/msec . The
acceleration of motor #2 (Y) is 0.0. Since motor #1 exceeds its limit the acceleration time
will be lengthened to 200 * 0.707/0.25 = 707 msec.
Note that in the second case, the acceleration time is made longer (the corner is made
larger) for what is an identically shaped corner (90o). In a contouring XY application, this
parameter should not be relied upon to produce consistently sized corners.
See Also Acceleration Limits (Making Your Application Safe)
LINEAR-mode moves (Writing a Motion Program)
I-variables I13, I50, Ix16, Ix19, Ix22
Ix19 Motor x Maximum Permitted Motor Jog/Home Acceleration
Range positive floating point
Units counts/msec2
Default 0.015625
Remarks Ix19 sets a limit to the commanded acceleration magnitude for jog and home moves, and
for RAPID-mode programmed moves, of Motor x. If the acceleration times in force at the
time (Ix20 and Ix21) request a higher rate of acceleration, this rate of acceleration will be
used instead. The calculation does not take into account any feedrate override
Since jogging moves are usually not coordinated between motors, many people prefer to
specify jog acceleration by rate, not time. To do this, simply set Ix20 and Ix21 low enough
that the Ix19 limit is always used. Do not set both Ix20 and Ix21 to 0, or a division-by-
zero error will result in the move calculations, possibly causing erratic operations. The
minimum acceleration time settings that should be used are Ix20=1 and Ix21=0.
2
The default limit of 0.015625 counts/msec is quite low and will probably limit
acceleration to a lower value than is desired in most systems; most users will eventually
raise this limit. This low default was used for safety reasons.
Example With Ix20 (accel time) at 100 msec, Ix21 (S-curve time) at 0, and Ix22 (jog speed) at 50
counts/msec, a jog command from stop would request an acceleration of (50 cts/msec) /
2
100 msec, or 0.5 cts/msec . If Ix19 were set to 0.25, the acceleration would be done in 200
msec, not 100 msec.
With the same parameters in force, an on-the-fly reversal from positive to negative jog
2
would request an acceleration of (50-(-50) cts/msec) / 100 msec, or 1.0 cts/msec . The
limit would extend this acceleration period by a factor of 4, to 400 msec.
See Also Jogging and Homing Moves (Basic Motor Moves)
RAPID-mode moves (Writing a Motion Program)
I-variables I50, Ix16, Ix20, Ix21, Ix22
On-line commands HM, J+, J-, J=, J^, J:, J/
Motion program commands HOME, RAPID
A change in this parameter will not take effect until the next move command. For
instance, if you wanted a different deceleration time from acceleration time in a jog move,
you would specify the acceleration time, command the jog, change the deceleration time,
then command the jog move again (e.g. J=), or at least the end of the jog (J/).
See Also I-variables I50, Ix16, Ix19, Ix20, Ix22, Ix23, Ix87, Ix88
Jogging and Homing Moves (Basic Motor Moves)
RAPID-mode moves (Writing a Motion Program)
On-line commands HM, J+, J-, J=, J^, J:, J/
Motion program commands HOME, RAPID
Ix22 Motor x Jog Speed
Range positive floating point
Units Counts / msec
Default 32.0
Remarks Ix22 establishes the commanded speed of a jog move, or a programmed RAPID-mode
move (if I50=0) for Motor x. Direction of the jog move is controlled by the jog command.
A change in this parameter will not take effect until the next move command. For
instance, if you wanted to change the jog speed on the fly, you would start the jog move,
change this parameter, then issue a new jog command.
See Also I-variables I50, Ix19-Ix21
Jogging Moves (Basic Motor Moves)
RAPID-Mode Moves (Writing a Motion Program)
On-line commands J+, J-, J=, J^, J:, J/
Program command RAPID
Ix23 Motor x Homing Speed and Direction
Range floating point
Units Counts / msec
Default 32.0
Remarks Ix23 establishes the commanded speed and direction of a homing-search move for Motor
x. Changing the sign reverses the direction of the homing move – a negative value
specifies a home search in the negative direction; a positive value specifies the positive
direction.
See Also Homing Moves (Basic Motor Moves)
I-variables Ix19, Ix20 Ix21, Ix22, Ix25, Ix26
Encoder/Flag I-Variables 2 and 3
On-line command HM
Motion program command HOME.
Ix24 (Reserved for Future Use)
PMAC2
Channel Address Channel Address
1 $C000 9 $C040
2 $C008 10 $C048
3 $C010 11 $C050
4 $C018 12 $C058
5 $C020 13 $C060
6 $C028 14 $C068
7 $C030 15 $C070
8 $C038 16 $C078
The overtravel-limit inputs specified by this parameter must be held low in order for Motor
x to be able to command movement. The polarity of the amplifier-fault input is
determined by a high-order bit of this parameter (see below). The polarity of the home-
flag input is determined by the Encoder/Flag I-Variables 2 and 3 for the specified encoder.
The polarity of the amplifier-enable output is determined by Jumper E17.
Extended Addressing: The source address of the flag information occupies bits 0 to 15 of
Ix25 (range $0000 to $FFFF, or 0 to 65535). If this is all that is specified – that is, all
higher bits are zero – then all of the flags are used, and used in the “normal” mode (low-
true FAULT, disabling all motors). If higher bits are set to one, some of the flags are not
used, or used in an alternate manner, as documented below.
Note:
In the extended versions, it is easier to specify this parameter in
hexadecimal form. With I9 at 2 or 3, the value of this variable will
be reported back to the host in hexadecimal form.
Hex($) 5 2 C 0 0 4
Bin 0 1 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Overtravel Limit Use Bit: With bit 17 equal to zero – the normal case – the +/-LIMn inputs
must be held low to permit commanded motion in the appropriate direction. If there are
not actual (normally closed or normally conducting) limit switches, the inputs must be
hardwired to ground.
Note:
The direction sense of the limit inputs is the opposite of what many
people consider intuitive. That is, the +LIMn input, when taken
high (opened), stops commanded motion in the negative direction;
the -LIMn input, when taken high, stops commanded motion in the
positive direction. It is important to confirm the direction sense of
your limit inputs in actual operation.
If bit 17 (value $20000, or 131072) is set to one (e.g. I125=$2C000), Motor x does not use
these inputs as overtravel limits. This can be done temporarily, as when using a limit as a
homing flag. If the limit function is not used at all, these inputs can be used as general-
purpose inputs by assigning M-variables to them.
Starting in firmware 1.15, bit 17 of Ix25 does not effect the software overtravel limits.
Activation of the software overtravel limits is done by setting the value of Ix13 and or Ix14
to a non-zero value. De-activation is done by setting their values to zero.
MACRO Flag Bit: If bit 18 of Ix25 is 0, the flag set is wired directly into the PMAC
controller. If bit 18 (value $40000, or 262,144) is 1 (e.g. I125=$4070), PMAC looks for
these flags to come through the MAXCRO ring.
Amplifier Fault Use Bit: If bit 20 of Ix25 is 0, the amplifier-fault input function through
the FAULTn input is enabled. If bit 20 (value $100000, or 1, 048,576) is 1 (e.g.
1125=$10C000), this function is disabled. General-purpose use of this input is then
possible by assigning an M-variable to the input.
Action-on-Fault Bits: Bits 21 (value $200000, or 2,097,152) and 22 (value $400000, or
4,194,344) of Ix25 control what action is taken on an amplifier fault for the motor, or on
exceeding the fatal following err limit (Ix11) for the motor:
Bit 22 Bit 21 Function
Bit 22=0 Bit 21=0: Kill all PMAC motors
Bit 22=0 Bit 21=1: Kill all motors in same coordinate system
Bit 22=1 Bit 21=0: Kill only this motor
Bit 22=1 Bit 21=1: Kill only this motor
Regardless of the setting of these bits, a program running in the coordinate system of the
offending motor will be halted on an amplifier fault of the exceeding of a fatal following
error limit.
Amplifier-Fault Polarity Bit: Bit 23 (value 8,388,608) of Ix25 controls the polarity of the
amplifier fault input. A zero in this bit means a low-true input (low means fault); a one
means high-true (high means fault). The input is pulled high internally, so if no line is
attached to the input, and bit 20 of Ix25 is zero (enabling the fault function), bit 23 of Ix25
must be zero to permit operation of the motor.
First Hex Digit: In the hexadecimal form, bits 20 to 23 combine to form a single
hexadecimal digit.
Example 1. Motor 1 using flags 1 with amp-enable output, and low-true amp fault disabling all
motors: I125=$00C000 or I125=$C000
2. Motor 1 using flags 1 with direction output, and low-true amp fault disabling all
motors:
I125=$01C000
3. Motor 1 using flags 1 with amp-enable output, and low-true amp fault disabling only
coordinate system motors: I125=20C000
4. Motor 1 using flags 1 with direction output, and amp-fault disabled, with excess F.E.
disabling off C.S motors: I125=$31C000
5. Motor 1 using flags 5 with amp-enable output, and high-true amp fault disabling only
this motor: I125=$C0C010
See Also Selecting the Flag Register (Setting up a Motor)
Homing Moves (Basic Motor Moves)
I-variables Ix02, Ix03 Ix11
Encoder/Flag I-Variables 2 and 3
Jumper(s) E17; JMACH connector flag I/O pins
If Ix27 is set to a value greater than zero, for a programmed axis move in Absolute (ABS)
mode, the motor will take the shortest path around the circular range defined by Ix27 to get
to the destination point. No absolute move will be greater than half a revolution in this
mode.
If Ix27 is set to a negative number, an alternate rollover mode for the rotary axis assigned
to the motor is activated that uses the sign of the commanded destination in absolute mode
to specify the direction of motion to that destination. In this mode, all absolute-mode
moves are less than one revolution (with the size of the revolution specified by the
magnitude of Ix27), but can be greater than one-half revolution.
The sign of the commanded absolute destination in this mode is also part of the destination
value. So a command of A-90 in this mode is a command to move to –90 degrees (=
+270 degrees) in the negative direction. For commands to move in the positive direction,
the + sign is not required, but it is permitted (e.g. to command a move to 90 degrees in the
positive direction, either A90 or A+90 can be used).
PMAC cannot store the difference between a +0 and a –0 destination command, so a
command with a tiny non-zero magnitude must be used (e.g. A+0.0000001 and A-
0.0000001). This increment can be small enough not to have any effect on the final
destination.
If using commands from a similar mode in which only the magnitude, and not the sign, of
the value specifies the destination position, then the destination values for negative-
direction moves must be modified so that the magnitude is 360 degrees minus the
magnitude in the other mode. For example, if the command were C-120, specifying a
move to (+)120 degrees in the negative direction, the command would have to be modified
for PMAC to C-240, which specifies a move to –240 degrees (= +120 degrees) in the
negative direction. Commands for positive-direction moves do not have to be modified.
Axis moves in Incremental (INC) mode are not affected by rollover. When Ix27 is set to
0, there is no rollover. Rollover should not be attempted for axes other than A, B, or C.
Jog moves are not affected by rollover. Reported motor position is not affected by
rollover. (To obtain motor position information “rolled over” to within one motor
revolution, use the modulo (remainder) operator, either in PMAC or in the host computer:
e.g. P4=(M462/(I408*32))%I427).
Example Motor #4 drives a rotary table with 36,000 counts per revolution. It is defined to the A-
axis with #4->100A (A is in units of degrees). I427 is set to 36000. With motor #4 at
zero counts (A-axis at zero degrees), an A270 move in a program is executed in Absolute
mode. Instead of moving the motor from 0 to 27,000 counts, which it would have done
with I427=0, PMAC moves the motor from 0 to -9,000 counts, or -90 degrees, which is
equivalent to +270 degrees on the rotary table.
Motor #5 drives a positioning spindle with an 8192-line-per-rev (32,768-count-per-rev)
encoder on the motor and a 10-to-1 gear reduction to the load. It is defined to the C-axis
with #5->910.222222222C (C is in units of degrees). I527 is set to 327,680. An
absolute-mode move of C-355 is commanded. PMAC moves Motor 5 in the negative
direction less than one revolution to +5 degrees (= -355 degrees).
See Also On-line commands INC, ABS
Program commands INC, ABS, A{data}, B{data}, C{data}
Axis Types (Setting Up a Coordinate System)
Mode 1: When PMAC is not commutating Motor x (Ix01 = 0), Ix29 serves as the offset
for the single command output value, usually a DAC command. Ix29 is added to the
output command value before it is written to the command output register.
Mode 2: When PMAC (PMAC(1) only) is not commutating Motor x (Ix01 = 0) but is in
sign-and-magnitude output mode (Ix02 bit 16 = 1), Ix29 is the offset of the command
output value before the absolute value is taken (Ix79 is the offset after the absolute value is
taken). Ix29 is typically left at zero in this mode, because it cannot compensate for real
circuitry offsets.
Mode 3: When PMAC is commutating Motor x (Ix01 Bit 0 = 1) but not closing the current
loop (Ix82 = 0), Ix29 serves as the offset for the first of two phase command output values
(Phase A), for the address specified by Ix02; Ix79 serves the same purpose for the second
phase (Phase B). Ix29 is added to the output command value before it is written to the
command output register.
When commutating from a PMAC(1), Phase A is output on the higher-numbered of the
two DACs (e.g. DAC2), Phase B on the lower-numbered (e.g. DAC1). When
commutating from a PMAC2, Phase A is output on the A-channel DAC (e.g. DAC1A),
Phase B on the B-channel DAC (e.g. DAC1B).
As an output command offset, Ix29 is always in units of a 16-bit register, even if the actual
output device is of a different resolution. For example, if a value of 60 had to be written
into an 18-bit DAC to create a true zero command, this would be equivalent to a value of
60/4=15 in a 16-bit DAC, so Ix29 would be set to 15 to cancel the offset.
Mode 4: When PMAC (PMAC2 only) is commutating (Ix01 Bit 0 = 1) and closing the
current loop for Motor x (Ix82 > 0), Ix29 serves as an offset that is added to the phase
current reading from the ADC for the first phase (Phase A), at the address specified by
Ix82 minus 1. Ix79 performs the same function for the second phase. The sum of the
ADC reading and Ix29 is used in the digital current loop algorithms.
As an input feedback offset, Ix29 is always in units of a 16-bit ADC, even if the actual
ADC is of a different resolution. For example, if a 12-bit ADC reported a value of -5
when no current was flowing in the phase, this would be equivalent to a value of -5*16=-
80 in a 16-bit ADC, so Ix29 would be set to 80 to compensate for this offset.
See Also Setting Up PMAC Commutation
I-variables Ix01, Ix02, Ix79.
If Ix30 is set to a negative value, this has the effect of inverting the command output
polarity for motors not commutated by PMAC, when compared to a positive value of the
same magnitude. This can eliminate the need to exchange wires to get the desired polarity.
On a motor that is commutated by PMAC, changing the sign of Ix30 has the effect of
o
changing the commutation phase angle by 180 . Negative values of Ix30 cannot be used
with the auto-tuning programs in the PMAC Executive program.
This parameter is usually set initially using the Tuning utility in the PMAC Executive
Program. It may be changed on the fly at any time to create types of adaptive control.
Note:
The default value of 2000 for this parameter is exceedingly weak
for most systems (all but the highest resolution velocity-loop
systems), causing sluggish motion and/or following error failure.
Most users will immediately want to raise this parameter
significantly even before starting serious tuning.
If the servo update time is changed, Ix30 will have the same effect for the same numerical
value. However, smaller update times (faster update rates) should permit higher values of
Ix30 (stiffer systems) without instability problems.
See Also PID Servo Filter (Closing the Servo Loop)
I-variables Ix31-Ix39
Tuning Instructions (PMAC Executive Program manual)
Ix31 Motor x PID Derivative Gain
Range -8,388,608 .. 8,388,607
Units (Ix30*Ix09)/226 DAC bits/(Counts/cycle)
Default 1280
Remarks Ix31 subtracts an amount from the control output proportional to the measured velocity of
Motor x. It acts effectively as an electronic damper. The higher Ix31 is, the heavier the
damping effect is.
If the motor is driving a properly tuned tachometer-loop (velocity) amplifier, the amplifier
will provide sufficient damping, and Ix31 should be set to zero. If the motor is driving a
current-loop (torque) amplifier, or if PMAC is commutating the motor, the amplifier will
provide no damping, and Ix31 must be greater than zero to provide damping for stability.
On a typical system with a current-loop amplifier and PMAC’s default servo update time
(~440 µsec), an Ix31 value of 2000 to 3000 will provide a critically damped step response.
If the servo update time is changed, Ix31 must be changed proportionately in the opposite
direction to keep the same damping effect. For instance, if the servo update time is cut in
half, from 440 µsec to 220 µsec, Ix31 must be doubled to keep the same effect.
This parameter is usually set initially using the Tuning utility in the PMAC Executive
Program. It may be changed on the fly at any time to create types of adaptive control.
See Also I-variables Ix30, Ix32-Ix39
PID Servo Filter (Closing the Servo Loop)
Tuning Instructions (PMAC Executive Program manual)
where Tf is the filter time constant, and Ts is the servo update time.
The filter time constant can be expressed in terms of Ix40 by the following equation:
Ix40 * Ts
Tf =
1 − Ix40
Filter time constants can range from a fraction of a servo cycle (when Ix40 ~ 0) to infinite
(when Ix40 ~ 1). As with any low-pass filter, there is a fundamental trade-off between
smoothness and delay. Generally when the filter is used, filter time constants of a few
milliseconds are set. In an application where multiple motors are executing a path, the
same time constant should be sued for all of the motors.
Ix40 is available only with the special Lookahead option. If the Extended Servo
Algorithm option is selected along with the Lookahead option, this Ix40 filter is not
available. (In the ESA, Ix40 is used for another purpose.)
Example To set a filter time constant of 2 msec on a system with the default servo update time of
442 µsec, Ix40 can be computed as:
2
Ix40 = = 0.819
0.442 + 2
•
I357 is set to 32,768 * 20/50 = 13,107.
3. PMAC Motor 4 is driving a sine-wave mode amplifier that has a gain for each phase
input of 5 amps/volt. The amplifier has a continuous rating of 20 amps (RMS); the
motor has a continuous rating of 22 amps (RMS).
• PMAC’s maximum output of 32,768, or 10 volts, corresponds to 50 amps peak in a
phase.
• The amplifier has the lower continuous current rating, so we use its limit of 20
amps (RMS).
• 20 amps (RMS) corresponds to peak phase currents of 20*1.414 = 28.28 amps.
• I457 is set to 32,768 * 28.28 / 50 = 18,534.
4. PMAC Motor 6 is driving a direct-PWM power block amplifier for an AC motor. The
A/D converters in the amplifier are scaled so that a maximum reading corresponds to
50 amps of current in the phase. The amplifier has a continuous current rating of 20
amps (RMS), and the motor has a continuous rating of 15 amps (RMS).
• PMAC’s maximum ADC phase reading of 32,768 corresponds to 50 amps.
• The motor has the lower continuous current rating, so we use its limit of 15 amps
(RMS).
• 15 amps (RMS) corresponds to peak phase currents of 15*1.414 = 21.21 amps.
• 21.21 amps corresponds to an ADC reading of 32,768 * 21.21/50 = 13,900.
• I657 should be set to 13,900 * 0.866 = 12,037.
See Also Integrated Current Protection (Making Your Application Safe)
I-Variables Ix58, Ix69
Ix58 Motor x Integrated Current Limit
Range 0 .. 8,388,607
30 2
Units 2 (DAC bits) • servo cycles
{bits of a 16-bit DAC}
Default 0
2
Remarks Ix58 sets the maximum integrated current limit for PMAC’s I T integrated current limiting
2
function. If Ix58 is 0, the I T limiting function is disabled. If Ix58 is greater than 0,
PMAC will compared the time-integrated difference between the squares of commanded
current and the Ix57 continuous current limit to Ix58. If the integrated value exceeds Ix58,
then PMAC faults the motor just as it would for receiving an amplifier fault signal, setting
2
both the amplifier-fault and the I T-fault motor status bits.
The Ix58 limit is typically set by taking the relationship between the instantaneous current
limit (Ix69 on PMAC, in units of a 16-bit DAC), the magnetization current (Ix77; typically
0 except for vector control of induction motors) and the continuous current limit (Ix57 on
PMAC, in units of a 16-bit DAC) and multiplying by the time permitted at the
instantaneous limit. The formula is:
Ix69 2 + Ix77 2 − Ix57 2
Ix58 = ∗ ServoUpdateRate( Hz ) ∗ PermittedTime(sec)
32768 2
Refer to the section Making Your Application Safe in the User’s Guide for a more detailed
2
explanation of I T protection.
Example With the instantaneous current limit Ix69 at 32,767, the magnetization current Ix77 at 0,
the continuous current limit Ix57 at 10,589 (1/3 of max), the time permitted with maximum
current is at 1 minute, and the servo update rate at the default of 2.25 kHz, Ix58 would be
set as:
Ix58 = ( 1.0 2 + 0.0 2 − 0.33 2 ) ∗ 2250 ∗ 60 = 120000
Ix62 Motor x Current Loop Proportional Gain (Forward Path) {PMAC2 only}
Range 0.0 .. 1.0 (24-bit resolution)
Units Output = 4 * Ix62 * (Icmd - Iact)
Default 0
Remarks Ix62 is the proportional gain term of the digital current loops that is in the “forward path”
of the loop, multiplying the difference between the commanded and actual current levels.
Either Ix62 or Ix76 (back path proportional gain) must be used to close the current loop.
Generally, only one of these proportional gain terms is used, although both can be. Ix62 is
only used if Ix82>0 to activate digital current loop execution.
Ix62 can provide more responsiveness to command changes from the position/velocity
loop servo, and therefore a higher current loop bandwidth, than Ix76. However, if the
command value is very noisy, which can be the case with a low-resolution position sensor,
using Ix76 instead can provide better filtering of the noise.
Ix62 is typically set using the current loop auto-tuner or interactive tuner in the PMAC
Executive Program. . Typical values of Ix62, when used, are around 0.5.
See Also Setting Up PMAC Commutation
I-variables Ix61, Ix66, Ix76, Ix82
Ix63 Motor x Integration Limit
Range -8,388,608 .. 8,388,607
Units (Ix33/219) counts * servo-cycles
Default 4,194,304
Remarks Ix63 limits the magnitude of the integrated position error (the output of the integrator), which
can be useful for “anti-windup” protection. The default value of Ix63 provides essentially no
limitation. (The integral gain Ix33 controls how fast the error is integrated.)
A value of zero here forces a zero output of the integrator, effectively disabling the integration
function in the PID filter. This can be useful during periods when you are applying a constant
force and are expecting a steady-state position error. (In contrast, setting Ix33 to 0 prevents
further inputs to the integrator, but maintains the output.)
The Ix63 integration limit can also be used to create a fault condition for the motor. If Ix63 is
set to a negative number, then PMAC will also check as part of its following error safety
check whether the magnitude of integrated following error has saturated at the magnitude of
Ix63. With Ix63 negative, if the integrator has saturated, PMAC will trip (kill) the motor with
a following error fault. Both the normal fatal following error motor status bit and the
integrated following error status bit are set when this fault occurs. If Ix63 is 0 or positive, the
motor cannot trip on integrated following error fault.
To set Ix63 to a value such that the integrator saturates at the same point that its contribution
to the command output causes saturation at the Ix69 level, use the following formula:
Ix69 ∗ 2 23
Ix63 = ±
Ix08 ∗ Ix30
To cause trips, the magnitude of Ix63 must be set to less than this value due to other potential
contributions to the output. Remember that the integrator stops increasing when the output
saturates at Ix69.
See Also PID Servo Filter (Closing the Servo Loop)
I-variables Ix33, Ix67, Ix69
Values of Ix64 greater than 0 yield increased gain within the deadband; a value of 16
provides double gain in the “deadband”. A small band of increased gain can be used to
reduce errors while holding position, without as much of a threat to make the system
unstable. It is also useful in compensating for physical deadband in the system.
Note:
Values of Ix64 less than -16 will cause negative gain inside the
deadband, making it impossible for the system to settle inside the
band. These settings have no known useful function.
Outside the deadband, gain asymptotically approaches Ix30 as the following error increases.
Note:
The units of this parameter are 1/16 of a count, so the value should
be 16 times the number of counts in the limit.
See Also I-variables Ix11, Ix12, Ix68
Ix68 Motor x Friction Feedforward
Range -32,768 .. 32,767
Units DAC bits
Default 0
Remarks Ix68 adds a bias term to the servo loop output of Motor x that is proportional to the sign of
the commanded velocity. That is, if the commanded velocity is positive, Ix68 is added to
the output. If the commanded velocity is negative, Ix68 is subtracted from the output. If
the commanded velocity is zero, no value is added to or subtracted from the output.
This parameter is intended primarily to help overcome errors due to mechanical friction. It
can be thought of as a “friction feedforward” term. Because it is a feedforward term that
does not utilize any feedback information, it has no direct effect on system stability. It can
be used to correct the error resulting from friction, especially on turnaround, without the
time constant and potential stability problems of integral gain.
If PMAC is commutating this motor, this correction is applied before the commutation
algorithm, and so will affect the magnitude of both analog outputs.
Note:
This direction-sensitive bias term is independent of the constant
bias introduced by Ix29 and/or Ix79.
Example Starting with a motor at rest, if Ix68 = 1600, then as soon as a commanded move in the
positive direction is started, a value of +1600 (~0.5V) is added to the servo loop output.
As soon as the commanded velocity goes negative, a value of -1600 is added to the output.
When the commanded velocity becomes zero again, no bias is added to the servo output as
a result of this term.
See Also Closing the Servo Loop
I-Variables Ix01, Ix29, Ix32, Ix35, Ix79
Ix69 Motor x Output Command Limit
Range 0 .. 32,767 (0 to 10V or equivalent)
Units 16-bit DAC bits
Default 20,480 (6.25V or equivalent)
Remarks Ix69 defines the magnitude of the largest output that can be sent from PMAC’s PID
position/velocity servo loop. If the servo loop computes a larger value, PMAC clips it to
this value. When the PID output has saturated at the Ix69 limit, the integrated error value
will not increase, providing anti-windup protection.
For the Extended Servo Algorithm (ESA) that with the Option 6 firmware version, Ix69 is
used to multiply a normalized command (-1.0 <= Normalized Command < +1.0) before
outputting it or using it for commutation. As such, it acts as both a scale factor and an
output command limit for the ESA.
Ix69 is always in units of a 16-bit DAC, even if the actual output device is of a different
resolution, or the command value is used for PMAC’s own internal current loop
commands.
If you are using differential analog outputs (DAC+ and DAC-), the voltage between the
two outputs is twice the voltage between an output and AGND, so the Ix69 value should
be set to half of what it would be for a single-ended analog output.
This parameter provides a torque (current) limit in systems with current-loop amplifiers, or
when using PMAC’s internal commutation; it provides a velocity limit with velocity-mode
amplifiers. Note that if this limit “kicks in” for any amount of time, the following error
will start increasing.
Use when Commutating: When PMAC is commutating Motor x (Ix01 = 1) but not
closing the current loops (Ix82 = 0), Ix69 corresponds to peak values of the sinusoidal
phase currents. Motor and amplifier current limits are usually given as RMS values. Peak
phase values are √2, or 1.414, times greater than RMS values. For instance, if an amplifier
has a 10 amp (RMS) instantaneous current limit, the instantaneous limit for the peak of the
phase currents is 14.14 amps.
Use with Magnetization Current: When commutating, Ix69 is technically the limit of only
the quadrature, or torque-producing, current. Ix77 sets the magnitude of the direct, or
magnetization current, and the total current limit is the vector sum of these two variables.
If the Ix77 magnetization current for the motor is set to a value other than 0, Ix69 should
be set such that:
Ix69 2 + Ix77 2 ≤ I max ≤ 32 ,767
Use in Direct-PWM Mode: When commutating (Ix01 = 1) and closing the current loop
(Ix82 > 0) of a 3-phase motor (Ix72 = 85 or 171), it is important to understand the
relationship between the quadrature current limited by Ix69 and the phase currents
measured by the A/D converters. This difference is due to the nature of the conversion
between direct and quadrature current components, which are 90o apart, and the phase
currents, which are 120o apart. This difference introduces a factor of cos(30o) into the
calculations.
For a given level of DC quadrature current with zero direct (magnetization) current, the
peak value of AC sinusoidal current measured in the phases will be 1/cos(30o), or 1.15
times, greater. When quadrature current is commanded at its limit of Ix69, the peak phase
currents can be 15% higher that this value. For instance, with Ix69 at 10,000, and Ix77 at
0, the A/D converters can provide readings (normalized to 16-bit resolution) up to 11,547.
Use with Magnetization Current: With non-zero direct current, the peak value of AC
sinusoidal current measured in the phases will be 1.15 times greater than the vector sum of
the direct and quadrature currents. Therefore, in order not to saturate the current in the
phases, Ix69 should be set such that:
Ix69 2 + Ix77 2 ≤ I max cos(30 o ) ≤ 32 ,767 * 0.866 ≤ 28 ,377
Example 1. Motor 1 is driving a velocity-mode amplifier with differential analog inputs that are
limited to +/-10V between the inputs. This means that the PMAC outputs should each
be limited to +/-5V with respect to the AGND reference. I169 should therefore be
limited to 32,768/2 = 16,384.
2. Motor 3 is driving a DC brush motor amplifier in current (torque) mode with an analog
output. The amplifier has a gain of 2 amps/volt and an instantaneous current limit of
20 amps. The motor has an instantaneous current limit of 15 amps.
Commutation I-Variables
Ix70 Motor x Number of Commutation Cycles (N)
Range 0 .. 255
Units Commutation cycles
Default 1
Remarks For a PMAC-commutated motor (Ix01=1), this parameter is used in combination with Ix71
to define the size of the commutation cycle, in encoder counts, as Ix71/Ix70. Usually, this
is set to one, and Ix71 represents the number of counts in a single commutation cycle.
Ix70 only needs to be set greater than one if the number of counts in a single cycle is not
an integer.
A commutation cycle, or electrical cycle, consists of two poles (one pole pair) of a
multiphase motor.
Example A 6-pole brushless motor has three commutation cycles per mechanical revolution. If a
feedback device is used with 4096 counts per mechanical revolution (a number not
divisible by three), Ix70 should be set to 3, and Ix71 to 4096.
See Also I-variables Ix01, Ix71-Ix83
Setting Up PMAC Commutation
Ix71 Motor x Encoder Counts per N Commutation Cycles
Range 0 .. 8,388,607
Units Counts
Default 1000
Remarks For a PMAC-commutated motor, Ix71 defines the size of a commutation cycle in
conjunction with Ix70 (counts/cycle = Ix71/Ix70). The meaning of a “count” used in this
parameter is defined by the encoder-decode variable for the commutation feedback device
(Encoder I-Variable 0; I900, I905, etc. on a PMAC(1); I9n0 on a PMAC2). If a “times-4”
decode is used, a count is one-fourth of an encoder line.
If a highly interpolated encoder is used (e.g. from an ACC-51P or ACC-8D Opt 8) for
servo loop closure, the digital hardware quadrature counter is usually still used for
commutation, with a resolution of 4 counts per encoder line.
If the commutation feedback comes from a MACRO-node position feedback register, the
position value is usually in units of 1/32 of a count, so Ix71 should be 32 times larger than
it would be for reading a hardware encoder counter directly.
A commutation cycle, or electrical cycle, consists of two poles (one pole pair) of a
multiphase motor.
Example A four-pole brushless motor with a 1000-line-per-revolution encoder and “times-4” decode
read directly on the PMAC has 2 commutation cycles per revolution and 4000 counts per
revolution. Therefore, either Ix70=2 and Ix71=4000 could be used, or Ix70=1 and
Ix71=2000.
For the same motor and encoder read through a MACRO Station, the units of the position
register read for commutation would be 1/32-count, so there would appear to be 4000*32,
or 128,000 counts per revolution. Therefore, either Ix70=2 and Ix71=128000 could be use,
or Ix70=1 and Ix71=64000.
See Also I-variables Ix01, Ix70, Ix72-Ix83
Setting Up PMAC Commutation
For systems with PMAC2 digital current loop closure, the commutation/feedback polarity
match is independent of the servo/feedback polarity. Once Ix72 has been set for proper
commutation/feedback polarity, the proper position-loop servo/feedback polarity must still
be established.
See Also I-variables Ix70, Ix71
Encoder I-Variable 0
Setting Up PMAC Commutation
Getting Started Section, Setting Up A PMAC-Commutated Motor
Ix73 Motor x Phase Finding Output Value
Range -32,768 .. 32,767
Units Bits of 16-bit DAC
Default 0
Remarks WARNING:
An unreliable phasing search method can lead to a runaway
condition. Test your phasing search method carefully to make sure
it works properly under all conceivable conditions. Make sure your
Ix11 fatal following error limit is active and as tight as possible so
the motor will be killed quickly in the event of a serious phasing
search error.
Ix73 defines the magnitude of the open-loop output to be used if a power-on phasing
search is done for a PMAC-commutated motor (Ix01=1). A phasing search is required for
a synchronous motor (Ix78=0) such as a permanent-magnet brushless motor with no
absolute position sensor (Ix81=0). The phasing search is done automatically as part of the
power-on phasing search if Ix80 is 1 or 3; if Ix80 is 0 or 2, the on-line $ command must be
used must be used to initiate the phasing search.
If Ix80 is 0 or 1, the two-guess phasing search is used, and Ix73 controls the “vector”
magnitude of the open-loop output that is distributed among the phases according to the
guessed phasing angle.
If Ix80 is 2 or 3, the stepper-motor phasing search is used, and Ix73 controls the magnitude
of current forced into individual phase(s) to lock the motor to a position like a stepper
motor. In this method, if the PMAC2 is not performing current loop closure for the motor
(Ix82 = 0) and Ix72 > 128, then Ix73 should be set to a negative number of the desired
magnitude. In all other cases it should be set to a positive number. If the sign of Ix73 is
wrong for your setup, the motor will run away when the loop is closed.
Values of 2000 to 6000 are typically used for Ix73 in either method.
See Also Power-Up Phasing Search (Setting Up PMAC Commutation)
I-Variables Ix01, Ix74, Ix78, Ix80, Ix81
Ix74 Motor x Phase Finding Time
Range 0 .. 255
Units Servo Interrupt Cycles (for Ix80 = 0 or 1)
or
Servo Interrupt Cycles * 256 (for Ix80 = 2 or 3)
Default 0
Remarks WARNING:
An unreliable phasing search method can lead to a runaway
condition. Test your phasing search method carefully to make sure
it works properly under all conceivable conditions. Make sure your
Ix11 fatal following error limit is active and as tight as possible so
the motor will be killed quickly in the event of a serious phasing
search error.
Ix74 defines the time that an open-loop output is to be used if a power-on phasing search is
done for a PMAC-commutated motor (Ix01=1). A phasing search is required for a
synchronous motor (Ix78=0) such as a permanent-magnet brushless motor with no
absolute position sensor (Ix81=0). The phasing search is done automatically as part of the
power-on phasing search if Ix80 is 1 or 3; if Ix80 is 0 or 2, the on-line $ command must be
used must be used to initiate the phasing search.
If Ix80 is 0 or 1, the “two-guess” phasing search is used; Ix74 has units of servo cycles and
controls the time for the open-loop command at each “guess” of the phase angle. Typical
values are 3 to 10 servo cycles; 5 is a good starting point.
If Ix80 is 2 or 3, the “stepper-motor” phasing search is used; Ix74 has units of (servo
cycles*256) and controls the time current is forced into each phase and PMAC waits for
the motor to settle into the “step” position. With the default servo cycle rate of 2.25 kHz,
each unit of Ix74 represents about 0.1 seconds in this mode; typical values are 10 to 20.
See Also Power-Up Phasing Search (Setting Up PMAC Commutation)
I-Variables Ix01, Ix73, Ix78, Ix80, Ix81
Ix75 Motor x Power-On Phase Position Offset
Range -8,388,608 .. 8,388,607
Units Encoder counts * Ix70
Default 0
Remarks Ix75 tells PMAC the distance between the zero position of an absolute sensor used for
power-on phase position (specified by Ix81) and the zero position of PMAC’s
commutation cycle. It is used to reference the phasing algorithm for a PMAC-commutated
motor with an absolute sensor (Ix81 > 0). If Ix80 is 1, this is done automatically during
the power-up/reset cycle. It will also be done in response to a $ command to the motor.
The SETPHASE command also uses Ix75, copying the Ix75 value directly into the phase
position register. This mode is typically used to correct the phasing at a known position
(usually at the index pulse of the encoder) after a rough phasing (hall-sensor read or
phasing search) gives you enough torque for basic motion to the known position.
The proper value for this parameter can be found with a simple procedure that should be
done with an unloaded motor, after satisfactory operation has been achieved using a
power-on phasing search.
For use with the Ix81 absolute read, define an M-variable to the absolute sensor (TWR
form for a resolver, Y form for an absolute encoder). Next, drive the motor to the zero
position in the commutation cycle, either by issuing a $ command with the motor set up for
the “stepper motor” phasing search (Ix80 = 1 or 3), or by manually setting the phase
offsets for the motor.
In the manual technique, give the motor an O0 command. Put a bias on the A phase
(higher-numbered DAC of a PMAC1 pair) by setting Ix29; use a positive bias if Ix72=171
or 192 (2000 is usually a good value); use a negative bias if Ix72=85 or 64. Also put a bias
in the opposite direction of the same magnitude on the B phase by setting Ix79. The motor
should lock in on a position like a stepper motor.
Now remove the A-phase bias by setting Ix29 back to zero, or at least to the value you
have found to force zero current in the phase, and the motor should lock in on another
position. This position is the zero position of the phasing cycle.
In either technique for forcing the motor to its zero commutation position, after you are
sure the motor has settled, read the position of the absolute sensor by querying its M-
variable value.
Take the negative of this value, multiply it by Ix70, and put the resulting value in Ix75.
Now, with Ix79 returned to zero or the proper bias, and Ix81 pointing to the absolute
sensor, give the motor a $ command. The motor should be properly phased. Remember to
save these variable values before doing a full reset on the card.
For use with the SETPHASE command, define an M-variable to the the phase position
register. The suggested M-variable is Mx71 (e.g. M171->X:$0041, 0,24,S).
Execute the above sequence with Ix29 and Ix79 to force the motor to the zero-point in its
phase cycle. Set the M-variable to zero (e.g. M171=0). Now move the motor to the
known position in its cycle (usually with a homing search move), let it settle, and read the
M-variable value. This value will be put in Ix75.
Example On a brushless motor #1 commutated from PMAC with Ix70 =1 and Ix72 = 171, using an
R/D converter at location 0 of a board at multiplexer address 0, the following on-line
commands can be used to set Ix75:
M171->TWR:0,0 ;Resolver position
#1O0 ;Open-loop zero command
I129=2000 ;Pos bias on first phase output (Neg if Ix72=85 or 64)
I179=-2000 ;Neg bias on second phase output (Pos if Ix72=85 or 64)
I129=0 ;Remove bias from first phase output
M171 ;Query sensor position
223 ;PMAC responds
I175=-223 ;Set phasing position offset (223*-1*Ix70)
I179=0 ;Remove bias from second phase
I181=$000100 ;Set power-on position address
I173=0 ;Make sure no phasing search move is done
I174=0 ;Make sure no phasing search move is done
SAVE ;Store I-variables in non-volatile memory
$ ;Try phasing from absolute position sensor
See Also Phasing Referenced to Absolute Sensor (Setting Up PMAC Commutation)
I-Variables I8x, I9x, Ix03, Ix10, Ix81, Ix83
ACC-8D Option 7 (R/D Converter) Manual
• Bit 1 controls what type of phasing search move is performed, if one is required (Ix74 > 0),
either during power-up/reset, or on a subsequent $ motor reset command. If bit 1 is 0 and a
phasing search move is required, PMAC will use the two-guess phasing search method. If
bit 1 is 1 and a phasing search move is required, PMAC will use the “stepper-motor”
phasing search method. The state of bit 1 does not matter unless a phasing search move is
to be done.
• Bit 2 controls whether an absolute position read for the motor is done at power-up/reset or
not, if one is required (Ix10 > 0). If bit 2 is set to 0 and an absolute position read is
specified, this read operation will be performed automatically at the board power-up/reset.
If bit 2 is set to 1 and an absolute position read is specified, this read operation will not be
done automatically at power-up/reset, and the $* command must be issued to perform the
absolute position read. The state of bit 2 does not matter unless an absolute position read is
to be done.
The possible values of Ix80 and the function of each are described in the following table:
Ix80 Absolute Position Read at Phasing Search Power-up/Reset
Power-up/Reset? Method Enable State
0 Yes Two-Guess Disabled
1 Yes Two-Guess Enabled
2 Yes Stepper-Motor Disabled
3 Yes Stepper-Motor Enabled
4 No Two-Guess Disabled
5 No Two-Guess Enabled
6 No Stepper-Motor Disabled
7 No Stepper-Motor Enabled
Power-up/reset enable state: If the motor is not automatically enabled at power-up/reset, a
command must be used subsequently to enable the motor. If PMAC is commutating the motor
(Ix01 = 1) and it is a synchronous motor (Ix78 = 0), a phase reference must be established with
the $ or $$ command as part of the enabling process. The motor cannot be enabled before a
successful phase reference is established, because the motor “phase reference error” status bit
that is automatically set on power-up/reset will not have been cleared.
If the motor is either not commutated by PMAC (Ix01 =0) or it is not a synchronous motor
(Ix78 > 0), a simple enabling command can be used. The J/ command enables a single motor;
the A command enables all of the motors in a coordinate system; the <CTRL-A> command
enables all of the motors on PMAC.
The phase reference, whether executed at power-up/reset or on the $ command, can be done
either by reading an absolute position sensor (Ix81 > 0) or by a phasing search move (Ix74 > 0)
if only an incremental sensor is used.
WARNING:
An unreliable phasing search method can lead to a runaway condition.
Test your phasing search method carefully to make sure it works
properly under all conceivable conditions. Make sure your Ix11 fatal
following error limit is active and as tight as possible so the motor will
be killed quickly in the event of a serious phasing search error.
Phasing search move method: The two-guess phasing search is very quick and requires little
movement, but can be adversely affected if there are significant external loads such as friction
and gravity. The stepper-motor phasing search takes more time and causes more movement,
but it is more reliable in the presence of significant external loads.
Absolute motor position read: If Ix10 is set to 0, the position reference for a motor comes
from a homing search move. If Ix10 is greater than 0, the position reference comes from
reading an absolute position sensor at the address and with the format specified by Ix10. In this
case, Ix80 bit 2 specifies whether or not this read is done automatically at power-up/reset.
If the absolute position read is not done automatically at power-up/reset, the motor position will
be set to 0 at this time. This does not prevent full operation of the motor. The $* command
must be used later to read the sensor and establish absolute position. Even if the absolute
position is read automatically at power-up/reset, it may be read again later with the $*
command.
See Also Power-Up Phasing Search (Setting Up PMAC Commutation)
On-line commands $, $$, $*, $$$
I-Variables Ix01, Ix73, Ix74, Ix78, Ix81
Ix81 Motor x Power-Up Phase Position Address
Range $000000 .. $FFFFFF
Units Extended PMAC Addresses
Default 0
Remarks Ix81 tells PMAC what address to read for absolute power-on phase-position information
for Motor x, and how to read it, if such information is present. This can be a different
address from that of the ongoing phase position information, which is specified by Ix83.
Ix81 is set to zero if no special power-on phase position reading is desired, as is the case
for an incremental encoder.
If Ix81 is set to zero, a power-on phasing search routine is required for synchronous fixed-
field brushless motors (permanent magnet, and switched reluctance); those that have a slip
gain (Ix78) of zero. PMAC’s automatic phasing search routines based on Ix73 and Ix74
can be used, or a custom power-on PLC routine can be written.
Note:
Ix81 is used for PMAC’s commutation algorithms alone, to locate
position within one electrical cycle of the motor. It is not used for
any servo loop position information, even for power-up. Ix10 is
used for that purpose.
Ix81 consists of two parts. The low 16 bits contain the address of the register containing
the power-on position information, either a PMAC memory-I/O address, or an address on
the multiplexer (“thumbwheel”) port. The high 8 bits specify how to read the information
at this address.
Note:
It is easier to specify this parameter in hexadecimal form ($ prefix).
If I9 is set to 2 or 3, the value of this variable will be reported back
to the host in hexadecimal form.
The possible value ranges of Ix81 and the position sources they specify are summarized in
the following table:
Ix81 Value Range Absolute Position Source Ix81 Address Type
$00xxxx - $07xxxx ACC-8D Opt 7 R/D Converter Multiplexer Port
$08xxxx - $18xxxx Parallel Data Y-Register PMAC Memory-I/O
$48xxxx - $58xxxx Parallel Data X-Register PMAC Memory-I/O
$73xxxx MACRO Station R/D Converter MACRO Node Number
$74xxxx MACRO Station Parallel Read MACRO Node Number
$80xxxx - $FFxxxx Hall Sensor Read PMAC Memory-I/O
The following section provides detail for each type of position feedback.
R/D Converter: If Ix81 contains a value from $0000xx to $0700xx, Motor x will expect
its absolute power-on phase position from an ACC-8D Opt. 7 R/D converter board. The
low 8 bits(last 2 hex digits) of Ix81 should contain the address of the board on the
multiplexer port, as set by the DIP switches on the board.
The second hex digit of Ix81, which can take a value from 0 to 7 in this mode, specifies the
number of the individual R/D converter at that multiplexer port address. This is a function
of the DIP switch setting on the board and the location of the converter on the board, as
specified in the following table:
Ix81 Value ACC-8D Opt. 7 # of R/D Converter
SW1-1 Setting on ACC-8D Opt. 7
$0000xx CLOSED (0) 1
$0100xx CLOSED (0) 2
$0200xx CLOSED (0) 3
$0300xx CLOSED (0) 4
$0400xx OPEN (1) 1
$0500xx OPEN (1) 2
$0600xx OPEN (1) 3
$0700xx OPEN (1) 4
The following table shows the value of Ix81 for the multiplexer port addresses for the
ACC-8D Opt. 7 that can be used:
Board Ix81 Board Ix81 Board Ix81 Board Ix81
Mux. Mux. Mux. Mux.
Addr. Addr. Addr. Addr.
0 $0n0000* 64 $0n0040 128 $0n0080 192 $0n00C0
8 $0n0008 72 $0n0048 136 $0n0088 200 $0n00C8
16 $0n0010 80 $0n0050 144 $0n0090 208 $0n00D0
24 $0n0018 88 $0n0058 152 $0n0098 216 $0n00D8
32 $0n0020 96 $0n0060 160 $0n00A0 224 $0n00E0
40 $0n0028 104 $0n0068 168 $0n00A8 232 $0n00E8
48 $0n0030 112 $0n0070 176 $0n00B0 240 $0n00F0
56 $0n0038 120 $0n0078 184 $0n00B8 248 $0n00F8
‘n’ is a digit from 0 to 7 specifying the converter number at that address
* If ‘n’ is 0 and the multiplexer address is 0, the 4th hex digit should be set to 1, making
Ix81=$000100; otherwise with Ix10=0, no absolute position would be read.
Parallel Data Read: If Ix81 contains a value from $08xxxx to $18xxxx, or from $48xxxx
to $58xxxx, Motor x will do a parallel data read of the PMAC memory or I/O register at
the address specified by the low 16 bits of Ix81.
In this mode, bits 16 to 21 of Ix81 specify the number of bits to be read, starting with bit 0
at the specified address. In this mode, they can take a value from $08 to $18 (8 to 24).
In this mode, bit 22 of Ix81 specifies whether a Y-register is to be read, or an X-register.
A value of 0 in this bit, yielding Ix81 values from $08xxxx to $18xxxx, specifies a Y-
register; a value of 1, yielding Ix81 values from $48xxxx to $58xxxx, specifies an X-
register.
The following table shows Ix81 values for parallel data read through an ACC-14 board.
All ACC-14 registers are a Y-addresses.
Register Ix81 Register Ix81
1st ACC-14D/V Port A $xxFFD0 4th ACC-14D/V Port A $xxFFE8
st
1 ACC-14D/V Port B $xxFFD1 4th ACC-14D/V Port B $xxFFE9
2nd ACC-14D/V Port A $xxFFD8 5th ACC-14D/V Port A $xxFFF0
2nd ACC-14D/V Port B $xxFFD9 5th ACC-14D/V Port B $xxFFF1
3rd ACC-14D/V Port A $xxFFE0 6th ACC-14D/V Port A $xxFFF8
3rd ACC-14D/V Port B $xxFFE1 6th ACC-14D/V Port B $xxFFF9
xx’ represent the first two digits, which control bit width. They can take values
from $08 to $18.
For the ACC-8D Opt. 9 Yaskawa Absolute Encoder Converter, PMAC’s 24-bit encoder
phase position register, an X-register, is read, so Ix81 is set to $58xxxx ($180000 +
$400000).
The following table shows Ix81 values for a Yaskawa absolute encoder connected through
an ACC-8D Option 9 to each PMAC(1) encoder channel:
Channel Ix81 Channel Ix81
1 $58C001 9 $58C021
2 $58C005 10 $58C025
3 $58C009 11 $58C029
4 $58C00D 12 $58C02D
5 $58C011 13 $58C031
6 $58C015 14 $58C035
7 $58C019 15 $58C039
8 $58C01D 16 $58C03D
Channels 9 – 16 are on an ACC-24P/V board
The following table shows Ix81 values for a Yaskawa absolute encoder connected through
an ACC-8D Option 9 to each PMAC2 encoder channel:
Channel Ix81 Channel Ix81
1 $58C001 9 $58C041
2 $58C009 10 $58C049
3 $58C011 11 $58C051
4 $58C019 12 $58C059
5 $58C021 13 $58C061
6 $58C029 14 $58C069
7 $58C031 15 $58C071
8 $58C039 16 $58C079
Channels 9 – 16 are on an ACC-24P/V2 board
For the ACC-49 Sanyo Absolute Encoder Converter, the encoder provides a 13-bit value
within one motor revolution, and the data is read from a Y-register, so Ix81 is set to
$0Dxxxx.
The following table lists the possible values of Ix81 for the ACC-49:
Enc. # Ix81 for Ix81 for Ix81 for Enc. # Ix81 for Ix81 for Ix81 for
on E1 ON E2 ON E3 ON on E4 ON E5 ON E6 ON
Board Board
Enc. 1 $0DFFD0 $0DFFD8 $0DFFE0 Enc. 3 $0DFFE8 $0DFFF0 $0DFFF8
Enc. 2 $0DFFD4 $0DFFDC $0DFFE4 Enc. 4 $0DFFEC $0DFFF4 $0DFFFC
MACRO R/D Read: If Ix81 contains a value of $73000n, Motor x will read the absolute
phase position from an ACC-8D Opt. 7 Resolver-to-Digital Converter through a MACRO
Station or compatible device.
In this mode, the last hex digit ‘n’ of Ix81 specifies the MACRO node number. MACRO
Station setup variable MI11x for the matching node must be set to read the R/D converter.
MACRO Parallel Read: If Ix81 contains a value of $74000n, Motor x will read the
absolute phase position from a parallel data source through a MACRO Station or
compatible device.
In this mode, the last hex digit ‘n’ of Ix81 specifies the MACRO node number. MACRO
Station setup variable MI11x for the matching node must be set to read the parallel data
source.
Hall Sensor Read: If Ix81 contains a value from $80xxxx to $FFxxxx (bit 23 if Ix81 set to
1), Motor x will read bits 20 through 22 of the PMAC memory or I/O register at the
address specified by the low sixteen bits (last 4 hex digits ‘xxxx’) of Ix81. It will expect
these three bits to be encoded as the U, V, and W “hall-effect” commutation signals with
120oe spacing for the absolute power-on phase position. In this mode, the address
specified in Ix81 is usually that of a flag register.
If the flag register is in a PMAC(1) or PMAC(1)-style ACC-24P, the flag inputs for bits
20, 21, and 22, representing W, V, and U, are +LIMn, -LIMn, and HMFLn, respectively.
In a typical application, Ix81 specifies that these inputs are used from the “spare” flag
register matching the second DAC channel used for commutation.
The following table shows the Ix81 settings for the flag registers in even-numbered
channels of a PMAC(1) and a PMAC(1)-style ACC-24P that are typically used for hall
commutation sensor inputs:
Channel Ix81 Channel Ix81
2 $xxC004 10 $xxC024
4 $xxC00C 12 $xxC02C
6 $xxC014 14 $xxC034
8 $xxC01C 16 $xxC03C
The proper value of ‘xx’ depends on the offset and direction sense of
the hall sensors.
If the flag register is in a PMAC2-style Servo IC, the input flags for bits 20, 21, and 22,
representing W, V, and U, are CHWn, CHVn, and CHUn, respectively. In a typical
application, these inputs are used from the same flag register addressed by Ix25 for the
main flags.
The following table shows the Ix81 settings for the flag registers in channels of a PMAC2
that are typically used for hall commutation sensor inputs:
Channel Ix81 Channel Ix81
1 $xxC000 5 $xxC020
2 $xxC008 6 $xxC028
3 $xxC010 7 $xxC030
4 $xxC018 8 $xxC038
The proper value of ‘xx’ depends on the offset and direction sense of
the hall sensors.
In this mode, bit 22 of Ix81 allows for reversal of the sense of the hall-effect sensors. If W
(bit 20 of the register; HMFLn or CHWn) leads V (bit 21; -LIMn or CHVn), and V leads
U (bit 22; +LIMn or CHUn) as the commutation cycle counts up, then bit 22 of Ix81
should be set to 0. If U leads V and V leads W as the commutation cycle counts up, then
bit 22 of Ix81 should be set to 1.
In this mode, bits 16 to 21 of Ix81 together form an offset value from 0 to 63 representing
the difference between PMAC’s commutation cycle zero and the hall-effect sensor zero
position, which is defined as the transition of the V signal when U is low. This offset has
units of 1/64 of a commutation cycle, or 5.625oe. Typically, one of the transitions will be
at PMAC’s commutation zero point, so the desired offset values will be 0o, 60o, 120o, 180o,
240o, and 300o, approximated by values of 0, 11($0B), 21($15), 32($20), 43($2B), and
53($35).
This operation can handle hall-effect sensors separated by 120oe. The following table
gives the Ix81 settings for bits 16 to 23 for the most common cases of hall-effect settings
as they relate to the PMAC commutation cycle.
0 to 60 to 120 to 180 to -120 to -60 to Ix81
60 deg 120deg 180 deg -120 deg -60 deg 0 deg
011 010 110 100 101 001 $80xxxx
001 011 010 110 100 101 $8Bxxxx
101 001 011 010 110 100 $95xxxx
100 101 001 011 010 110 $A0xxxx
110 100 101 001 011 010 $ABxxxx
010 110 100 101 001 011 $B5xxxx
001 101 100 110 010 011 $C0xxxx
011 001 101 100 110 010 $CBxxxx
010 011 001 101 100 110 $D5xxxx
110 010 011 001 101 100 $E0xxxx
100 110 010 011 001 101 $EBxxxx
101 100 110 010 011 001 $F5xxxx
Note that ‘000’ and ‘111’ are invalid readings.
Example Motor 1 has a single resolver at location 0 of an ACC-8D Opt.7 R/D converter board at
multiplex address 0; no phasing search is permitted, but a homing search is required:
I181=$000100 ($100=256dec, representing multiplex address 0), I110=0.
Motor 2 has a single resolver at location 6 of an ACC-8D Opt 7 board at multiplex address
4; no phasing search is permitted, but a homing search is required: I281=$060004; I210=0.
Motor 3 has a double geared resolver at locations 2 and 3 of an ACC-8D Opt 7 board at
multiplex address 6, with a 10:1 gear ratio between them; no phasing search or homing
search is permitted: I381=$020006; I310=$020006; I93=10
Motor 4 has a 20-bit single-turn absolute encoder at Port A of the first ACC-14 (address
Y:$FFD0): I481=$14FFD0 ($14=20dec)
Motor 5 is a brush motor with a double geared resolver at locations 0 and 1 of an ACC-8D
Opt 7 board at multiplex address 2; no homing search is permitted: I581=0 (no phasing
required); I510=$000002
Motor 6 uses hall-effect sensors wired into the flags on Channel 12 for power-up phase
referencing. The zero point of the hall effect is at 60oe, and the direction is “standard”, not
reversed. I610= $8BC034.
See Also Phasing Referenced to Absolute Sensor (Setting Up PMAC Commutation)
I-Variables I8x, I9x, Ix03, Ix10, Ix75, Ix83
ACC-8D Option 7 (R/D Converter) Manual
Ix82 Current loop Feedback Address {PMAC2 only}
Range Legal PMAC Y addresses
Units Legal PMAC Y addresses
Default 0
Remarks Ix82 tells PMAC2 which addresses to read to get its current feedback values for Motor x if
PMAC2 is closing the current loop for this motor. PMAC must be performing the
commutation for the motor (Ix01=1) if it is to close the current loop as well.
A zero value for Ix82 tells PMAC2 not to close the current loop for this motor. In this
case, PMAC either outputs one velocity or torque command value (Ix01=0), or two phase-
current command values (Ix01=1), usually represented as analog voltages.
A non-zero value for Ix82 automatically triggers current loop execution in the phase
interrupt, using the current value(s) found in the register(s) specified by Ix82. Typically
these registers are analog-to-digital converter (ADC) registers in the PMAC2 ASIC, or
MACRO feedback registers containing copies of ADC registers in a MACRO Station
When Ix01 is set to 1, PMAC2 performs the phase commutation for this motor, computing
two phase current commands based on the position/velocity servo command and the
magnetization current value. If Ix82>0, these commands are compared to the two actual
current values read from the address specified by Ix82, and the next lower address. It
executes a PI filter on the current loops and outputs three voltage command values to the
address specified by Ix02 and the next two higher addresses. These are typically the PWM
commands for the three half-bridges of a brushless motor power stage.
When the digital current loop is used for drives connected directly to the PMAC2, the
typical values for Ix82 are:
Channel Ix82 Channel Ix82
ADC1A & B $C006 ACDC9A & B $C046
ADC2A & B $C00E ACDC10A & B $C04E
ADC3A & B $C016 ACDC11A & B $C056
ADC4A & B $C01E ACDC12A & B $C05E
ADC5A & B $C026 ACDC13A & B $C066
ADC6A & B $C02E ACDC14A & B $C06E
ADC7A & B $C036 ACDC15A & B $C076
ADC8A & B $C03E ACDC16A & B $C07E
Channels 9 – 16 are present on an ACC-24P/V2 board
When the digital current loop is used for drives connected to the PMAC2 through a
MACRO station, the typical values for Ix82 are:
Node/Register Ix82 Node/Register Ix82
Node 0/Reg 1 & 2 $C0A2 Node 8/Reg 1 & 2 $C0B2
Node 1/Reg 1 & 2 $C0A6 Node 9/Reg 1 & 2 $C0B6
Node 4/Reg 1 & 2 $C0AA Node 12/Reg 1 & 2 $C0BA
Node 5/Reg 1 & 2 $C0AE Node 13/Reg 1 & 2 $C0BE
If Ix82>0, the following variables must be set properly for correct operation of the digital
current loop:
Ix61: Current-Loop Integral Gain
Ix62: Current-Loop Forward-Path Proportional Gain
Ix66: PWM Scale Factor
Ix72: Commutation Phase Angle
Ix76: Current-Loop Back-Path Proportional Gain
Ix84: Current-Loop Feedback Mask Word
Ix83 Motor x Ongoing Phasing Position Address
Range Legal PMAC X and Y addresses
Units Legal PMAC X and Y addresses
Default Variable PMAC(1) PMAC2 PMAC2
Ultralite
I183 $C001 $C001 $8C0A0
I283 $C009 $C009 $8C0A4
I383 $C011 $C011 $8C0A8
I483 $C019 $C019 $8C0AC
I583 $C021 $C021 $8C0B0
I683 $C029 $C029 $8C0B4
I783 $C031 $C031 $8C0B8
I883 $C039 $C039 $8C0BC
Remarks For a motor commutated by PMAC2, this parameter tells PMAC2 where to read its
commutation (phasing) position information for Motor x every commutation cycle. This
can be a different address from that used for power-on/reset phasing position, which is
determined by Ix81.
Bits 0 to 15 of Ix83 contain the 16-bit address of the register to be read. Bit 19 of Ix83
tells whether the register has a X address or a Y address; a 0 value specifies X, and a 1
value (which makes the hexadecimal digit have an 8 value) specifies Y.
For PMAC(1) and PMAC2 boards with on-board encoder circuitry, Ix83 typically contains
the address of the phase position encoder register for encoder x; this is the default. Since
these registers have X addresses, bit 19 is 0.
On PMAC(1) boards, because two channels are required for commutation output, usually
only the odd-numbered channels are used for commutation feedback. This is reflected in
the defaults.
The following table provides the Ix83 values for all of the possible phase-position registers
in PMAC(1) system:
Channel Ix83 Channel Ix83
1 $C001 9 $C021
2 $C005 10 $C025
3 $C009 11 $C029
4 $C00D 12 $C02D
5 $C011 13 $C031
6 $C015 14 $C035
7 $C019 15 $C039
8 $C01D 16 $C03D
Channels 9 – 16 are present on an ACC-24P/V board
On PMAC2 boards, commutation requires only one channel, so any channel can be used
for commutation feedback. The following table provides the Ix83 values for all of the
phase-position registers in a PMAC2 system:
Channel Ix83 Channel Ix83
1 $C001 9 $C041
2 $C009 10 $C049
3 $C011 11 $C051
4 $C019 12 $C059
5 $C021 13 $C061
6 $C029 14 $C069
7 $C031 15 $C071
8 $C039 16 $C079
Channels 9 – 16 are present on an ACC-24P/V2 board
For PMAC2 Ultralite boards, Ix83 typically contains the address of a MACRO node’s
position feedback register; this is the default. Since PMAC2 can only commutate over
MACRO using nodes with ‘Y’ addresses, bit 19 must be set to 1 in these cases. The
following table shows Ix83 values for all of the MACRO servo nodes:
Node Ix83 Channel Ix83
0 $8C0A0 8 $8C0B0
1 $8C0A4 9 $8C0B4
4 $8C0A8 12 $8C0B8
5 $8C0AC 13 $8C0BC
If the motor is performing open-loop microstepping control inside PMAC (Ix01=1, bit 16
of Ix02=1), this parameter must contain the address of the motor’s “phase advance “
register (X:$0042, X:$007E, etc.) instead of an encoder register.
See Also I-variables Ix01, Ix02, Ix03, Ix04, Ix81
Setting Up PMAC Commutation
I/O-Memory Map registers X:$C001, X:$C005, etc., X:$0042, X:$007E, etc.
Ix84 Current-Loop Feedback Mask Word {PMAC2 only}
Range $000000 .. $FFFFFF
Units Bit mask
Default $FFF000 (12-bit ADCs)
Remarks Ix84 tells PMAC2 what bits of the 24-bit current feedback word(s) to use as actual the
actual current value in the current loop equations when it is closing the current loops for a
direct-PWM “power-block” amplifier. It is only used if Ix82>0, enabling current loop
closure in the PMAC2.
If backlash tables are used, Ix86 represents the backlash at motor zero position; values in
the table should represent the difference between the backlash at a given position and Ix86.
Note:
The units of this parameter are 1/16 of a count so the value should
be 16 times the number of counts of backlash compensation desired.
Example If you find that you have a backlash on reversal of motor direction of 7.5 encoder counts,
you would set Ix86 to 7.5 * 16 = 120.
See Also I-variables I99, Ix64, Ix65, Ix68, Ix85
On-line commands DEFINE BLCOMP, DELETE BLCOMP
Backlash Compensation (Setting Up a Motor)
Coordinate System x I-Variables
x = Coordinate System Number (&x, x = 1 to 8)
Ix87 Coordinate System x Default Program Acceleration Time
Range 0 .. 8,388,607
Units msec
Default 0 (so Ix88 controls)
Remarks Ix87 sets the default time for commanded acceleration for programmed blended LINEAR
and CIRCLE mode moves in Coordinate System x. It also provides the default segment
time for SPLINE mode moves. The first use of a TA statement in a program overrides this
value.
Note:
Even though this parameter makes is possible not to specify
acceleration time in the motion program, you are strongly
encouraged to use TA in the program and not rely on this parameter,
unless you must keep to a syntax standard that does not support this
(e.g. RS-274 “G-Codes “). Specifying acceleration time in the
program along with speed and move modes makes it much easier
for later debugging.
If the specified S-curve time (see Ix88, below) is greater than half the specified
acceleration time, the time used for commanded acceleration in blended moves will be
twice the specified S-curve time.
The acceleration time is also the minimum time for a blended move; if the distance on a
feedrate-specified (F) move is so short that the calculated move time is less than the
acceleration time, or the time of a time-specified (TM) move is less than the acceleration
time, the move will be done in the acceleration time instead. This will slow down the
move.
Note:
The acceleration time will be extended automatically when any
motor in the coordinate system is asked to exceed its maximum
acceleration rate (Ix17) for a programmed LINEAR-mode move
with I13=0 (no move segmentation).
Note:
Make sure that the specified acceleration time (Ix87 or 2*Ix88) is
greater than zero, even if you are planning to rely on the maximum
acceleration rate parameters. A specified acceleration time of zero
will cause a divide-by-zero error. The minimum specified time
should be Ix87=1, Ix88=0.
See Also Acceleration Limits (Making Your Application Safe)
I-variables I13, Ix17, Ix88
Program Commands TA, TS
Ix88 Coordinate System x Default Program S-Curve Time
Range 0 .. 8,388,607
Units msec
Default 50
Remarks Ix88 set the default time in each half of the S in S-curve acceleration for programmed
blended LINEAR and CIRCLE mode moves in Coordinate System x. It does not affect
SPLINE, PVT, or RAPID mode moves. The first use of a TS statement in a program
overrides this value.
Note:
Even though this parameter makes is possible not to specify
acceleration time in the motion program, you are strongly
encouraged to use TS in the program and not rely on this parameter,
unless you must keep to a syntax standard that does not support this
(e.g. RS-274 G-Codes ). Specifying acceleration time in the
program along with speed and move modes makes it much easier
for later debugging.
If Ix88 is zero, the acceleration is constant throughout the Ix87 time and the velocity
profile is trapezoidal. If Ix88 is greater than zero, the acceleration will start at zero and
linearly increase through Ix88 time, then stay constant (for time TC) until Ix87-Ix88 time,
and linearly decrease to zero at Ix87 time (that is Ix87=2*Ix88 - TC). If Ix88 is equal to
Ix87/2, the entire acceleration will be spec in S-curve form (Ix88 values greater than
Ix87/2 override the Ix87 value; total acceleration time will be 2*Ix88).
Note:
The acceleration time will be extended automatically when any
motor in the coordinate system is asked to exceed its maximum
acceleration rate (Ix17) for a programmed LINEAR-mode move
with I13=0 (no move segmentation).
Make sure the specified acceleration time (TA or 2*TS) is greater
than zero, even if you are planning to rely on the maximum
acceleration rate parameters (Ix17). A specified acceleration time
of zero will cause a divide-by-zero error. The minimum specified
time should be TA1 TS0.
See Also Acceleration Limits (Making Your Application Safe)
I-variables I13, Ix17, Ix87
Program Commands TA, TS
Remarks Ix93 tells Coordinate System x where to look for its time base control (feedrate override)
information by specifying the address of the register that will be used. The default value
of this parameter for each coordinate system (see above) specifies the register that
responds to on-line commands. If the time base is left alone, or is under host or
programmatic control, this parameter should be left at the default.
Alternatively, if the time base is controlled externally from a frequency or voltage, the
register containing the time-base information will almost always be in the conversion table
(which starts at address $720 [1824 decimal]). With the default conversion table, there is a
time-base register at $0729 (1833) related to the frequency into the Encoder 4 counter.
This frequency can be controlled by an input voltage on the WIPER pin of the Control
Panel Port if jumpers E72 and E73 are ON. If another register is to be used for the time
base, it must have the units of I10 so that 8388608 (2 ) indicates 1 msec between servo
23
interrupts. See instructions for using an external time base, under Synchronizing PMAC to
External Events.
Note:
Ix93 contains the address of the register that holds the time-base
value (it is a pointer to that register). Ix93 does not contain the
time-base value itself.
See Also Time-Base Control (Synchronizing PMAC to External Events)
Control Panel Port Inputs (Connecting PMAC to the Machine)
I-variables I10, Ix93, Ix95
On-line commands %, %{constant}.
Jumpers E72, E73
Ix94 Coordinate System x Time Base Slew Rate
Range 0 .. 8,388,607
Units 2- msec/ servo cycle
23
Default 1644
Remarks Ix94 controls the rate of change of the coordinate system’s time base. It effectively works
in two slightly different ways, depending on the source of the time base information. If
the source of the time base is the “%” command register, then Ix94 defines the rate at
which the “ (actual time base) value will slew to a newly commanded value. If the rate is
too high, and the % value is changed while axes in the coordinate system are moving, there
will be a virtual step change in velocity. For these type of applications, Ix94 is set
relatively low (often 1000 to 5000) to provide smooth changes.
Note:
The default Ix94 value of 1644, when used on a card set up with the
default servo cycle time of 442 µsec, provides a transition time
between %0 and %100 of one second.
If there is a hardware source (as defined by Ix93), the commanded time-base value
changes every servo cycle, and the rate of change of the commanded value is typically
limited by hardware considerations (e.g. inertia). In this case, Ix94 effectively defines the
maximum rate at which the % value can slew to the new hardware-determined value, and
the actual rate of change is determined by the hardware. If you wish to keep synchronous
to a hardware input frequency, as in a position-lock cam, Ix94 should be set high enough
that the limit is never activated. However, following motion can be smoothed significantly
with a lower limit if total synchronicity is not required.
Default 1644
Remarks Ix95 controls the rate at which the axes of the coordinate system stop if a feed hold
command (H) is given, and the rate at which they start up again on a succeeding run
command (R or S). A feed hold command is equivalent to a %0 command except that it
uses Ix95 for its slew rate instead of Ix94. Having separate slew parameters for normal
time-base control and for feed hold commands allows both responsive ongoing time-base
control (Ix94 relatively high) and well-controlled holds (Ix95 relatively low).
Note:
The default Ix95 value of 1644, when used on a card set up with the
default servo cycle time of 442 µsec, provides a transition time
between %100 and %0 (feed hold) of one second.
See Also Stop Commands (Making Your Application Safe)
Time-Base Control (Synchronizing PMAC to External Events)
I-variables I10, Ix93, Ix94
On-line commands H, <CONTROL-O>, R, <CONTROL-R>, S, <CONTROL-S>, %.
Ix96 Coordinate System x Circle Error Limit
Range positive floating point
Units User length units
Default 0 (function disabled)
Remarks In a circular arc move, a move distance that is more than twice the specified radius will
cause a computation error because a proper path cannot be found. Sometimes, due to
round-off errors, a distance slightly larger than twice the radius is given (for a half-circle
move), and it is desired that this not create an error condition.
Ix96 allows the user to set an error limit on the amount the arc move distance is greater
than twice the specified radius. If the move distance is greater than 2R, but by less than
this limit, the move is done in a spiral fashion to the endpoint, and no error condition is
generated. If the distance error is greater than this limit, a run-time error will be generated,
and the program will stop. If this variable is set to 0 the error generation is disabled and
any move distance greater than 2R is done in a spiral fashion to the endpoint.
If the circular move is specified with an IJK center-vector instead of an R radius, Ix96 is
not used.
Example Given the program segment
INC CIRCLE1 F2
X7.072 Y7.072 R5
2 2
technically no circular arc path can be found, because the distance is SQRT(7.072 +7.072 )
= 10.003, which is greater than twice the radius of 5. However as long as Ix96 is greater
than 0.003, PMAC will create a near-circular path to the end point.
See Also Circular Blended Moves (Writing a Motion Program)
Program commands CIRCLE1, CIRCLE2, {axis}{data}{vector}{data}
I901, I906, ..., I976 Encoder n Filter Disable “Encoder I-Variable 1” {PMAC(1) Only}
Range 0 .. 1
Units none
Default 0
Remarks This parameter controls whether the encoder channel enables or disables its digital delay
filter. The options are:
0 = Encoder n digital delay filter enabled
1 = Encoder n digital delay filter disabled (bypassed)
The filter is a 3-stage digital delay filter with best-2-of-3 voting to help suppress noise
spikes on the input lines. It does introduce a small delay into the signal, which can be
unacceptable if the motor is using interpolated sub-count parallel data input, because of
loss of synchronization between the quadrature and parallel data signals.
Note:
Generally, the only people to disable this filter are those using the
special interpolated parallel data format. These people should
disable the filters both on the encoder for their quadrature signals
and the encoder matching their parallel data input.
The sampling frequency for the filter is that of the SCLK signal, which is set by the master
clock frequency and jumpers E34-E38. The higher the frequency of SCLK, the higher the
possible count rate, but the narrower the pulse that can be filtered out. SCLK should be set
to allow the maximum expected encoder frequency, but no faster, in order to provide the
maximum noise protection.
See Also Digital Delay Filter (Connecting PMAC to the Machine)
Parallel Sub-Count Interpolation (Setting Up a Motor)
Jumpers E34-E38
I902, I907, ..., I977 Encoder n Position Capture Control “Encoder I-Variable 2”
{PMAC(1) Only}
Range 0 .. 15
Units none
Default 1
Remarks This parameter determines which signal or combination of signals (and which polarity)
triggers a position capture of the counter for encoder n. If a flag input (home, limit, or
fault) is used, I903 (etc.) determines which flag. Proper setup of this variable is essential
for a successful home search, which depends on the position-capture function.
I903, I908, ..., I978 Encoder n Flag Select Control Encoder I-Variable 3 {PMAC(1) only}
Range 0 .. 3
Units None
Default 0
Remarks This parameter determines which of the Flag inputs will be used for position capture (if
one is used – see I902 etc.):
Setting Meaning
0 HMFLn (Home Flag n)
1 -LIMn (Positive Limit Signal n)
2 +LIMn (Negative Limit Signal n)
3 FAULTn (Amplifier Fault Signal n)
This parameter is typically set to zero, because in actual use, the +/-LIMn and FAULTn
flags create other effects that usually interfere with what is trying to be accomplished by
the position capture. If you wish to capture on the +/-LIMn or FAULTn flags, you must
either disable their normal functions with Ix25, or use a channel n where none of the flags
is used for the normal axis functions.
Note:
The direction sense of the limit inputs is the opposite of what many
people consider intuitive. That is, the +LIMn input, when taken
high (opened), stops commanded motion in the negative direction;
the -LIMn input, when taken high, stops commanded motion in the
positive direction. It is important to confirm the direction sense of
your limit inputs in actual operation.
See Also I-variables Ix25, I902
Position Capture (Synchronizing PMAC to External Events)
Homing Moves (Basic Motor Moves)
I904, I909, .., I979 – (Reserved for Future Use) {PMAC(1) only}
Example To set a PWM frequency of 7.5 kHz and therefore a MaxPhase clock frequency of 15 kHz:
I900 = (117,964.8 kHz / [4*7.5 kHz]) - 1 = 3931
See Also I901, I902, I905, I906, I992
I901 Phase Clock Frequency Control {PMAC2 only}
Range 0 .. 15
Units PHASE Clock Frequency = MaxPhase Frequency / (I901+1)
Default 0
PHASE Clock Frequency = 9.0346 kHz / 1 = 9.0346 kHz
(with default value of I900)
Remarks I901, in conjunction with I900, determines the frequency of the PHASE clock on PMAC2
(except for PMAC2 Ultralites, which use I992 and I997 for this). Each cycle of the
PHASE clock, motor phase commutation and digital current-loop algorithms are
performed for specified motors.
Specifically, I901 controls how many times the PHASE clock frequency is divided down
from the “maximum phase” clock, whose frequency is set by I900. The PHASE clock
frequency is equal to the “maximum phase” clock frequency divided by (I901+1). I901
has a range of 0 to 15, so the frequency division can be by a factor of 1 to 16. The
equation for I901 is:
MaxPhaseFreq( kHz )
I 901 = −1
PhaseFreq( kHz )
I904 PWM 1-4 Deadtime / PFM 1-4 Pulse Width Control {PMAC2 only}
Range 0 .. 255
Units PWM Deadtime = [16 / PWM_CLK (MHz)] * I904 = 0.135 usec * I904
PFM Pulse Width = [1 / PFM_CLK (MHz)] * I904
= PFM_CLK_period (usec) * I904
Default 15
PWM Deadtime = 0.135 usec * 15 = 2.03 usec
PFM Pulse Width = [1 / 9.8304 MHz] * 15 = 1.526 usec (with default I903)
Remarks I904 controls the deadtime period between top and bottom on-times in PMAC2’s
automatic PWM generation for machine interface channels 1-4. In conjunction with I903,
it also controls the pulse width for PMAC2’s automatic pulse-frequency modulation
generation for machine interface channels 1-4.
The PWM deadtime, which is the delay between the top signal turning off and the bottom
signal turning on, and vice versa, is specified in units of 16 PWM_CLK cycles. This
means that the deadtime can be specified in increments of 0.135 usec. The equation for
I904 as a function of PWM deadtime is:
DeadTime( µ sec)
I 904 =
0.135 µ sec
The PFM pulse width is specified in PFM_CLK cycles, as defined by I903. The equation
for I904 as a function of PFM pulse width and PFM_CLK frequency is:
I 904 = PFM _ CLK _ Freq( MHz )* PFM _ Pulse _ Width( µ sec)
In PFM pulse generation, the minimum off time between pulses is equal to the pulse width.
This means that the maximum PFM output frequency is
PFM _ CLK _ Freq( MHz )
PFM _ Max _ Freq( MHz ) =
2 * I 904
Example A PWM deadtime of approximately 1 microsecond is desired:
I904 ≅ 1 usec / 0.135 usec ≅ 7
With a 2.4576 MHz PFM_CLK frequency, a pulse width of 0.4 usec is desired:
I904 ≅ 2.4576 MHz * 0.4 usec ≅ 1
See Also I908, I994
I905 DAC 1-4 Strobe Word {PMAC2 only}
Range $000000 .. $FFFFFF
Units Serial Data Stream (MSB first, starting on rising edge of phase clock)
Default $7FFFC0
Remarks I905 controls the DAC strobe signal for machine interface channels 1-4. The 24-bit word
set by I905 is shifted out serially on lines DAC_STROB1-4, MSB first, one bit per
DAC_CLK cycle starting on the rising edge of the phase clock. The value in the LSB is
held until the next phase clock cycle.
The default I905 value of $7FFFC0 is suitable for the 18-bit DACs on the ACC-8E Analog
Interface Board. I905 should not be changed from the default unless different DACs are
used.
For a 16-bit DAC, I905 should be set to $7FFF00. For a 12-bit DAC, I905 should be set to
$7FF000.
See Also I909
Remarks I907 controls the frequency of four hardware clock frequencies for the second group of
four machine interface channels on PMAC2 (channels 5-8). It is a 12-bit variable
consisting of four independent 3-bit controls, one for each of the clocks. Each of these
clock frequencies can be divided down from a starting 39.3216 MHz frequency by powers
of 2, from 1 to 128 times.
This means that the possible frequency settings for each of these clocks are:
Frequency Divide by Divider N in
1/2^N
39.3216 MHz 1 0
19.6608 MHz 2 1
9.8304 MHz 4 2
4.9152 MHz 8 3
2.4576 MHz 16 4
1.2288 MHz 32 5
614.4 kHz 64 6
307.2 kHz 128 7
Very few PMAC2 users will be required to change the setting of I907 from the default
value.
The encoder sample clock signal SCLK controls how often PMAC2’s digital hardware
looks at the encoder and flag inputs. PMAC2 can take at most one count per SCLK cycle,
so the SCLK frequency is the absolute maximum encoder count frequency. SCLK also
controls the signal propagation through the digital delay filters for the encoders and flags;
the lower the SCLK frequency, the greater the noise pulse that can be filtered out. The
SCLK frequency should optimally be set to the lowest value that can accept encoder
counts at the maximum possible rate.
The pulse-frequency-modulation clock PFM_CLK controls the PFM circuitry that is
commonly used for stepper drives. The maximum pulse frequency possible is 1/4 of the
PFM_CLK frequency. The PFM_CLK frequency should optimally be set to the lowest
value that can generate pulses at the maximum frequency required.
The DAC_CLK controls the serial data frequency into D/A converters. If these converters
are on Delta Tau-provided accessories, the DAC_CLK setting should be left at the default
value.
The ADC_CLK controls the serial data frequency from A/D converters. If these
converters are on Delta Tau-provided accessories, the ADC_CLK setting should be left at
the default value.
Example See I903 Example
See Also I903, I993
I908 PWM 5-8 Deadtime / PFM 5-8 Pulse Width Control {PMAC2 only}
Range 0 .. 255
Units PWM Deadtime = 0.135 usec * I908
PFM Pulse Width = [1 / PFM_CLK (MHz)] * I908
= PFM_CLK_period (usec) * I908
Default 15
PWM Deadtime = 0.135 usec * 15 = 2.03 usec
PFM Pulse Width = [1 / 9.8304 MHz] * 15 = 1.526 usec (with default I907)
Remarks I908 controls the deadtime period between top and bottom on-times in PMAC2’s
automatic PWM generation for machine interface channels 5-8. In conjunction with I907,
it also controls the pulse width for PMAC2’s automatic pulse-frequency modulation
generation for machine interface channels 5-8.
The PWM deadtime, which is the delay between the top signal turning off and the bottom
signal turning on, and vice versa, is specified in units of 16 PWM_CLK cycles. This
means that the deadtime can be specified in increments of 0.135 usec. The equation for
I908 as a function of PWM deadtime is:
DeadTime( µ sec)
I 904 =
0.135 µ sec
The PFM pulse width is specified in PFM_CLK cycles, as defined by I907. The equation
for I908 as a function of PFM pulse width and PFM_CLK frequency is:
I 908 = PFM _ CLK _ Freq( MHz )* PFM _ Pulse _ Width( µ sec)
In PFM pulse generation, the minimum off time between pulses is equal to the pulse width.
This means that the maximum PFM output frequency is
PFM _ CLK _ Freq( MHz )
PFM _ Max _ Freq( MHz ) =
2 * I 904
Example See I904 Example.
See Also I904, I994
I909 DAC 5-8 Strobe Word {PMAC2 only}
Range $000000 .. $FFFFFF
Units Serial Data Stream (MSB first, starting on rising edge of phase clock)
Default $7FFFC0
Remarks I909 controls the DAC strobe signal for machine interface channels 5-8. The 24-bit word
set by I909 is shifted out serially on lines DAC_STROB1-4, MSB first, one bit per
DAC_CLK cycle starting on the rising edge of the phase clock. The value in the LSB is
held until the next phase clock cycle.
The default I909 value of $7FFFC0 is suitable for the 18-bit DACs on the ACC-8E Analog
Interface Board. I909 should not be changed from the default unless different DACs are
used.
For a 16-bit DAC, I909 should be set to $7FFF00. For a 12-bit DAC, I909 should be set to
$7FF000.
See Also I905
The clockwise (CW) and counterclockwise (CCW) options simply control which direction
counts up. If you get the wrong direction sense, simply change to the other option (e.g.
from 7 to 3 or vice versa).
Note:
Changing the direction sense of the decode for the feedback encoder
of a motor that is operating properly will result in unstable positive
feedback and a dangerous runaway condition in the absence of other
changes. The output polarity must be changed as well to re-
establish polarity match for stable negative feedback.
In the pulse-and-direction decode modes, PMAC2 is expecting the pulse train on CHAn,
and the direction (sign) signal on CHBn. If the signal is unidirectional, the CHBn line can
be allowed to pull up to a high state, or it can be hardwired to a high or low state.
If I9n0 is set to 8, the decoder inputs the pulse and direction signal generated by Channel
n’s pulse frequency modulator (PFM) output circuitry. This permits the PMAC2 to create
a phantom closed loop when driving an open-loop stepper system. No jumpers or cables
are needed to do this; the connection is entirely within the ASIC. The counter polarity
automatically matches the PFM output polarity.
If I9n0 is set to 11 or 15, the decoder looks at the 3-phase inputs on CHAn, CHBn, and
CHCn, and decodes 6 states per cycle. This permits the use of hall-style commutation
sensors for feedback. Each signal should be about 50% duty cycle, and 1/3-cycle offset
from the other signals. The direction sense of the decode changes between I9n0 = 11 and
I9n0 = 15. This mode is only supported on “B” and newer revisions of the DSPGATE1
IC.
If I9n0 is set to 12, the timer circuitry is set up to read magnetostrictive linear displacement
transducers (MLDTs) such as TemposonicsTM. In this mode, the timer is cleared when the
PFM circuitry sends out the excitation pulse to the sensor on PULSEn, and it is latched
into the memory-mapped register when the excitation pulse is received on CHAn.
I9n1 Position Compare n Channel Select {PMAC2 only}
Range 0 .. 1
Units None
Default 0
Remarks I9n1 controls which encoder counter that Channel n’s position compare circuitry operates
with. When I9n1 is set to 0, the channel’s position compare register is tied to the channel’s
own encoder counter, and the position compare signal appears only on the EQUn output.
When I9n1 is set to 1, the channel’s position compare register is tied to the first encoder
counter on the ASIC – Encoder 1 for channels 1-4, or Encoder 5 for channels 5-8 – and the
position compare signal appears both on EQUn, and combined into the EQU output for the
first channel on the IC (EQU1 or EQU5); executed as a logical OR.
I911 and I951 perform no effective function, so are always 1. They cannot be set to 0.
Setting Meaning
0 Software Control (immediate capture)
1 Rising edge of CHCn (third channel)
2 Rising edge of Flag n (as set by Flag Select)
3 Rising edge of [CHCn AND Flag n] – Low true index, high true Flag
4 Software Control (immediate capture)
5 Falling edge of CHCn (third channel)
6 Rising edge of Flag n (as set by Flag Select)
7 Rising edge of [CHCn/ AND Flag n] – Low true index, high true Flag
8 Software Control (immediate capture)
9 Rising edge of CHCn (third channel)
10 Falling edge of Flag n (as set by Flag Select)
11 Rising edge of [CHCn AND Flag n/] – High true index, low true Flag
12 Software Control (immediate capture)
13 Falling edge of CHCn (third channel)
14 Falling edge of Flag n (as set by Flag Select)
15 Rising edge of [CHCn/ AND Flag n/] – Low true index, low true Flag
Note that only flags and index inputs of the same channel number as the encoder may be
used for hardware capture of that encoder’s position. This means that to use the hardware
capture feature for the homing search move, Ix25 must use flags of the same channel
number as the encoder that Ix03 uses for position-loop feedback.
To do a software-controlled position capture, preset this parameter to 0 or 8; when the
parameter is then changed to 4 or 12, the capture is triggered (this is not of much practical
use).
The trigger is armed when the position capture register is read. After this, as soon as
PMAC2 sees that the specified input lines are in the specified states, the trigger will occur
– it is level-triggered, not edge-triggered.
Note: Prior to firmware revision V1.17C, I9n5 was a single-bit I-variable controlling the
gating state only. The control bit for the de-multiplexing function had to be accessed
directly with an M-variable (it was stored to flash on a SAVE command and restored on
power-up/reset).
I9n6 Output n Mode Select {PMAC2 only}
Range 0 .. 3
Units none
Default 0
Remarks 0 = Outputs A & B are PWM; Output C is PWM
1 = Outputs A & B are DAC; Output C is PWM
2 = Outputs A & B are PWM; Output C is PFM
3 = Outputs A & B are DAC; Output C is PFM
I9n6 controls what output formats are used on the command output signal lines for
Note:
On PMAC2 boards that are not “Ultralite”, I992 does not control
the MaxPhase frequency; I900 does. On all PMAC2 boards, the
PWM 1*-2* frequency is only important if you are using
supplemental PWM channels.
Remarks I992 controls the maximum phase clock frequency for the PMAC2 Ultralite, and the PWM
frequency for supplementary machine interface channels 1* and 2*. It does this by setting
the limits of the PWM up-down counter, which increments and decrements at the
PWMCLK frequency of 117,964.8 kHz (117.9648 MHz).
The actual phase clock frequency is divided down from the maximum phase clock
according to the setting of I997. On the falling edge of the phase clock, PMAC2 Ultralite
starts transmission of a set of MACRO ring data and interrupts the processor to start any
necessary phase commutation and digital current-loop algorithms. Even if phasing and
current-loop algorithms are not used, the MaxPhase and Phase clock frequencies are
important because the servo clock is derived from the phase clock.
To set I992 for a desired “maximum phase” clock frequency, the following formula can be
used:
I992 = (117,964.8 kHz / [2*MaxPhase (kHz)]) - 1 (rounded down)
On PMAC2 boards that are not “Ultralite”, I992 is generally set to the same value as I900,
which controls the maximum phase frequency, and the PWM frequency of channels 1 to 4.
If a different PWM frequency is desired for channels 1* and 2*, I992 should be set so that
2 * PWM [ 1* −2*] Freq( kHz )
= { Integer }
PhaseFreq
Example To set a PWM frequency of 10 kHz and therefore a MaxPhase clock frequency of 20 kHz:
I992 = (117,964.8 kHz / [4*10 kHz]) - 1 = 2948
To set a PWM frequency of 7.5 kHz and therefore a MaxPhase clock frequency of 15 kHz:
I992 = (117,964.8 kHz / [4*7.5 kHz]) - 1 = 3931
I993 Hardware Clock Control Channels 1*-2* {PMAC2 only}
Range 0 .. 4095
Units I993 = Encoder SCLK Divider
..........................+ 8 * PFM_CLK Divider
..........................+ 64 * DAC_CLK Divider
..........................+ 512 * ADC_CLK Divider
..........................where:
Encoder SCLK Frequency = 39.3216 MHz / (2 ^ Encoder SCLK Divider)
PFM_CLK Frequency = 39.3216 MHz / (2 ^ PFM_CLK Divider)
DAC_CLK Frequency = 39.3216 MHz / (2 ^ DAC_CLK Divider)
ADC_CLK Frequency = 39.3216 MHz / (2 ^ ADC_CLK Divider)
Default 2258 = 2 + (8 * 2) + (64 * 3) + (512 * 4)
Encoder SCLK Frequency = 39.3216 MHz / (2 ^ 2) = 9.8304 MHz
PFM_CLK Frequency = 39.3216 MHz / (2 ^ 2) = 9.8304 MHz
DAC_CLK Frequency = 39.3216 MHz / (2 ^ 3) = 4.9152 MHz
Remarks I993 controls the frequency of three hardware clock frequencies – SCLK, PFM_CLK, and
ADC_CLK – for the supplemental machine interface channels 1* and 2* on PMAC2 or
PMAC2 Ultralite (there is no DAC_CLK on the supplemental channels, but it is referred to
here for consistency with I903 and I907). It is a 12-bit variable consisting of four
independent 3-bit controls (the 3 bits for DAC_CLK are “don’t care”), one for each of the
clocks. Each of these clock frequencies can be divided down from a starting 39.3216 MHz
frequency by powers of 2, 2N, from 1 to 128 times (N=0 to 7). This means that the
possible frequency settings for each of these clocks are:
Frequency Divide by Divider N
in 1/2N
39.3216 MHz 1 0
19.6608 MHz 2 1
9.8304 MHz 4 2
4.9152 MHz 8 3
2.4576 MHz 16 4
1.2288 MHz 32 5
614.4 kHz 64 6
307.2 kHz 128 7
Very few PMAC2 users will be required to change the setting of I993 from the default
value.
The encoder sample clock signal SCLK controls how often PMAC2’s digital hardware
looks at the handwheel encoder inputs. PMAC2 can take at most one count per SCLK
cycle, so the SCLK frequency is the absolute maximum encoder count frequency. SCLK
also controls the signal propagation through the digital delay filters for the encoders and
flags; the lower the SCLK frequency, the greater the noise pulse that can be filtered out.
The SCLK frequency should optimally be set to the lowest value that can accept encoder
counts at the maximum possible rate.
The pulse-frequency-modulation clock PFM_CLK controls the PFM circuitry that can
create pulse and direction outputs on the JHW connector. The maximum pulse frequency
possible is 1/4 of the PFM_CLK frequency. The PFM_CLK frequency should optimally
be set to the lowest value that can generate pulses at the maximum frequency required.
The ADC_CLK controls the serial data frequency from A/D converters. These can only be
accessed as the alternate use of general-purpose I/O pins.
To determine the clock frequencies set by a given value of I993, use the following
procedure:
1. Divide I993 by 512 and round down to the nearest integer. This value N1 is the
ADC_CLK divider.
2. Multiply N1 by 512 and subtract the product from I993 to get I993’. Divide I993’ by
64 and round down to the nearest integer. This value N2 is the DAC_CLK divider
(not relevant here).
3. Multiply N2 by 64 and subtract the product from I993’ to get I993’’. Divide I993’’ by
8 and round down to the nearest integer. This value N3 is the PFM_CLK divider.
4. Multiply N3 by 8 and subtract the product from I993’’. The resulting value N4 is the
SCLK divider.
Example The maximum encoder count frequency in the application is 800 kHz, so the 1.2288 MHz
SCLK frequency is chosen. A pulse train up to 500 kHz needs to be generated, so the
2.4576 MHz PFM_CLK frequency is chosen. ADCs and DACs are not used, so the
default DAC_CLK frequency of 4.9152 MHz and the default ADC_CLK frequency of
2.4576 MHz are chosen. From the table:
..........................SCLK Divider N: 5
..........................PFM_CLK Divider N: 4
..........................DAC_CLK Divider N: 3
..........................ADC_CLK Divider N: 4
..........................I993 = 5 + (8 * 4) + (64 * 3) + (512 * 4) = 5 + 32 + 192 + 2048 = 2277
I993 has been set to 3429. What clock frequencies does this set?
..........................N1 = INT (3429/512) = 6 ADC_CLK = 611.44 kHz
..........................I993’ = 3429 - (512*6) = 357
..........................N2 = INT (357/64) = 5 DAC_CLK = 1.2288 MHz
..........................I993’’ = 357 - (64*5) = 37
..........................N3 = INT (37/8) = 4 PFM_CLK = 2.4576 MHz
N4 = 37 - (8*4) = 5 SCLK = 1.2288 MHz
I994 PWM 1*-2* Deadtime / PFM 1* Pulse Width Control {PMAC2 only}
Range 0 .. 255
Units PWM Deadtime = [16 / PWM_CLK (MHz)] * I994 = 0.135 usec * I994
PFM Pulse Width = [1 / PFM_CLK (MHz)] * I994
= PFM_CLK_period (usec) * I994
Default 15
PWM Deadtime = 0.135 usec * 15 = 2.03 usec
PFM Pulse Width = [1 / 9.8304 MHz] * 15 = 1.526 usec (with default I993)
Remarks I994 controls the deadtime period between top and bottom on-times in PMAC2’s
automatic PWM generation for supplemental machine interface channels 1* and 2*. In
conjunction with I993, it also controls the pulse width for PMAC2’s automatic pulse-
frequency modulation generation for supplemental machine interface channel 1*.
The PWM deadtime, which is the delay between the top signal turning off and the bottom
signal turning on, and vice versa, is specified in units of 16 PWM_CLK cycles. This
means that the deadtime can be specified in increments of 0.135 usec. The equation for
I994 as a function of PWM deadtime is:
DeadTime( µ sec)
I 994 =
0.135 µ sec
The PFM pulse width is specified in PFM_CLK cycles, as defined by I993. The equation
for I994 as a function of PFM pulse width and PFM_CLK frequency is:
I 994 = PFM _ CLK _ Freq( MHz )* PFM _ Pulse _ Width( µ sec)
In PFM pulse generation, the minimum off time between pulses is equal to the pulse width.
This means that the maximum PFM output frequency is:
PFM _ CLK _ Freq( MHz )
PFM _ Max _ Freq( MHz ) =
2 * I 994
Example A PWM deadtime of approximately 1 microsecond is desired:
Bits 16-19 together specify the slave number part of the packet address (0-15) that will
cause a sync lock pulse on the card, if this function is enabled by I995. This function is
useful for a PMAC2 that is a slave or non-synchronizing master on the ring, to keep it
locked to the synchronizing master. If the master address check for this node is disabled
with I995, only the slave number must match to create the sync lock pulse. If the master
address check is left enabled, the master number part of the packet address must match the
master number for the card, as set in bits 20-23 of I996.
If this card is the synchronizing master, this function is not enabled, so the value of these
bits does not matter; they can be left at the default of 0.
Bits 20-23 specify the master number for the card (0-15). The number must be specified
whether the card is a master station or a slave station.
Hex ( $) 0 0 0 0 0 0
Bit
Note:
On prototype PMAC2 boards that did not support multi-master
MACRO rings, I996 contained only bits 0-15.
Example Master number 0; Sync node address 0
Activated nodes 0-5; De-activated nodes 6-15:
I996 =0000 0000 0000 0000 0011 1111 (binary) = $00003F
Master number 1; Sync node address 15 ($F)
Activated nodes 0, 2, 4, 6, 8, 10, 12; other nodes de-activated:
I996 = 0001 1111 0001 0101 0101 0101 (binary) = $1F1555
I997 Phase Clock Frequency Control {PMAC2 only}
Range 0 .. 15
Units PHASE Clock Frequency = MaxPhase Frequency / (I997+1)
Default 0
PHASE Clock Frequency = 9.0346 kHz / 1 = 9.0346 kHz
(with default value of I992)
Remarks I997, in conjunction with I992, determines the frequency of the PHASE clock on PMAC2
Ultralite. Each cycle of the PHASE clock, a set of MACRO ring information is
transmitted, and any required motor phase commutation and digital current-loop
algorithms are performed for specified motors.
Note:
On PMAC2 boards that are not “Ultralite”, I997 does not control
the Phase Clock frequency; I901 does. I997 has no effect on non-
Ultralite versions of the PMAC2.
Specifically, I997 controls how many times the PHASE clock frequency is divided down
from the maximum phase clock, whose frequency is set by I992. The PHASE clock
frequency is equal to the maximum phase clock frequency divided by (I997+1). I997 has a
range of 0 to 15, so the frequency division can be by a factor of 1 to 16. The equation for
I997 is:
MaxPhaseFreq( kHz )
I 997 = −1
PhaseFreq( kHz )
Specifically, I998 controls how many times the SERVO clock frequency is divided down
from the PHASE clock, whose frequency is set by I992 and I997. The SERVO clock
frequency is equal to the PHASE clock frequency divided by (I998+1). I998 has a range
of 0 to 15, so the frequency division can be by a factor of 1 to 16. The equation for I998
is:
PhaseFreq( kHz )
I 998 = −1
ServoFreq( kHz )
The ratio of PHASE Clock Freq. to SERVO Clock Freq. must be an integer.
Note:
If jumper E1 is ON, PMAC2 Ultralite gets its SERVO clock signal
externally from a serial-port input, and I998 is not used.
For execution of trajectories at the proper speed, I10 must be set properly to tell the
trajectory generation software what the SERVO clock cycle time is. The formula for I10
is:
8 ,388 ,608
I 10 =
ServoFreq( kHz )
In terms of the variables that determine the SERVO clock frequency on a PMAC2 Ultralite
board, the formula for I10 is:
640
I 10 = (2 * I 992 + 3)(I 997 + 1)(I 998 + 1)
9
Example With a 6.67 kHz PHASE Clock frequency established by I900 and I997, and a desired 3.33
kHz SERVO Clock frequency:
I998 = (6.67 / 3.33) - 1 = 2 - 1 = 1
I999 (Reserved for Future Use)
MACRO Software Setup I-Variables
I1000 MACRO Node Auxiliary Register Enable
Range 0 .. $FFFF (0 .. 65,535)
Units none
Default 0
Remarks This parameter controls which MACRO nodes PMAC performs automatic copying into
and out of the auxiliary registers. Enabling this function for a node is required to use the
auxiliary register as the flag register for a motor.
I1000 is a 16-bit variable. Bits 0 to 15 control the enabling of this copying function for
MACRO nodes 0 to 15, respectively. A bit value of 1 means the copying function is
enabled; a bit value of 0 means the copying function is disabled.
If the copying function is enabled for Node n (where n = 0 to F hex or 0 to 15 decimal),
during each background “housekeeping” software cycle, PMAC copies the contents of
Y:$0F7n to the Node n auxiliary write register, and copies the contents of the Node n
auxiliary read register into X:$0F7n.
The copying function enabled by I1000 permits PLC and on-line-command auxiliary read
and write functions plus use of the auxiliary registers for command and status flags.
See Also MACRO Setup
I-Variables Ix25, I995, I996
On-line commands
The key difference between Type 0 and Type 1 protocols is in which node register is used
for control and status flags. In the Type 0 protocol, the 1st register (24 bits) is used for the
flags; in the Type 1 protocol, the 4th registers (16 bits) is used for the flags. The bits of
I1002 must be set properly for any node whose auxiliary flag function is enabled by I1000.
The Type 0 protocol is generally used for older single-node MACRO devices, such as the
Performance Controls FLX Drive. The Type 1 protocol is generally used for multi-node
MACRO devices, such as Delta Tau’s MACRO Station (MACRO Stack or UMAC
MACRO). With the Delta Tau MACRO Station, I1002 is generally set to the same value
as I1000.
See Also I-variables Ix25, I1000
I1003 MACRO Type 1 Master/Slave Communications Timeout
Range 0 .. 255
Units servo cycles
Default 0
Remarks I1003 permits the enabling of MACRO Type 1 master-slave auxiliary communications
using Node 15, which are executed with the MS, MSR, and MSW commands. If I1003 is set
to 0, these communications are disabled. If I1003 is set to a value greater than 0, these
communications are enabled, and the value of I1003 sets the “timeout” value for the
auxiliary response, in PMAC servo cycles.
If PMAC has not received a response to the MACRO auxiliary communications command
within I1003 servo cycles, it will stop waiting and register a “MACRO Auxiliary
Communications Error”, setting Bit 5 of global status register X:$000006. A value of 32
for I1003 is suggested.
Bit 15 of I1000 must be set to 0 to disable Node 15’s Type 0 (node-specific) auxiliary
communications if II1003 is greater than 0. If a value of I1003 greater than 0 has been
saved into PMAC’s non-volatile memory, then at subsequent power-up/resets, bit 15 of
I1000 is automatically forced to 0 by PMAC firmware, regardless of the value saved for
I1000.
See Also I-Variable I1000
On-line commands MACROSLV, MACROSLVREAD, MACROSLVWRITE
Program commands MACROSLVREAD, MACROSLVWRITE
I1004 MACRO Ring Error Shutdown Count
Range 0 .. 255
Units MACRO ring errors
Default 2
Remarks I1004 determines the number of MACRO communications errors detected in one ring
check period that will cause the PMAC to conclude that the ring operation is defective.
This check is only performed if the I1001 MACRO ring check period parameter is set
greater than 0 at power-up/reset. In this case, if PMAC detects I1004 or greater MACRO
communications errors in I1001 servo cycles, it will kill all of its motors.
PMAC can detect one ring communications error per real-time interrupt (I8+1 servo
cycles) even if more than one error has occurred. Valid settings of I1004 are less than
I1001/(I8+1). Regardless of the setting of I1004, if a ring error is detected on every check
during the period, a “ring fault” is declared.
PMAC can detect four types of MACRO communications errors: byte “violation” errors,
packet checksum errors, packet overrun errors, and packet underrun errors.
If I1004 is set to 0 at power-on/reset, the PMAC will automatically set it to 2.
Before I1004 was implemented, a fixed value of 2 ring errors was used.
See Also I-Variables I8, I995, I1001, I1004
I1005 MACRO Ring Sync Packet Shutdown Count
Range 0 .. 65,535
Units MACRO sync packets
Default 4
Remarks I1005 determines the minimum number of MACRO “sync node” communications packets
(“sync packets”) that must be detected in one ring check period for PMAC to conclude the
the ring is operating properly and permit normal machine operation to continue. This
check is only performed if the I1001 MACRO ring check period parameter is set greater
than 0. In this case, if PMAC detects fewer than I1005 MACRO sync packets in I1001
servo cycles, it will cause the PMAC to “kill” all of its motors.
PMAC can detect one MACRO sync packet per real-time interrupt (I8+1 servo cycles)
even if more than one sync packet has been received in that period. Valid settings of I1005
are less than or equal to I1001/(I8+1). Setting I1005 to a value greater than I1001/(I8+1)
means that PMAC will never receive enough sync packets and will always disable its slave
stations on the ring.
The node number n, 0 to 15, of the sync packet is determined by bits 16 to 19 (the second
hex digit) of I996. This node n must be activated by setting bit n of I996 to 1; otherwise,
PMAC will immediately detect a ring communications error.
If I1005 is set to 0 at power-on/reset, the PMAC will automatically set it to 2.
Before I1005 was implemented, a fixed value of 2 sync packets was used.
See Also I-Variables I8, I995, I996 I1001, I1005
I1010 Resolver Excitation Phase Offset {Geo PMAC only}
Range 0 – 255
Units 1/256 cycle
Default 0
Remarks I1010 specifies the phase (time) offset for the AC excitation created by the Geo PMAC for
resolvers. The optimum setting of I1010 depends on the L/R time constant of the resolver
circuit. I1010 should be set interactively so as to maximize the magnitudes of the feedback
ADC values (Y:$FF00 and Y:$FF01 for Resolver 1; Y:$FF20 and Y:$FF21 for Resolver
2).
I1010 is only used if the Geo PMAC’s Feedback Option 1 for analog position feedback is
ordered.
I1011 is only used if the Geo PMAC’s Feedback Option 1 for analog position feedback is
ordered.
I1012 Resolver Excitation Frequency Divider {Geo PMAC only}
Range 0–3
Units none
Default 0
Remarks I1012 specifies the frequency of the AC excitation output created by the Geo PMAC for
resolvers as a function of the phase clock frequency set by I900 and I901. The following
table lists the possible values of I1012 and the excitation frequencies they produce:
I1012 Excitation Freq.
0 PhaseFreq
1 PhaseFreq/2
2 PhaseFreq/4
3 PhaseFreq/6
I1012 is only used if the Geo PMAC’s Feedback Option 1 for analog position feedback is
ordered.
I1013 Motor Temperature Check Enable {Geo PMAC only}
Range 0–3
Units none
Default 0
Remarks I1013 controls whether the motor temperature check function is enabled for the motor(s)
connected to the Geo PMAC. I1013 is a 2-bit value: bit 0 controls whether the
temperature check function is enabled for Motor 1, and bit 1 controls whether the
temperature check function is enabled for Motor 2. The following table shows the four
possible values of I1013 and the functions they produce:
If the Geo PMAC is checking temperature for the motor, the motor thermal sensor must be
connected to pin 23 of the main encoder connector for the motor.
I1015 SSI Clock Frequency Control {New, Geo PMAC only}
Range 0–3
Units none
Default 0
Remarks I1015 specifies the frequency of the digital clock output for the SSI-encoder interfaces on
the Geop PMAC. The following table lists the possible values of I1015 and the clock
frequencies they produce:
I1015 SSI Clock Freq.
0 153.6 kHz
1 307.2 kHz
2 614.4 kHz
3 1.2288 MHz
I1015 is only used if the Geo PMAC’s Feedback Option 2 for absolute position feedback is
ordered.
I1016 SSI Channel 1 Mode Control {Geo PMAC only}
Range 0–3
Units None
Default 3
Remarks I1016 specifies the mode for interpreting data from the first SSI-encoder interface on a
Geo PMAC. The following table lists the possible values of I1016 and the data formats
they cause the Geo PMAC to expect:
I1016 SSI Clock Freq.
0 (Reserved)
1 (Reserved)
2 Numeric binary
3 Gray code
I1016 is only used if the Geo PMAC’s Feedback Option 2 for absolute position feedback is
ordered.
I1017 is only used if the Geo PMAC’s Feedback Option 2 for absolute position feedback is
ordered.
I1018 SSI Channel 2 Mode Control {Geo PMAC only}
Range 0–3
Units None
Default 3
Remarks I1018 specifies the mode for interpreting data from the second SSI-encoder interface on a
Geo PMAC. The following table lists the possible values of I1018 and the data formats
they cause the Geo PMAC to expect:
I1018 SSI Clock Freq.
0 (Reserved)
1 (Reserved)
2 Numeric binary
3 Gray code
I1018 is only used if the Geo PMAC’s Feedback Option 2 for absolute position feedback is
ordered.
I1019 is only used if the Geo PMAC’s Feedback Option 2 for absolute position feedback is
ordered.
I1020 Lookahead Length {Option 6L firmware only}
Range 0 – 65,535
Units I13 segmentation periods
Default 0
Remarks I1020 controls the enabling of the lookahead buffering function for the coordinate system
that has a defined lookahead buffer, and if enabled, determines how far ahead the buffer
will look ahead.
If I1020 is set to 0 (the default), the buffered lookahead function is not used, even if a
lookahead buffer has been defined.
If I1020 is set to 1, points are stored in the lookahead buffer as they are calculated, but no
lookahead velocity or acceleration-limiting calculations are done. The stored points can
then be used to back up along the path as necessary.
If I1020 is set to a value greater than 1, PMAC will look I1020 segments ahead on
LINEAR and CIRCLE mode moves, provided that the PMAC is in segmentation mode
(I13 > 0) and a lookahead buffer has been defined. The lookahead algorithm can extend
the time for each segment in the buffer as needed to keep velocities under the Ix16 limits
and the accelerations under the Ix17 limits.
For proper lookahead control, I1020 must be set to a value large enough so that PMAC
looks ahead far enough that it can create a controlled stop from the maximum speed within
the acceleration limit. This required stopping time for a motor can be expressed as:
V Ix16
StopTime = max =
Amax Ix17
All motors in the coordinate system should be evaluated to see which motor has the
longest stopping time. This motor’s stopping time will be used to compute I1020.
The average speed during this stopping time is Vmax/2, so as the moves enter the lookahead
algorithm at Vmax (the worst case), the required time to look ahead is StopTime/2.
Therefore, the required number of segments always corrected in the lookahead buffer can
be expressed as:
StopTime( m sec) / 2 Ix16
SegmentsAhead = =
SegTime( m sec/ seg ) 2 * Ix17 * I 13
Because PMAC does not completely correct the lookahead buffer as each segment is
added, the lookahead distance specified by I1020 must be slightly larger than this. The
formula for the minimum value of I1020 that guarantees sufficient lookahead for the
stopping distance is:
4
I 1020 = * SegmentsAhead
3
If a fractional value results, round up to the next integer. A value of I1020 less than this
amount will not result in velocity or acceleration limits being violated; however, the
algorithm will not permit maximum velocity to be reached, even if programmed.
I1020 should not be set greater than the number of segments reserved in the DEFINE
LOOKAHEAD command. If the lookahead algorithm runs out of buffer space, PMAC will
automatically reduce I1020 to reflect the amount of space that is available.
Example The axes in a system have a maximum speed of 24,000 mm/min, or 400 mm/sec (900
in/min or 15 in/sec). They have a maximum acceleration of 0.1g or 1000 mm/sec2 (40
in/sec2), and a count resolution of 1µm. A maximum block rate of 200 blocks/sec is
desired, so I13 is set to 5 msec. The parameters can be computed as:
• Ix16 = 400 mm/sec * 0.001 sec/msec * 1000 cts/mm = 400 cts/msec
• Ix17 = 1000 mm/sec2 * 0.0012 sec2/msec2 * 1000 cts/mm = 1.0 cts/msec2
• I1020 = [4/3] * [400 cts/msec / (2 * 1.0 cts/msec2 *5 msec/seg)] = 54 segments
<CONTROL-C>
Function Report all coordinate system status words
Scope Global
Syntax ASCII Value 3D, $03
Remarks This command causes PMAC to report the status words for all of the coordinate systems to
the host in hexadecimal ASCII form, 12 characters per coordinate system starting with
coordinate system 1, with the characters for each coordinate system separated by spaces. The
characters reported for each coordinate system are the same as if the ?? command had been
issued for that coordinate system.
The detailed meanings of the individual status bits are shown under the ?? command
description.
For multiple cards on a single serial daisy-chain, this command affects only the card
currently addressed in software (by the @n command).
Example <CTRL-C>
A80020020000 A80020020000 A80020020000 A80020020000 A80020000000
A80020000000 A80020000000 A80020000000<CR>
See Also On-line commands <CTRL-B>, <CTRL-G>, ??;
Memory-map registers Y:$0817, Y:$08D7, etc., X:$0818, X:$08D8, etc.;
Suggested M-variable definitions Mx80-Mx90.
<CONTROL-D>
Function Disable all PLC programs.
Scope Global
Syntax ASCII Value 4D; $04
Remarks This command causes all PLC programs to be disabled (i.e. stop executing). This is the
equivalent of DISABLE PLC 0..31 and DISABLE PLCC 0..31. It is especially
useful if a CMD or SEND statement in a PLC has run amok.
For multiple cards on a single serial daisy-chain, this command affects all cards on the chain,
regardless of the current software addressing.
Example TRIGGER FOUND
TRIGTRIGER FOTRIGGER FOUND
TRTRIGTRIGGER FOUND (Out-of-control SEND message from PLC)
<CTRL-D> ........ (Command to disable the PLCs)
(No more messages; can now edit PLC)
See Also On-line commands DISABLE PLC, ENABLE PLC, DISABLE PLCC, ENABLE PLCC,
OPEN PLC
Program commands DISABLE PLC, ENABLE PLC, DISABLE PLCC, ENABLE PLCC,
COMMAND, SEND
<CONTROL-F>
Function Report following errors for all motors.
Scope Global
Syntax ASCII Value 6D; $06
Remarks This command causes PMAC to report the following errors of all motors to the host. The
errors are reported in an ASCII string, each error scaled in counts, rounded to the nearest
tenth of a count. A space character is returned between the reported error for each motor.
Refer to the on-line F command for more detail as to how the following error is calculated.
For multiple cards on a single serial daisy-chain, this command affects only the card
currently addressed in software (by the @n command).
Example <CTRL-F>
0.5 7.2 -38.3 1.7 0 0 0 0<CR>
See Also I-variables Ix11, Ix12
On-line commands F, <CTRL-P>, <CTRL-V>
<CONTROL-G>
Function Report global status word.
Scope Global
Syntax ASCII Value 7D; $07
Remarks This command causes PMAC to report the global status words to the host in hexadecimal
ASCII form, using 12 characters. The characters sent are the same as if the ??? command
had been sent, although no command acknowledgement character (<ACK> or <LF>,
depending on I3) is sent at the end of the response.
The detailed meanings of the individual status bits are shown under the ??? command
description.
For multiple cards on a single serial daisy-chain, this command affects only the card
currently addressed in software (by the @n command).
Example <CTRL-G>
003000400000<CR>
See Also On-line commands <CTRL-B>, <CTRL-C>, ???
Memory-map registers X:$0003, Y:$0003.
<CONTROL-H>
Function Erase last character.
Scope Global
Syntax ASCII Value 8D; $08 (<BACKSPACE>).
Remarks This character, usually entered by typing the <BACKSPACE> key when talking to PMAC in
terminal mode, causes the most recently entered character in PMAC’s command-line-receive
buffer to be erased.
See Also Talking to PMAC
On-line command <CTRL-O> (Feed Hold All)
<CONTROL-I>
Function Repeat last command line.
Scope Global
Syntax ASCII Value 9D; $09 (<TAB>).
Remarks This character, sometimes entered by typing the <TAB> key, causes the most recently sent
alphanumeric command line to PMAC to be re-commanded. It provides a convenient way to
quicken a repetitive task, particularly when working interactively with PMAC in terminal
mode. Other control-character commands cannot be repeated with this command.
Note:
Internally generated commands from CMD "{command}"
statements in motion and PLC programs overwrite the last executed
command from the host, and so can alter the action of this character.
Note:
Most versions of the PMAC Executive Program “trap” a <CTRL-I>
or <TAB> for their own purposes, and do not send it on to PMAC,
even when in terminal mode
Example This example shows how the tab key can be used to look for some event:
PC<CR>
P1:10<CR>
<TAB>
P1:10<CR>
<TAB>
P1:10<CR>
<TAB>
P1:11<CR>
See Also On-line command <CONTROL-Y>.
<CONTROL-K>
Function Kill all motors.
Scope Global
Syntax ASCII Value 11D; $0B
Remarks This command kills all motor outputs by opening the servo loop, commanding zero output,
and taking the amplifier enable signal (AENAn) false (polarity is determined by jumper E17)
for all motors on the card. If any motion programs are running, they will automatically be
aborted. (For the motor-specific K (kill) command, if the motor is in a coordinate system that
is executing a motion program, the program execution must be stopped with either an A
(abort) or Q (quit) command before PMAC will accept the K command.)
For multiple cards on a single serial daisy-chain, this command affects all cards on the chain,
regardless of the current software addressing.
See Also On-line commands K, A, <CONTROL-A>.
<CONTROL-L>
Function Close open rotary buffer.
Scope Global
Syntax ASCII Value 12D; $0C
Remarks This character causes PMAC to close the open rotary program buffer on PMAC. It is exactly
equivalent in effect to the CLOSE command, but it is faster to send. The primary use of
<CTRL-L> is when the rotary buffer needs to be opened and closed repeatedly. After
closing the rotary buffer, there is no chance that an on-line command can be mistaken for a
buffer command.
Example <CTRL-U> ; Open rotary buffer
X10 Y20 F5 M3 ; Put program line in buffer
X30 Y40 F5 .... ; Put program line in buffer
<CTRL-L> ; Close rotary buffer
M1 ; On-line command for value of M1
1 ; PMAC responds
See Also Rotary Motion Program Buffers (Writing a Motion Program)
On-line commands <CTRL-U>, OPEN ROT, CLOSE
<CONTROL-M>
Function Enter command line.
Scope Global
Syntax ASCII Value 13D; $0D (<CR>)
Remarks This character, commonly known as <CR> (carriage return), causes the alphanumeric
characters in the PMAC’s command-line-receive buffer to be interpreted and acted upon.
(Control-character commands do not require a <CR> character to execute.)
Note:
For multiple PMACs daisy-chained together on a serial interface, this
will act on all cards simultaneously, not just the software-addressed
card. For simultaneous action on multiple cards, it is best to load up
the command-line-receive buffers on all cards before issuing the
<CR> character.
Example #1J+<CR>
P1<CR>
@0&1B1R@1&1B7R<CR> (This causes card 0 on the serial daisy-chain to have its CS 1
execute PROG 1 and card 1 to have its CS 1 execute
PROG 7 simultaneously.)
See Also Talking to PMAC
<CONTROL-N>
Function Report command line checksum.
Scope Global
Syntax ASCII Value 14D; $0E
Remarks This character causes PMAC to calculate and report the checksum of the alphanumeric
characters of the present command lines (i.e. since the most recent carriage-return character).
As typically used, the host computer would send the entire command line up to, but not
including, the carriage return. It would then send the <CTRL-N> character, and PMAC
would return the checksum value. If this value agreed with the host’s internally calculated
checksum value, the host would then send the <CR> and PMAC would execute the command
line. If the values did not agree, the host would send a <CTRL-X> command to erase the
command line, then resend the line, repeating the process.
Note:
The PMAC Executive Program terminal mode will not display the
checksum values resulting from a <CTRL-N> command.
Example With I4=1 and I3=2:
Host sends:......... J+<CTRL-N>
PMAC sends: ..... <117dec> (117=74[J] + 43[+]; correct)
Host sends:......... <CR>
PMAC sends: ..... <ACK><117dec> (handshake and checksum again)
Host sends:......... J/<CTRL-N>
PMAC sends: ..... <122dec> (122 != 74[J] +47[/]; incorrect)
Host sends:......... <CTRL-X> (Erase the incorrect command)
........................... J/<CTRL-N> (Send the command again)
Example <CTRL-P>
9999.5 10001.2 5.7 -2.1 0 0 0 0<CR>
See Also On-line commands P, <CTRL-V>, <CTRL-F>.
<CONTROL-Q>
Function Quit all executing motion programs.
Scope Global
Syntax ASCII Value 17D; $11
Remarks This command causes any and all motion programs running in any coordinate system to stop
executing after the moves that have already been calculated are finished. Program execution
may be resumed from this point with the R (run) or S (step) commands.
For multiple cards on a single serial daisy-chain, this command affects all cards on the chain,
regardless of the current software addressing.
See Also On-line commands <CTRL-A>, <CTRL-K>, <CTRL-O>, <CTRL-R>, <CTRL-S>, Q
Motion-program command STOP.
<CONTROL-R>
Function Begin execution of motion programs in all coordinate systems.
Scope Global
Syntax ASCII Value 18D; $12
Remarks This command is the equivalent of issuing the R (run) command to all coordinate systems in
PMAC. Each active coordinate system (i.e. one that has at least one motor assigned to it) that
is to run a program must already be pointing to a motion program (initially this is done with a
B{prog num} command).
For multiple cards on a single serial daisy-chain, this command affects all cards on the chain,
regardless of the current software addressing.
For a flash memory PMAC that is in bootstrap mode (powered up with E51 ON), the
<CTRL-R> command puts PMAC into normal operational mode, but with factory default I-
variables, conversion table settings, and VME/DPRAM addresses.
Example &1B1&2B500<CR>
<CTRL-R>
See Also Executing a Motion Program (Writing a Motion Program)
Resetting PMAC (Talking to PMAC)
On-line commands R, B.
Jumper E51
<CONTROL-S>
Function Step working motion programs in all coordinate systems.
Scope Global
Syntax ASCII Value 19D; $13
Remarks This command is the equivalent of issuing an S (step) command to all of the coordinate
systems in PMAC. Each active coordinate system (i.e. one that has at least one motor
assigned to it) that is to run a program must already be pointing to a motion program (initially
this is done with a B{prog num} command).
A program that is not running will execute all lines down to and including the next motion
command (move or dwell), or if it encounters a BLOCKSTART command first, all lines down
to and including the next BLOCKSTOP command.
If a program is already running in continuous execution mode (from an R (run) command), an
S command will put the program in single-step mode, stopping execution after the next
motion command). In this situation, it has exactly the same effect as a Q (quit) command.
For multiple cards on a single serial daisy-chain, this command affects all cards on the chain,
regardless of the current software addressing.
See Also On-line commands <CTRL-A>, <CTRL-O>, <CTRL-Q>, <CTRL-R>, A, H, O, Q, R, S;
Motion-program commands BLOCKSTART, BLOCKSTOP, STOP.
Control-panel port (JPAN) input STEP/.
<CONTROL-T>
Function Toggle serial port half/full duplex mode.
Scope Global
Syntax ASCII Value 20D; $14
Remarks This causes serial port communications to toggle between half duplex (PMAC will not echo
character back to host) and full duplex (PMAC will echo character back to host). The power-
up default is half duplex.
This command is invalid when multiple PMACs are daisy-chained on a single serial
interface.
See Also Data Integrity Checks (Writing a Host Communications Program)
On-line command <CTRL-Z>.
<CONTROL-U>
Function Open rotary program buffer(s).
Scope Global
Syntax ASCII Value 21D; $15
Remarks This character causes PMAC to open all existing rotary motion program buffers for entry. It
is exactly equivalent in effect to the OPEN ROTARY command, but it is faster to send.
Along with the <CTRL-L> command, it permits rapid opening and closing of the rotary
buffer, so that on-line commands can be sent with the buffer closed without chance that they
will be mistaken for buffer commands.
Example <CTRL-L> ........ ; Close rotary buffer
M1 ...................... ; On-line command for value of M1
<CONTROL-X>
Function Cancel in-process communications.
Scope Global
Syntax ASCII Value 24D; $18
Remarks This command causes the PMAC to stop sending any messages that it had started to send,
even multi-line messages. This also causes PMAC to empty the command queue from the
host, so it will erase any partially sent commands.
It can be useful to send this before sending a query command for which you are expecting an
exact response format, if you are not sure what PMAC has been doing before, because it
makes sure nothing else comes through before the expected response. As such, it is often the
first character sent to PMAC from the host when trying to establish initial communications.
In addition, many Delta Tau communications routines start by sending a <CTRL-X>
command to ensure that there is no previously pending response that could confuse the host
software.
active port.
If you are trying to establish communications with PMAC over the serial port, it is a good
idea to send this character before any query commands to make sure PMAC will try to
respond over the serial port.
Regardless of which is the active output port, PMAC can accept commands over either port.
It is the user’s responsibility not to garble commands by simultaneously commanding over
both ports.
Example Serial host sends: P1
PMAC responds to serial port: 12
Bus host sends: .. P1=P1+1
Serial host sends: P1
PMAC responds to bus port: 13
(Serial host gets no response)
Serial host sends: <CTRL-Z>P1
PMAC responds to serial port: 13
See Also On-line commands <CTRL-T>, <CTRL-X>;
Jumpers E44-E47.
#
Function Report currently addressed motor
Scope Global
Syntax # Ask PMAC which motor is addressed
Remarks This causes PMAC to return the number of the motor currently addressed by the host – the
one that acts upon motor-specific commands from the host.
Note:
A different motor may be hardware selected from the control panel
port for motor-specific control panel inputs, and that different motors
may be addressed from programs within PMAC for COMMAND
statements.
Example #
2 PMAC reports that motor 2 is addressed
from the motor home position. (This is the starting offset; it can later be changed in several
ways, including the PSET, {axis}=, ADIS, and IDIS commands).
If the specified motor is currently assigned to an axis in a different coordinate system, PMAC
will reject this command (reporting an ERR003 if I6=1 or 3). If the specified motor is
currently assigned to an axis in the addressed coordinate system, the old definition will be
overwritten by this new one.
To undo a motor’s axis definition, address the coordinate system in which it has been
defined, and use the command #{constant}->0. To clear all of the axis definitions
within a coordinate system, address the coordinate system and use the UNDEFINE command.
To clear all axis definitions in all coordinate systems, use UNDEFINE ALL.
For more sophisticated systems, two or three cartesian axes may be defined as a linear
combination of the same number of motors. This allows coordinate system rotations and
orthogonality corrections, among other things. One to three axes may be specified (if only
one, it amounts to the simpler definition above). All axes specified in one definition must be
from the same triplet set of cartesian axes: XYZ or UVW. If this multi-axis definition is
used, a command to move an axis will result in multiple motors moving.
Example #1->X ...... ; User units = counts
#4->2000 A . ; 2000 counts/user unit
#8->3333.333Z-666.667 ; Non-integers OK
#3->Y ............... ; 2 motors may be assigned to the same axis;
#2->Y ............... ; both motors move when a Y move is given
#1->8660X-5000Y ;This provides a 30o rotation of X and Y...
#2->5000X+8660Y ;with 10000 cts/unit – this rotation does
#3->2000Z-6000 ;not involve Z, but it could have
This example corrects for a Y axis 1 arc minute out of square:
#5->100000X ;100000 cts/in
#6->-29.1X+100000Y ;sin and cos of 1/60
See Also Axes, Coordinate Systems (Setting Up a Coordinate System)
On-line commands #{constant}->, #{constant}->0, UNDEFINE, UNDEFINE
ALL.
$
Function Reset motor
Scope Motor specific
Syntax $
Remarks This command causes PMAC to initialize the addressed motor, performing any required
commutation phasing and full reading of an absolute position sensor, leaving the motor in a
closed-loop zero-velocity state. (For a non-commutated motor with an incremental encoder,
the J/ command may also be used.)
This command is necessary to initialize a PMAC-commutated motor after power-up/reset if
Ix80 for the motor is set to 0. If Ix80 is 1, the initialization will be done automatically during
the power-up/reset cycle.
This command will not be accepted if the motor is executing a move.
Example I180.................. ; Request value of #1 power-on mode variable
0......................... ; PMAC responds with 0; powers on unphased and killed
$$$ .................... ; Reset card; motor is left in killed state
#1$ ; Initialize motor, phasing and reading as necessary
See Also Absolute Sensors (Setting Up a Motor)
Power-on Phasing (Setting Up PMAC Commutation)
I-variables Ix10, Ix73, Ix74, Ix75, Ix80, Ix81
On-line commands $$$, J/
$$$
Function Full card reset.
Scope Global
Syntax $$$
Remarks This command causes PMAC to do a full card reset. The effect of $$$ is equivalent to that
of cycling power on PMAC, or taking the INIT/ line low, then high.
With jumper E51 in its default state (OFF for PMAC-PC, -Lite, -VME, ON for PMAC-STD),
this command does a standard reset of the PMAC. On PMACs without the Option CPU
section (not option 4A, 5A, or 5B), I-variable values, conversion-table settings, and DPRAM
and VMEbus addresses stored in permanent memory (EAROM) by the last SAVE command
are reloaded into active memory (RAM). All information stored in battery backed RAM
such as P-variable and Q-variable values, M-variable definitions, and motion and PLC
programs are not changed by this command.
On PMACs with the Option CPU section (option 4A, 5A, or 5B), PMAC copies the contents
of the flash memory into active memory during a normal reset cycle, overwriting any current
contents. This means that anything changed in PMAC’s active memory that was not saved to
flash memory will be lost. Even the last saved P-variable and Q-variable values, M-variable
definitions, and motion and PLC programs are copied from flash to RAM during the reset
cycle.
With jumper E51 in non-default state (ON for PMAC-PC, -Lite, -VME, OFF for PMAC-
STD), this command does a reset and re-initialization of the PMAC. On PMACs without the
Option CPU section (not option 4A, 5A, or 5B), factory default I-variable values, conversion-
table settings, and DPRAM and VMEbus addresses stored in the firmware (EPROM) are
copied into active memory (RAM). (Values stored in EAROM are not lost; they are simply
not used.)
On PMACs with the Option CPU section (option 4A, 5A, or 5B), PMAC enters a special re-
initialization mode called “bootstrap mode” that permits the downloading of new firmware
(see PMAC PROM SOFTWARE UPDATE LISTING for details of this mode). In this
bootstrap mode, there are very few command options. To bypass the download operation in
this mode, send a <CONTROL-R> character to PMAC. This puts PMAC in the normal
operational mode with the existing firmware. Factory default values for I-variables,
conversion table settings, and bus addresses for DPRAM and VME are copied from the
firmware section of flash memory into active memory. The saved values of these values are
not used, but they are still kept in the user section of flash memory.
Because this command immediately causes PMAC to enter its power-up/rest cycle, there is
no acknowledging character (<ACK> or <LF>) returned to the host.
Example I130=60000 ... ; Change #1 proportional gain
SAVE.................. ; SAVE I-variables to EAROM
I130=80000 ... ; Change gain again
$$$ .................... ; Reset card
I130.................. ; Request value of parameter
60000 ............... ; PMAC reports current value, which is SAVEd value
(Put E51 on)
$$$ .................... ; Reset card
I130.................. ; Request value of parameter
2000 ; PMAC reports current value, which is default
See Also Resetting PMAC (Talking to PMAC)
PMAC PROM SOFTWARE UPDATE LISTING
Control-Panel Port INIT/ Input (Connecting PMAC to the Machine)
On-line command $$$***
I-variables I5, Ix80
JPAN Connector Pin 15
Jumper E51.
$$$***
Function Global card reset and re-initialization.
Scope Global
Syntax $$$***
Remarks This command performs a full reset of the card and reinitializes the memory. All programs
and other buffers are erased. All I-variables, encoder conversion table entries, and VME and
DPRAM addressing parameters are returned to their factory defaults. (Previously SAVEd
values for these parameters are still held in EAROM, and can be brought into active memory
with a subsequent $$$ command). It will also recalculate the firmware checksum reference
value and eliminate any PASSWORD that might have been entered.
M-variable definitions, P-variable values, Q-variable values, and axis definitions are not
affected by this command. They can be cleared by separate commands (e.g. M0..1023-
>*, P0..1023=0, Q0..1023=0, UNDEFINE ALL).
This command is particularly useful if the program buffers have become corrupted. It clears
the buffers and buffer pointers so the files can be re-sent to PMAC. Regular backup of
parameters and programs to the disk of a host computer is strongly encouraged so this type of
recovery is possible. The PMAC Executive program has Save Full PMAC Configuration and
Restore Full PMAC Configuration functions to make this process easy.
With jumper E51 in non-default state (ON for PMAC-PC, -Lite, -VME, OFF for PMAC-
STD), a PMAC with the Option CPU section (option 4A, 5A, or 5B) enters a special re-
initialization mode called “bootstrap mode” when this command is given. This mode permits
the downloading of new firmware (see PMAC PROM SOFTWARE UPDATE LISTING for
details of this mode). In this mode, there are very few command options. To bypass the
download operation in this mode, send a <CONTROL-R> character to PMAC. This puts
PMAC in the normal operational mode with the existing firmware. Factory default values for
I-variables, conversion table settings, and bus addresses for DPRAM and VME are copied
from the firmware section of flash memory into active memory. The saved values of these
values are not used, but they are still kept in the user section of flash memory.
Example I130=60000 ... ; Set #1 proportional gain
SAVE.................. ; Save to non-volatile memory
$$$***............. ; Reset and re-initialize card
I130.................. ; Request value of I130
2000.................. ; PMAC reports current value, which is default
$$$ .................... ; Normal reset of card
I130.................. ; Request value of I130
60000 ; PMAC reports current value, which is SAVEd value
See Also On-line command $$$;
PMAC PROM Software Update Listing
Jumper E51
PMAC Executive Program Save/Restore Full Configuration.
$*
Function Read motor absolute position
Scope Motor specific
Syntax $*
Remarks The $* command causes PMAC to perform a read of the absolute position for the addressed
motor, as defined by Ix10 for the motor. It performs the same actions that are normally
performed during the board’s power-up/reset cycle.
The $* command performs the following actions on the addressed motor:
• The motor is killed (servo loop open, zero command, amplifier disabled).
• If the motor is set up for local hardware encoder position capture by input flags, with bit
16 of Ix03 set to 0 to specify hardware capture, and bit 18 of Ix25 set to 0 to specify local,
not MACRO, flag operation (these are default values), the hardware encoder counter for
the same channel as the flag register specified by Ix25 is set to 0 (e.g. if Ix25 specifies
flags from channel 3, then encoder counter 3 is cleared).
• The motor home complete status bit is cleared.
• The motor position bias register, which contains the difference between motor and axis
zero positions, is set to 0.
• If Ix10 for the motor is greater than 0, specifying an absolute position read, the sensor is
read as specified by Ix10 to set the motor actual position. The actual position value is set
to the sensor value minus the Ix26 “home offset” parameter. Unless the read is
determined to be unsuccessful, the motor “home complete” status bit is set to 1.
• If Ix10 for the motor is set to 0, specifying no absolute position read, the motor actual
position register is set to 0.
• Because the motor is “killed” the actual position value is automatically copied into the
command position register for the motor.
• There are several things to note with regard to this command:
• The motor is left in the “killed” state at the end of execution of this command. To enable
the motor, a $ command should be used if this is a PMAC-commutated motor and a
phase reference must be established; otherwise a J/, A, or <CTRL-A> command should
be used to enable the motor and close the loop.
• If bit 2 of Ix80 is set to 1, PMAC will not attempt an absolute position read at the board
power-on/reset; in this case, the $* command must be used to establish the absolute
sensor. If bit 2 of Ix80 is set to 0 (the default), PMAC will attempt an absolute position
read at the board power-on/reset.
• With Ix10 set to 0, the action of $* is very similar to that of the HOMEZ command. There
are a few significant differences, however:
• $* always kills the motor; HOMEZ leaves the servo in its existing state.
• $* sets the present actual position to be zero; HOMEZ sets the present commanded
position to be zero.
• $* zeros the hardware encoder counter in most cases; HOMEZ does not change the
hardware encoder counter.
See Also I-variables Ix03, Ix10, Ix25, Ix80, Ix81
On-line commands $, $$$, HOMEZ
%
Function Report the addressed coordinate system’s feedrate override value.
Scope Coordinate-system specific
Syntax %
Remarks This command causes PMAC to report the present feedrate-override (time-base) value for the
currently addressed coordinate system. A value of 100 indicates “‘real time”‘; i.e. move
speeds and times occur as specified.
PMAC will report the value in response to this command, regardless of the source of the
value (even if the source is not the %{constant} command)
Example %......................... Request feedrate-override value
100 .................... ; PMAC responds: 100 means real time
H......................... ; Command a feed hold
&{constant}
Function Address a coordinate system.
Scope Global
Syntax &{constant}
where:
• {constant} is an integer from 1 to 8, representing the number of the coordinate
system to be addressed
Remarks This command makes the coordinate system specified by {constant} the addressed
coordinate system (the one on which on-line coordinate-system commands will act). The
addressing is modal, so all further coordinate-system-specific commands will affect this
coordinate system until a different coordinate system is addressed. At power-up/reset,
Coordinate System 1 is addressed.
Note:
A different coordinate system may simultaneously be hardware
selected from the control panel port for coordinate-system-specific
control panel inputs, and that different coordinate systems may be
addressed from programs within PMAC for COMMAND statements.
If the control-panel inputs are disabled by I2=1, the host-addressed coordinate system also
controls the indicator lines for the in-position, warning-following-error, and fatal-following-
error functions. These indicator lines connect to both control-panel port outputs (all PMAC
versions), and to the interrupt controller (PMAC-PC, PMAC-Lite, PMAC-STD). (If I2=0,
the hardware-selected coordinate system controls these lines.)
Example &1B4R ............... ; C.S.1 point to Beginning of Prog 4 and Run
Q......................... ; C.S.1 Quit running program
&3B6R ............... ; C.S.3 point to Beginning of Prog 5 and Run
A......................... ; C.S.3 Abort program
See Also I-variable I2
On-line commands #, #{motor number}, &
Program commands ADDRESS, COMMAND
&
Function Report currently addressed coordinate system.
Scope Global
Syntax &
Remarks This command causes PMAC to return the number of the coordinate system currently
addressed by the host.
Note that a different coordinate system may be hardware selected from the control panel port
for coordinate-system-specific control panel inputs, and that different coordinate systems
may be addressed from programs within PMAC for COMMAND statements.
Example &......................... ; Ask PMAC which C.S. is addressed
4 ; PMAC reports that C.S. 4 is addressed
See Also I-variable I2
On-line commands #, #{motor number},&{C.S. number};
Program commands ADDRESS, COMMAND;
/
Function Halt program execution at end of currently executing move
Scope Coordinate-system specific
Syntax /
Remarks This command causes PMAC to halt the execution of the motion program running in the
currently addressed coordinate system at the end of the currently executing move, provided
PMAC is in segmentation mode (I13>0). If PMAC is not in segmentation mode (I13=0), the
/ command has the same effect as the Q command, halting execution at the end of the latest
calculated move, which can be 1 or 2 moves past the currently executing move.
If the coordinate system is currently executing moves with the special lookahead function
(Option 6L firmware only), motion will stop at the end of the move currently being added to
the lookahead buffer. This is not necessarily the move that is currently executing from the
lookahead buffer, and there can be a significant delay before motion is halted. Acceleration
limits will be observed while ramping down to a stop at the programmed point.
Once halted at the end of the move, program execution can be resumed with the R command.
In the meantime, the individual motors may be jogged way from this point, but they must all
be returned to this point using the J= command before program execution may be resumed.
An attempt to resume program execution from a different point will result in an error
(ERR017 reported if I6 = 1 or 3). If resumption of this program from this point is not
desired, the A (abort) command should be issued before other programs are run.
Example &1B5R ............... ; Command C.S. 1 to start PROG 5
/......................... ; Halt execution of program
#1J+.................. ; Jog Motor 1 positive
J/ ...................... ; Stop jogging
J= ...................... ; Return to prejog position
R......................... ; Resume execution of PROG 5
/......................... ; Halt program execution
#2J-.................. ; Jog Motor 2 negative
J/ ...................... ; Stop jogging
R......................... ; Try to resume execution of PROG 5
<BELL>ERR017 ; PMAC reports error; not at position to resume
J= ...................... ; Return to prejog position
R ; Resume execution of PROG 5
See Also I-variables I6, I13
On-line commands R, J=, Q, A, \, H
?
Function Report motor status
Scope Motor specific
Syntax ?
Remarks This command causes PMAC to report the motor status bits as an ASCII hexadecimal word.
PMAC returns twelve characters, representing two status words. Each character represents
four status bits. The first character represents Bits 20-23 of the first word; the second shows
Bits 16-19; and so on, to the sixth character representing Bits 0-3. The seventh character
represents Bits 20-23 of the second word; the twelfth character represents Bits 0-3.
The value of a bit is 1 when the condition is true; 0 when it is false. The meaning of the
individual bits is:
FIRST WORD RETURNED (X:$003D, X:$0079, etc.):
First character returned:
Bit 23 Motor Activated: This bit is 1 when Ix00 is 1 and the motor calculations are
active; it is 0 when Ix00 is 0 and motor calculations are deactivated.
Bit 22 Negative End Limit Set: This bit is 1 when motor actual position is less than
the software negative position limit (Ix14), or when the hardware limit on this end (+LIMn –
note!) has been tripped; it is 0 otherwise. If the motor is deactivated (bit 23 of the first motor
status word set to zero) or killed (bit 14 of the second motor status word set to zero) this bit is
not updated.
Bit 21 Positive End Limit Set: This bit is 1 when motor actual position is greater
than the software positive position limit (Ix13), or when the hardware limit on this end (-
LIMn – note!) has been tripped; it is 0 otherwise. If the motor is deactivated (bit 23 of the
first motor status word set to zero) or killed (bit 14 of the second motor status word set to
zero) this bit is not updated.
Bit 20 Handwheel Enabled: This bit is 1 when Ix06 is 1 and position following for
this axis is enabled; it is 0 when Ix06 is 0 and position following is disabled.
Second character returned:
Bit 19 Phased Motor: This bit is 1 when Ix01 is 1 and this motor is being
commutated by PMAC; it is 0 when Ix01 is 0 and this motor is not being commutated by
PMAC.
Bit 18 Open Loop Mode: This bit is 1 when the servo loop for the motor is open,
either with outputs enabled or disabled (killed). (Refer to Amplifier Enabled status bit to
distinguish between the two cases.) It is 0 when the servo loop is closed (under position
control, always with outputs enabled).
Bit 17 Running Definite-Time Move: This bit is 1 when the motor is executing any
move with a predefined end-point and end-time. This includes any motion program move
dwell or delay, any jog-to-position move, and the portion of a homing search move after the
trigger has been found. It is 0 otherwise. It changes from 1 to 0 when execution of the
commanded move finishes.
Bit 16 Integration Mode: This bit is 1 when Ix34 is 1 and the servo loop integrator
is only active when desired velocity is zero. It is 0 when Ix34 is 0 and the servo loop
integrator is always active.
Bit 1 Warning Following Error: This bit is 1 if the following error for the motor
exceeds its warning following error limit (Ix12). It stays at 1 if the motor is killed due to
fatal following error. It is 0 at all other times, changing from 1 to 0 when the motor’s
following error reduces to under the limit, or if killed, is re-enabled.
Bit 0 In Position: This bit is 1 when five conditions are satisfied: the loop is
closed, the desired velocity zero bit is 1 (which requires closed-loop control and no
commanded move); the program timer is off (not currently executing any move, DWELL, or
DELAY), the magnitude of the following error is smaller than Ix28.and the first four
conditions have been satisfied for (I7+1) consecutive scans.
Example #1? .................... ; Request status of Motor 1
812000804401 ... ; PMAC responds with 12 hex digits representing 48 bits
........................... ; The following bits are true (all others are false)
........................... ; Word 1 Bit 23: Motor Activated
........................... ; Bit 16: Integration Mode
........................... ; Bit 13: Desired Velocity Zero
........................... ; Word 2 Bit 23: Assigned to Coordinate System
........................... ; (Bits 20-22 all 0 – assigned to C.S.1)
........................... ; Bit 14: Amplifier Enabled
........................... ; Bit 10: Home Complete
; Bit 0: In Position
See Also On-line commands <CTRL-B>, ??, ???
Memory map registers X:$003D, X:$0079, etc. Y:$0814, Y:$08D4, etc.
Suggested M-variable definitions Mx30-Mx45
??
Function Report the status words of the addressed coordinate system.
Scope Coordinate-system specific
Syntax ??
Remarks This causes PMAC to report status bits of the addressed coordinate system as an ASCII
hexadecimal word. PMAC returns twelve characters, representing two status words. Each
character represents four status bits. The first character represents bits 20-23 of the first
word; the second shows bits 16-19; and so on, to the sixth character representing bits 0-3.
The seventh character represents bits 20-23 of the second word; the twelfth character
represents its 0-3.
The value of a bit is 1 when the condition is true; 0 when it is false. The meanings of the
individual bits are:
FIRST WORD RETURNED (X:$0818, X:$08D8, etc.)
First character returned:
Bit 23 Z-Axis Used in Feedrate Calculations: This bit is 1 if this axis is used in the
vector feedrate calculations for F-based moves in the coordinate system; it is 0 if this axis is
not used. See the FRAX command.
Bit 22 Z-Axis Incremental Mode: This bit is 1 if this axis is in incremental mode –
moves specified by distance from the last programmed point. It is 0 if this axis is in absolute
mode – moves specified by end position, not distance. See the INC and ABS commands.
Bit 21 Y-Axis Used in Feedrate Calculations: (See bit 23 description.)
that have been calculated. Compare to the motor Running Program status bit.
The states of bits 4, 1, and 0 in the different move modes are summarized in the following
table:
Mode Bit 4 Bit 1 Bit 0
Linear 0 0 0
Rapid 0 1 0
Spline 1 0 1
Circle1 0 0 1
Circle2 0 1 1
PVT 1 1 0
Example ?? ...................... ; Request coordinate system status words
A8002A020010 ; PMAC responds; the following bits are true:
........................... ; Word 1 Bit 23: Z-axis used in feedrate calcs
........................... ; Bit 21: Y-axis used in feedrate calcs
........................... ; Bit 19: X-axis used in feedrate calcs
........................... ; Bit 5: Radius vector incremental mode
........................... ; Bit 3: Move specified by time
........................... ; Bit 1: Single-step mode
........................... ; Word 2 Bit 17: In-position
; Bit 4: PVT/Spline mode
See Also On-line commands <CONTROL-C>, ?, ???
Memory-map registers X:$0818, X:$08D8, etc.; Y:$0817, Y:$08D7, etc.
Suggested M-variable definitions Mx80-Mx90
???
Function Report global status words.
Scope Global
Syntax ???
Remarks This command causes PMAC to return the global status bits in ASCII hexadecimal form.
PMAC returns twelve characters, representing two status words. Each character represents
four status bits. The first character represents Bits 20-23 of the first word, the second shows
Bits 16-19; and so on, to the sixth character representing Bits 0-3. The seventh character
represents Bits 20-23 of the second word; the twelfth character represents Bits 0-3 of the
second word.
A bit has a value of 1 when the condition is true; 0 when false. The meaning of the
individual status bits is:
FIRST WORD RETURNED (X:$0003):
First character returned:
Bit 23 Real-Time Interrupt Active: This bit is 1 if PMAC is currently executing a
real-time interrupt task (PLC 0 or motion program move planning). It is 0 if PMAC is
executing some other task. Note: Communications can only happen outside of the real-time
interrupt, so polling this bit will always return a value of 0. This bit is for internal use.
Bit 22 Real-Time Interrupt Re-entry: This bit is 1 if a real-time interrupt task has
taken long enough so that it was still executing when the next real-time interrupt came (I8+1
servo cycles later). It stays at 1 until the card is reset, or until this bit is manually changed to
0. If motion program calculations cause this, it is not a serious problem. If PLC 0 causes this
(no motion programs running), it could be serious.
Bit 21 Servo Active: This bit is 1 if PMAC is currently executing servo update
operations. It is 0 if PMAC is executing other operations. Note that communications can
only happen outside of the servo update, so polling this bit will always return a value of 0.
This bit is for internal use.
Bit 20 Servo Error: This bit is 1 if PMAC could not properly complete its servo
routines. This is a serious error condition. It is 0 if the servo operations have been
completing properly.
Second character returned:
Bit 19 Data Gathering Function On: This bit is 1 when the data gathering function
is active; it is 0 when the function is not active.
Bit 18 Data Gather to Start on Servo: This bit is 1 when the data gathering
function is set up to start on the next servo cycle. It is 0 otherwise. It changes from 1 to 0 as
soon as the gathering function actually starts.
Bit 17 Data Gather to Start on Trigger: This bit is 1 when the data gathering
function is set up to start on the rising edge of Machine Input 2. It is 0 otherwise. It changes
from 1 to 0 as soon as the gathering function actually starts.
Bit 16 (Reserved for future use)
Third character returned:
Bit 15 (Reserved for future use)
Bit 14 Leadscrew Compensation On: This bit is 1 if leadscrew compensation is
currently active in PMAC. It is 0 if the compensation is not active
Bit13 Any Memory Checksum Error: This bit is 1 if a checksum error has been
detected for either the PMAC firmware or the user program buffer space. Bit 12 of this word
distinguishes between the two cases.
Bit12 PROM Checksum Error: This bit is 1 if a firmware checksum error has been
detected in PMAC’s memory. It is 0 if a user program checksum error has been detected, or
if no memory checksum error has been detected. Bit 13 distinguishes between these two
cases.
Fourth character returned:
Bit 11 DPRAM Error: This bit is 1 if PMAC has detected an error in DPRAM
communications. It is 0 otherwise.
Bit 10 EAROM Error: This bit is 1 if PMAC detected a checksum error in reading
saved data from the EAROM (in which case it replaces this with factory defaults). It is 0
otherwise.
Bits 8-9 (for internal use)
fifth character returned:
Bit 7 (for internal use)
Bit 6 TWS Variable Parity Error: This bit is 1 if the most recent TWS-format M-
variable read or write operation with a device supporting parity had a parity error; it is 0 if the
operation with such a device had no parity error. The bit status is indeterminate if the
operation was with a device that does not support parity.
Bit 5 MACRO Auxiliary Communications Error: This bit is 1 if the most recent
MACRO auxiliary read or write command has failed. It is set to 0 at the beginning of each
MACRO auxiliary read or write command.
Bit 4 MACRO Ring Check Error: This bit is 1 if the MACRO ring check function
is enabled (I1001 > 0) and PMAC has either detected I1004 ring communication errors in an
I1001 servo-cycle period, or has failed to detect the receipt of I1005 ring sync packet.
Sixth character returned:
Bits 2-3 (Reserved for future use)
Bit 1 All Cards Addressed: This bit is set to 1 if all cards on a serial daisychain
have been addressed simultaneously with the @@ command. It is 0 otherwise.
Bit 0 This Card Addressed: This bit is set to 1 if this card is on a serial daisychain
and has been addressed with the @n command. It is 0 otherwise.
SECOND WORD RETURNED (Y:$0003)
Seventh character returned:
Bit 23 (For internal use)
Bit 22 Host Communication Mode: This bit is 1 when PMAC is prepared to send its
communications over the “host port” (PC bus or STD bus). It is 0 when PMAC is prepared
to send its communications over the VMEbus or the serial port. It changes from 0 to 1 when
it receives an alphanumeric command over the host port. It changes from 1 to 0 when it
receives a <CTRL-Z> over the serial port.
Bits 20-21 (For Internal Use)
Eighth character returned:
Bit 19 Motion Buffer Open: This bit is 1 if any motion program buffer (PROG or
ROT) is open for entry. It is 0 if none of these buffers is open.
Bit 18 Rotary Buffer Open: This bit is 1 if the rotary motion program buffer(s)
(ROT) is (are) open for entry. It is 0 if this is (these are) closed.
Bit 17 PLC Buffer Open: This bit is 1 if a PLC program buffer is open for entry. It
is 0 if none of these buffers is open.
Bit 16 PLC Command: This bit is 1 if PMAC is processing a command issued from
a PLC or motion program through a CMD” “ statement. It is 0 otherwise. It is primarily for
internal use.
Ninth character returned:
Bit 15 VME Communication Mode: This bit is 1 when PMAC is prepared to send its
communications over the VME bus “mailbox” port. It is 0 when PMAC is prepared to send
its communications over the “host port” (PC bus or STD bus) or the serial port. It changes
from 0 to 1 when it receives an alphanumeric command over the VME bus mailbox port. It
changes from 1 to 0 when it receives a <CTRL-Z> over the serial port.
This command should be used only when multiple PMAC cards are connected on a single
serial cable. In this case, I-variable I1 should be set to 2 or 3 on all boards. A board’s card
number is selected by jumpers E40-E43 (PMAC-PC, -Lite, -VME) or switches SW1-1 to
SW1-4 (PMAC-STD).
Note:
While not required, it is best to give a <CR> after an @{card}
command before any other command, in order to give the formerly
addressed card time to “tri-state” its outputs so as not to interfere with
responses from the newly addressed card.
Example I1=2@0............. ; This sequence can be used the first time talking to multiple cards
........................... on a chain to put them in the proper configuration
@0
#1J+.................. ; Jog motor 1 of Card 0.
@5
P20 .................... ; Request the value of P20 on card @5
@@R ; All cards, addressed C.S. run active program
See Also Addressing Commands (Talking to PMAC)
Multiple-Card Applications (Synchronizing PMAC to External Events)
I-variable I2
On-line commands #, &, &{constant}, @
Jumpers E40-E43 (PMAC-PC, -Lite, -VME)
Switches SW1-1 to SW1-4 (PMAC-STD)
\
Function Do a program hold (permitting jogging while in hold mode)
Scope Coordinate-system specific
Syntax \
Remarks This command causes PMAC to do a program hold of the currently addressed coordinate
system in a manner that permits jogging of the motors in the coordinate system while in hold
mode, provided PMAC is in a segmented move (LINEAR or CIRCLE mode with I13>0). If
PMAC is in segmentation mode (I13=0, or other move mode), the \ command has the same
effect as the H command, bringing the motors to a stop in the same way, but not permitting
any moves while in feed hold mode.
The rate of deceleration to a stop in program hold mode, and from a stop on the subsequent R
command, is controlled by I-variable I52. This global I-variable controls the rate for all
coordinate systems.
Once halted in hold mode, program execution can be resumed with the R command. In the
meantime, the individual motors may be jogged way from this point, but they must all be
returned to this point using the J= command before program execution may be resumed. An
attempt to resume program execution from a different point will result in an error (ERR017
reported if I6 = 1 or 3). If resumption of this program from this point is not desired, the A
(abort) command should be issued before other programs are run.
If PMAC is executing moves inside the special lookahead buffer when this command is
received (Option 6L firmware only), the rate of deceleration is the fastest that does not
exceed the Ix17 acceleration limit or any motor. In lookahead mode, reversal along the path
is also then possible with the < command.
Example &1B5R ............... ; Command C.S. 1 to start PROG 5
\......................... ; Command feed hold of program
#1J+.................. ; Jog Motor 1 positive
J/ ...................... ; Stop jogging (examine part here)
J= ...................... ; Return to prejog position
R......................... ; Resume execution of PROG 5
\......................... ; Halt program execution
#2J-.................. ; Jog Motor 2 negative
J/ ...................... ; Stop jogging
R......................... ; Try to resume execution of PROG 5
<BELL>ERR017 ; PMAC reports error; not at position to resume
J= ...................... ; Return to prejog position
R ; Resume execution of PROG 5
See Also Stop Commands (Making Your Application Safe)
I-variables I6, I13, I52, Ix95
On-line commands R, J=, Q, A, /, H
A
Function Abort all programs and moves in the currently addressed coordinate system.
Scope Coordinate-system specific
Syntax A
Remarks This command causes all axes defined in the current coordinate system to begin immediately
to decelerate to a stop, aborting the currently running motion program (if any). It also brings
any disabled (killed) or open-loop motors (defined in the current coordinate system) to an
enabled zero-velocity closed-loop state.
If moving, each motor will decelerate its commanded profile at a rate defined by its own
motor I-variable Ix15. If there is significant following error when the A command is issued,
it may take a long time for the actual motion to stop. Although the command trajectory is
brought to a stop at a definite rate, the actual position will continue to catch up to the
commanded position for a longer time.
Note that a multi-axis system may not stay on its programmed path during this deceleration.
Note:
Abort commands are not meant to be recovered from gracefully. If
you wish to resume easily, us the H, Q, /, or \ command instead.
Motion program execution may resume (if a motion program was in fact aborted) by issuing
either an R or S command, but two factors must be considered. First, the starting positions
for calculating the next move will be the original end positions of the aborted move unless
the PMATCH command is issued or I14=1. Second, the move from the aborted position to the
next move end position may not be possible or desirable. The J= command may be used to
jog each motor in the coordinate system to the original end position of the aborted move,
provided I13 is 0 (no segmentation mode).
Example B1R .................... ; Start Motion Program 1
A......................... ; Abort the program
#1J=#2J= ........ ; Jog motors to original move-end position
R ; Resume program with next move
CHECKSUM
Function Report the firmware checksum value.
Scope Global
Syntax CHECKSUM
CHKS
Remarks This command causes PMAC to report the reference checksum value of the firmware
revision that it is using. The value is reported as a hexadecimal ASCII string. This value was
computed during the compilation of the firmware. It is mainly used for troubleshooting
purposes.
The comparative checksum value that PMAC is continually computing by scanning the
firmware in active memory is stored in X:$0794. As long as there is no checksum error, this
comparative value is continually changing as PMAC continues its calculations. However, if
during any pass of the checksum calculations, if the final comparative checksum value does
not agree with the reference value, the calculations stop, and the final erroneous value is held
in X:$0794.
Example CHECKSUM ; Request firmware reference checksum value
9FA263 ; PMAC returns hex value
See Also On-line commands DATE, VERSION
CLEAR
Function Erase currently opened buffer.
Scope Global (Coordinate-system specific for rotary motion program buffers)
Syntax CLEAR
CLR
Remarks This command empties the currently opened program, PLC, rotary, etc. buffer Typically, as
you create a buffer file in your host computer, you will start with the OPEN {buffer} and
CLEAR commands (even though these lines are technically not part of the buffer), and follow
with your actual contents. This will allow you to easily edit buffers from your host and
repeatedly download the buffers, erasing the old buffer’s contents in the process.
Example OPEN PROG 1 . ; Open motion program buffer 1
CLEAR ............... ; Clear out this buffer
F1000 ............... ; Program really starts here!
X2500 ............... ;...and ends on this line!
CLOSE ............... ; This closes the program buffer
OPEN PLC 3 CLEAR CLOSE ; This erases PLC 3
See Also Program Buffers (Talking to PMAC)
On-line commands OPEN, CLOSE, DELETE.
CLEARFAULT
Function Clear Geo PMAC fault display
Scope Global
Syntax CLEARFAULT
CLRF
Remarks This command clears the seven-segment fault display on the Geo PMAC controller/amplifier
package. After this command is issued, the fault display will show a “0”. However, if the
fault-causing condition is still present, the fault display will immediately show that fault
number again.
CLOSE
Function Close the currently opened buffer.
Scope Global
Syntax CLOSE
CLS
Remarks This closes the currently OPENed buffer. This should be used immediate after the entry of a
motion, PLC, rotary, etc. buffer. If the buffer is left open, subsequent statements that are
intended as on-line commands (e.g. P1=0) will get entered into the buffer instead. It is good
practice to have CLOSE at the beginning and end of any file to be downloaded to PMAC.
When PMAC receives a CLOSE command, it automatically appends a RETURN statement to
the end of the open program buffer.
If any PROGRAM or PLC in PMAC is improperly structured (e.g. no ENDIF or ENDWHILE
to match an IF or WHILE), PMAC will report an ERR003 at the CLOSE command for any
buffer until the problem is fixed.
Example CLOSE ............... ; This makes sure all buffers are closed
OPEN PROG 1 . ; Open motion program buffer 1
CLEAR ............... ; Clear out this buffer
F1000 ............... ; Program actually starts here!...
X2500 ...... ;...and ends on this line!
CLOSE .............. ; This closes the program buffer
LIST PROG 1 . ; Request listing of closed program
F1000 ............... ; PMAC starts listing
X2500 ...............
RETURN ; This was appended by the CLOSE command
See Also Program Buffers (Talking to PMAC)
On-line commands OPEN, CLEAR, <CTRL-L>, <CTRL-U>
{constant}
Function Assign value to variable P0, or to table entry.
Scope Global
Syntax {constant}
where:
• {constant} is a floating point value
Remarks This command is the equivalent of P0={constant}. That is, a value entered by itself on a
command line will be assigned to P-variable P0. This allows simple operator entry of
numeric values through a dumb terminal interface. Where the value goes is hidden from the
operator; the PMAC user program must take P0 and use it as appropriate.
Note:
If a special table on PMAC (e.g. STIMULUS, COMP) has been defined
but not filled, a constant value will be entered into this table, not into
P0.
Example In a motion program:
P0=-1 ............... ; Set P0 to an “illegal” value
SEND”Enter number of parts in run:”
........................... ; Prompt operator at dumb terminal
........................... ; Operator simply needs to type in number
WHILE (P0<1) WAIT ; Hold until get legal response
P1=0.................. ; Initialize part counter
WHILE (P0<P1) ; Loop once per part
P1=P1+1
...
See Also On-line commands OPEN COMP, OPEN STIMULUS, P{constant}={expression}
DATE
Function Report PROM firmware revision date.
Scope Global
Syntax DATE
DAT
Remarks This command causes PMAC to report the revision date of the PROM firmware revision it is
using. The date is reported in the American style: mm/dd/yy (month/day/year).
Example DATE ;Ask PMAC for firmware revision date
07/22/92 ;PMAC responds with July 22, 1992
See Also On-line command VERSION, TYPE
DEFINE BLCOMP
Function Define backlash compensation table
Scope Motor specific
Syntax DEFINE BLCOMP {entries},{count length}
DEF BLCOMP {entries},{count length}
where:
• {entries} is a positive integer constant representing the number of values in the table;
• {count length} is a positive integer representing the span of the table in encoder
counts of the motor.
Remarks This command establishes a backlash compensation table for the addressed motor. The next
{entries} constants sent to PMAC will be placed into this table. The last item on the
command line {count length} specifies the span of the backlash table in encoder counts
of the motor. In use, if the motor position goes outside of the range 0 to count-length, the
position is rolled over to within this range before the compensation is computed. The spacing
between entries in the table is {count length} divided by {entries}.
On succeeding lines will be given the actual entries of the table as constants separated by
spaces and or carriage return characters. The units of these entries are 1/16 count, and the
entries must be integer values. The first entry is the correction at one spacing from the motor
zero position (as determined by the most recent home search move or power-up/reset), the
second entry is the correction two spacings away, and so on. The correction from the table at
motor zero position is zero by definition.
The correction is the amount subtracted (added in the negative direction) from the nominal
commanded position when the motor is moving in the negative direction to get the corrected
position. The correction from the backlash table is added to the Ix86 constant backlash
parameter before adjusting the motor position. Corrections from any leadscrew
compensation tables that have this motor as the target motor are always active in both
directions.
The last entry in the table represents the correction at {count length} distance from the
motor’s zero position. Since the table has the capability to roll over, this entry also represents
the correction at the motor’s zero position. For this reason, the last entry should virtually
always be set to zero.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any BLCOMP buffer exists for a lower numbered motor, or if any
TBUF, ROTARY, or GATHER buffer exists. Any of these buffers
must be deleted first. BLCOMP buffers must be defined from high-
numbered motor to low-numbered motor, and deleted from low-
numbered motor to high-numbered motor.
I51 must be set to 1 to enable the table.
See Also Backlash Compensation (Setting Up a Motor)
Leadscrew Compensation (Setting Up a Motor)
I-variables I99, Ix85, Ix86
On-line commands DEFINE COMP, DELETE BLCOMP
DEFINE COMP (one-dimensional)
Function Define Leadscrew Compensation Table
Scope Motor specific
Syntax DEFINE COMP {entries}, [#{source}[D], [#{target},]] {count
length}
where:
• {entries} is a positive integer constant representing the number of numbers in the
table;
• {source} (optional) is a constant from 1 to 8 representing the motor whose position
controls which entries in the table are used for the active correction; if none is specified,
PMAC assumes the source is the addressed motor; if a D is specified after the source
motor number, the desired position of the motor is used to calculate the correction;
otherwise the actual position is used;
• {target} (optional) is a constant from 1 to 8 representing the motor that receives the
correction; if none is specified, PMAC assumes the target is the addressed motor;
• {count length} is a positive integer representing the span of the table in
encoder counts of the source motor.
Remarks This command establishes a leadscrew (position) compensation table assigned to the
addressed motor. The next {entries} constants sent to PMAC will be placed into this
table. Once defined, the tables are enabled and disabled with the variable I51.
The table “belongs” to the currently addressed motor, and unless otherwise specified in the
command line, it will use the addressed motor both for source position data and as the target
for its corrections. Each motor can only have one table that “belongs” to it (for a total of 8
tables in one PMAC), but it can act as a source or a target for multiple motors.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any COMP buffer exists for a lower numbered motor, or if any
TCOMP, BLCOMP, TBUF, ROTARY, or GATHER buffer exists.
Any of these buffers must be deleted first. COMP buffers must be
defined from high-numbered motor to low-numbered motor, and
deleted from low-numbered motor to high-numbered motor.
It is possible to directly specify a source motor (with #{source}), or source and target
motors (with #{source},#{target}), in this command. Either or both of them may be
different from the motor to which the table belongs. (In other words, just because a table
belongs to a motor does not necessarily mean that it affects or is affected by that motor’s
position.)
The table can operate as a function of either the desired (commanded) or actual position of
the source motor. If a D is entered immediately after the source motor number (which must
be explicitly declared here), the table operates as a function of the desired position of the
source motor; if no D is entered, the table operates as a function of the actual position of the
source motor.
The last item on the command line, {count length}, specifies the span of the
compensation table in encoder counts of the source motor. In use, if the source motor
position goes outside of the range 0 to count-length, the source position is “rolled over” to
within this range before the correction is computed. The spacing between entries in the table
is {count length} divided by {entries}.
On succeeding lines will be given the actual entries of the table. The units of these entries
are 1/16 count, and the entries must be integer values. The first entry is the correction at one
spacing from the motor zero position (as determined by the most recent home search move or
power-up/reset), the second entry is the correction two spacings away, and so on. The
correction is the amount added to the nominal position to get the corrected position. The
correction at the zero position is zero by definition.
The last entry in the table represents the correction at {count length} distance from the
source motor’s zero position. Since the table has the capability to roll over, this entry also
represents the correction at the source motor’s zero position. For this reason, the last entry
should virtually always be set to zero.
Example #1 DEFINE COMP 4,2000 ; Create table for motor 1
Remarks This command establishes a two-dimensional position compensation table assigned to the
addressed motor. The next (Rows+1)*(Columns+1)-1 constants sent to PMAC will be
placed into this table. This type of table is usually used to correct a motor position (X, Y, or
Z-axis) as a function of the planar position of two motors (e.g. X and Y axes). Once defined,
the tables are enabled and disabled with the variable I51.
The table belongs to the currently addressed motor, and unless otherwise specified in the
command line, it will use the addressed motor both as the first-motor source position data and
as the target for its corrections. Each motor can only have one table that belongs to it (for a
total of eight tables in one PMAC), but it can act as a source and/or a target for multiple
tables.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any COMP buffer exists for a lower numbered motor, or if any
TCOMP, BLCOMP, TBUF, ROTARY, or GATHER buffer exists.
Any of these buffers must be deleted first. COMP buffers must be
defined from high-numbered motor to low-numbered motor, and
deleted from low-numbered motor to high-numbered motor.
The first source motor must be specified in the command line with #{RowMotor}. The
second source motor may be specified in the command line with #{ColumnMotor}; if it is
not specified, PMAC assumes that the second source motor is the currently addressed motor.
The target motor may be specified with #{TargetMotor}; if it is not specified, PMAC
assumes that the target motor is the currently addressed motor.
In other words, if only one motor is specified in the command line, it is the first (row) source
motor, and the second (column) source and target motors default to the addressed motor. If
two motors are specified in the command line, the first one specified is the first (row) source
motor, the second is the second (column) source motor, and the target motor defaults to the
addressed motor. If three motors are specified, the first is the first (row) source motor, the
second is the second (column) source motor, and the third is the target motor. None of these
motors is required to be the addressed motor.
It is strongly recommended that you explicitly specify both source motors and the target
motor in this command, to prevent possible confusion.
The table can operate as a function of either the desired (commanded) or actual position of
the source motors. If a D is entered immediately after the source motor number (which must
be explicitly declared here), the table operates as a function of the desired position of the
source motor; if no D is entered, the table operates as a function of the actual position of the
source motor. If the target motor is also one of the source motors, it is recommended that
desired position be used, especially in high-gain systems, to prevent interaction with the
servo dynamics.
The last two items on the command line, {RowSpan} and {ColumnSpan}, specify the
span of the compensation table for the two source motors, row and column respectively,
expressed in encoder counts of those motors. In use, if the source motor position goes
outside of the range 0 to {Span}, the source position is “rolled over” to within this range
along this axis before the correction is computed.
The count spacing between columns in the table is {RowSpan} divided by {Columns}.
The count spacing between rows in the table is {ColumnSpan} divided by {Rows}. Note
carefully the interaction between the row parameters and the column parameters.
On succeeding command lines will be given the actual correction entries of the table, given
as integer numerical constants in text form. The units of these entries are 1/16 count, and the
entries must be integer values. The first entry is the correction at one column spacing from
the zero position of the RowMotor, and the zero position of the ColumnMotor. The
second entry is the correction at two column spacings from the zero position of the
RowMotor, and the zero position of the ColumnMotor, and so on. Entry number
Columns is the correction at RowSpan counts of the RowMotor, and at the zero position
of the ColumnMotor (this entry should be zero if you wish to use the table along the edge,
to match the implied zero correction at the origin). These entries should be considered as
constituting “Row 0” of the table.
The next entry (entry Columns+1, the first entry of Row 1) is the correction at the zero
position of the RowMotor, and one row spacing of the ColumnMotor. The following
entry is the correction at one column spacing of the RowMotor and one row spacing of the
ColumnMotor. The entry after this is the correction at two column spacing of the
RowMotor and one row spacings of the ColumnMotor., and so on. The last entry of Row
1 (entry 2*Columns+1) is the correction at one row spacing of the RowMotor, and
RowSpan counts of the ColumnMotor.
Subsequent rows are added in this fashion, with the corrections of the entries for Row n being
at n row spacings from the zero position of the ColumnMotor. The last row (row Rows)
contains corrections at ColumnSpan counts of the ColumnMotor.
The size of the table is limited only by available data buffer space in PMAC’s memory.
The following chart shows the order of entries into a 2D table with r rows and c columns,
covering a span along the row motor of RowSpan, and along the column motor of ColSpan:
Column Motor
Position v Col 0 Col 1 Col 2 (Col j) Col c
Row Motor 0 RowSpan 2*RowSpan RowSpan
Position > c c
Row 0 0 [0] E1 E2 … Ec
Row 1 ColSpan Ec+1 Ec+2 Ec+3 … E2c+1
r
Row 2 2*ColSpan E2c+2 E2c+3 E2c+4 … E3c+2
r
(Row i) … … … (Eic+I+j) …
Row r ColSpan Erc+r Erc+r+1 Erc+r+2 Erc+r+c
There are several important details to note in the entry of a 2D table:
• The number of rows and number of columns is separated by a period, not a comma.
• The correction to the target motor at the zero position of both source motors is zero by
definition. This is an implied entry at the beginning of the table (shown by [0] in the
above chart); it should not be explicitly entered.
• Consecutive entries in the table are in the same row (except at row’s end) separated by
one column spacing of the position of the first source (row) motor.
• Both Row 0 and Row r must be entered into the table, so effectively you are entering
(r+1) rows. If there is any possibility that you may go beyond an edge of the table,
matching entries of Row 0 and Row r should have the same value to prevent a
discontinuity in the correction. Row r in the table may simply be an added row beyond
your real range of concern used just to prevent possible discontinuities at the edges of
your real range of concern.
• Both Column 0 and Column c must be entered into the table, so effectively you are
entering (c+1) columns. If there is any possibility that you may go beyond an edge of the
table, matching entries of Column 0 and Column c should have the same value to prevent
a discontinuity in the correction. Column c in the table may simply be an added column
beyond your real range of concern used just to prevent possible discontinuities at the
edges of your real range of concern.
• Because the outside rows and outside columns must match each other to prevent edge
discontinuities, the three explicitly entered corner corrections must be zero to match the
implicit zero correction at the first corner of the table.
Example #1 DEFINE COMP 40.30,#1,#2,#3,300000,400000
........................... ; Create table belonging to Motor 1
ERR007............. ; PMAC rejects this command
DELETE GATHER ; Clear other buffers to allow loading
&1 DELETE ROTARY
&2 DELETE ROTARY
#2 DELETE COMP
#3 DELETE COMP
#4 DEFINE COMP 30.40,#1,#2,#3,400000,300000
........................... ; Create same table, now belonging to Motor 4;
........................... ; #1 & #2 are sources, #3 is target;
........................... ; 30 rows x 40 columns, spacing of 10,000 counts
(1270 entries)..... ; (30+1)*(40+1)-1 entries of constants
#3 DEFINE COMP 25.20,#2,#3,#1,200000,250000
........................... ; Create table belonging to Motor 3;
........................... ; #2 and #3 are sources, #1 is target;
........................... ; 25 rows x 20 columns, spacing of 10,000 counts
(545 entries)....... ;(25+1)*(20+1)-1 entries of constants
#2 DEFINE COMP 10.10,#1,#4,10000,20000
........................... ; Create table belonging to Motor 2; #1 and #4 are
........................... ; sources, #2 (default) is target; 10 rows x10 columns,
........................... ; spacing of 1000 cts between columns; pacing of
........................... ; 2000 cts between rows
(120 entries)....... ; (10+1)*(10+1)-1 entries of constants
#1 DEFINE COMP 12.10,#4,1280,1200
........................... ; Create table belonging to Motor 1, #4 and #1 (default)
........................... ; are sources, #1 (default) is target 12 rows x 10 columns
........................... ; spacing of 128 cts between columns spacing of 100 cts
........................... ; between rows
(142 entries)....... ; (12+1)*(10+1)-1 entries of constants
I51=1 ...... Enable compensation tables
See Also Leadscrew compensation (Setting Up a Motor)
I-variable I51
On-line commands {constant}, LIST COMP, LIST COMP DEF, DELETE COMP,
DELETE GATHER, DELETE ROTARY, SIZE
DEFINE GATHER
Function Create a data gathering buffer.
Scope Global
Syntax DEFINE GATHER [{constant}]
DEF GAT [{constant}]
where:
• {constant} is a positive integer representing the number of words of memory to be
reserved for the buffer
Remarks This command reserves space in PMAC’s memory or in DPRAM depending upon the setting
of I45 for the data gathering buffer and prepares it for collecting data at the beginning of the
buffer. If a data gathering buffer already exists, its contents are not erased but the Data
Gather Buffer Storage address (Y:$0F20) is reinitialized to the Data Gather Buffer Start
address (X:$0F20) and the LIST GATHER command will no longer function. Data
collection will again start at the beginning of the buffer when the command GATHER is
issued.
If Data Gathering is in progress (an ENDGATHER command has not been issued and the
gather buffer has not been filled up) PMAC will report an error on receipt of this command.
The optional {constant} specifies the number of long words to be reserved for the data
gathering buffer, leaving the remainder of PMAC’s memory available for other buffers such
as motion and PLC programs. If {constant} is not specified, all of PMAC’s unused
buffer memory is reserved for data gathering. Until this buffer is deleted (with the DELETE
GATHER command), no new motion or PLC programs may be entered into PMAC.
Note:
If I45 = 2 or 3 the {size} requested in the DEFINE GATHER
{size} command refers to a DPRAM long word (32-bits). If the
{size} is smaller than required to hold an even multiple of the
requested data, the actual data storage will go beyond the requested
{size} to the next higher multiple of memory words required to
hold the data. For example, if you are gathering one 24-bit value and
one 48-bit value you will need 3 DPRAM long words of memory. If
the {size} you specify is 4000 words (not a multiple of 3), the
actual storage size will be 4002 words (the next higher multiple of 3).
The number of long words of unused buffer memory can be found by issuing the SIZE
command.
Example DEFINE GATHER
DEFINE GATHER 1000
See Also I-variables I19-I45
On-line commands GATHER, DELETE GATHER, <CTRL-G>, SIZE
DEFINE LOOKAHEAD {Option 6L firmware only}
Function Create lookahead buffer
Scope Coordinate-system specific
Syntax DEFINE LOOKAHEAD {constant},{constant}
DEF LOOK {constant},{constant}
where:
• the first {constant} is a positive integer representing the number of move segments
that can be stored in the buffer;
• the second {constant} is a positive integer representing the number of synchronous
The method for calculating the number of segments that must be stored ahead is explained in
the I1020 specification and in the PMAC User’s Guide section on Lookahead. The
fundamental equation is:
4 Ix16 1
I 1020 = * max *
3 Ix17 x 2 * I 13
If backup capability is desired, the buffer must be able to store an additional number of
segments for the entire distance to be covered in reversal. This number of segments can be
calculated as:
BackupDist (units )* 1000(m sec/ sec )
BackSegments =
V max (units / sec )* SegTime( m sec/ seg )
The total number of segments to reserve for the buffer is simply the sum of the forward and
back segments you wish to be able to hold:
TotalSegments = I 1020 + BackSegments
Memory Requirements: For each segment PMAC is told to reserve space for in the lookahead
buffer, PMAC will reserve (2x+4) 48-bit words of memory from the main buffer memory
space, where x is the number of motors in the coordinate system at the time that the buffer is
defined. For example, if there are 5 motors in the coordinate system, a command to reserve
space for 50 segments will reserve 50*(2*5 + 4) = 700 words of memory.
Once a lookahead buffer has been defined for a coordinate system, motors cannot be added
to, or removed from, the coordinate system without upsetting the structure of the lookahead
buffer. Attempting to do this will result in a “run-time” error on the next lookahead move.
If it is desired to add a motor to the coordinate system, or remove one, the lookahead buffer
must first be erased with the DELETE LOOKAHEAD command, then re-defined after the
change to the coordinate system has been made.
Output Buffer Size: The second constant value in the command determines the number of
synchronous M-variable assignments that can be stored in the lookahead buffer. Because
these are evaluated at lookahead time, but not actually implemented until move execution
time, they must be buffered. This section of the buffer must be large enough to store all of
the assignments that could be made in the lookahead distance. Synchronous M-variable
assignments are not made during backup, so there is no need to reserve memory to store
assignments for the backup distance as well as the lookahead distance.
Memory Requirements: For each synchronous M-variable assignment PMAC is told to
reserve space for in the lookahead buffer, PMAC will reserve two 48-bit words of memory.
There are no performance penalties for making the lookahead buffer larger than required, but
this does limit the amount of PMAC memory free for other features.
A lookahead buffer is never retained through a power-down or board reset, so this command
must be issued after every power-up/reset if the lookahead function is to be used.
To erase a lookahead buffer and free up the memory for other use, issue a DELETE
LOOKAHEAD command, or reset the card.
PMAC will reject the DEFINE LOOKAHEAD command, reporting an ERR003 if I6 = 1 or 3,
if any lookahead buffer exists, or if a GATHER buffer exists. Any existing lookahead buffers
and gather buffers must be deleted before a lookahead buffer can be defined.
DEFINE ROTARY
Function Define a rotary motion program buffer
Scope Coordinate-system specific
Syntax DEFINE ROTARY{constant}
DEF ROT{constant}
where:
• {constant} is a positive integer representing the number of long words of memory to
be reserved for the buffer
Remarks This command causes PMAC to create a rotary motion program buffer for the addressed
coordinate system, allocating the specified number of long words of memory. Rotary buffers
permit the downloading of program lines during the execution of the program.
The buffer should be large enough to allow it to hold safely the number of lines you
anticipate downloading to PMAC ahead of the executing point. Each long word of memory
can hold one sub-block of a motion program (i.e. X1000 Y1000 is considered as two sub-
blocks). The allocated memory for this coordinate system’s rotary buffer remains resident
until the buffer is deleted with DELETE ROT.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any ROTARY buffer exists for a lower numbered coordinate system,
or if a LOOKAHEAD or GATHER buffer exists. Any of these
buffers must be deleted first. ROTARY buffers must be defined from
high-numbered coordinate system to low-numbered coordinate system
and deleted from low-numbered coordinate system to high-numbered
coordinate system.
Example DELETE GATHER ; Ensure open memory
DEFINE TBUF
FunctionCreate a buffer for axis transformation matrices.
Scope Global
Syntax DEFINE TBUF {constant}
DEF TBUF {constant}
where:
• {constant} is a positive integer representing the number of transformation matrices to
create
Remarks This command reserves space in PMAC’s memory for one or more axis transformation
matrices. These matrices can be used for real-time translation, rotation, scaling, and
mirroring of the X, Y, and Z axes of any coordinate system. A coordinate system selects
which matrix to use with the TSELn command, where n is an integer from 1 to the number of
matrices created here.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any ROTARYor GATHER buffer exists. Any of these buffers must
be deleted first.
The number of long words of unused buffer memory can be found by issuing the SIZE
command. Each defined matrix takes 21 words of memory.
Example DELETE GATHER
DEF TBUF 1
DEFINE TBUF 8
See Also Axis Transformation Matrices (Writing a Motion Program)
On-line commands DELETE TBUF, DELETE GATHER, SIZE.
Program commands TSEL, ADIS, AROT, IDIS, IROT, TINIT
DEFINE TCOMP
FunctionDefine torque compensation table
Scope Motor specific
Syntax DEFINE TCOMP {entries},{count length}
DEF TCOMP {entries},{count length}
where:
• {entries} is a positive integer constant representing the number of values in the table;
• {count length} is a positive integer representing the span of the table in encoder
counts of the motor.
Remarks This command establishes a torque compensation table for the addressed motor. The next
{entries} constants sent to PMAC will be placed into this table. The last item on the
command line {count length} specifies the span of the torque compensation table in
encoder counts of the motor. In use, if the motor position goes outside of the range 0 to
count-length, the position is “rolled over” to within this range before the compensation is
computed. The spacing between entries in the table is {count length} divided by
{entries}.
On succeeding lines will be given the actual entries of the table as constants separated by
spaces and or carriage return characters. The entries are signed 24-bit integer values, with a
range of –8,388,608 to +8,388,607. The full range of these entries corresponds to the full
range of the 16-bit torque output of the servo loop, -32,768, to +32,767.
Therefore, an entry in the torque compensation table is numerically 256 times bigger than the
corresponding servo-loop torque output.
The first entry is the correction at one spacing from the motor zero position (as determined by
the most recent home search move or power-up/reset), the second entry is the correction two
spacings away, and so on. PMAC computes corrections for positions between the table
entries by a first-order interpolation between adjacent entries. The correction from the table
at motor zero position is zero by definition.
The correction is the magnitude added to PMAC’s servo loop output at that position. If
PMAC’s command is positive, a positive value from the table will increase the magnitude of
the output; a negative value will decrease the magnitude of the output. If PMAC’s command
is negative, a positive value from the table will decrease the magnitude of the output in the
negative direction; a negative value will increase the magnitude of the output.
The last entry in the table represents the correction at {count length} distance from the
motor’s zero position. Since the table has the capability to roll over, this entry also represents
the correction at the motor’s zero position. For this reason, the last entry should virtually
always be set to zero.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any TCOMP buffer exists for a lower numbered motor, or if any
BLCOMP, TBUF, ROTARY, or GATHER buffer exists. Any of
these buffers must be deleted first. TCOMP buffers must be defined
from high-numbered motor to low-numbered motor, and deleted from
low-numbered motor to high-numbered motor.
I51 must be set to 1 to enable the table.
See Also Torque Compensation (Setting Up a Motor)
I-variables I51
On-line command DELETE TCOMP
DEFINE UBUFFER
Function Create a buffer for user variable use.
Scope Global
Syntax DEFINE UBUFFER {constant}
DEF UBUF {constant}
where:
• {constant} is a positive integer representing the number of 48-bit words of PMAC
memory to reserve for this purpose
Remarks This command reserves space in PMAC’s memory for the user’s discretionary use. This
memory space will be untouched by any PMAC automatic functions. User access to this
buffer is through M-variables, or possibly through on-line W (write) and R (read) commands.
The buffer starts at PMAC memory address $9FFF and continues back toward the beginning
of memory ($0000) for the number of long (48-bit) words specified by {constant}. This
memory space can be subdivided any way the user sees fit. On PMACs with battery backup,
the values in the buffer at power-down will still be there at power-up. On PMACs with flash
backup, the values in the buffer at the last SAVE command will be copied from the flash
memory into the buffer at power-up or reset.
All other buffers except for fixed motion programs (PROG) and PLC programs must be
deleted before PMAC will accept this command. There can be no rotary motion program,
leadscrew compensation table, transformation matrix, data gathering or stimulus buffers in
PMAC memory (any buffer created with a DEFINE command) for this command to be
accepted. It is usually best to reinitialize the card with a $$$*** command before sending
the DEFINE UBUFFER command.
The address of the end of unreserved memory is held in register X:$0F3F. This register must
hold the address $A000, signifying no defined buffers, in order for PMAC to be able to create
a user buffer. Immediately after the user buffer has successfully been defined, this register
will hold the address of the start of the buffer (the end of the user buffer is always at $9FFF).
However, after other buffers have been defined, the end of unreserved memory will not
match the beginning of the user buffer.
To free up this memory for other uses, the DEFINE UBUFFER 0 command should be used
(there is no DELETE UBUFFER command). It may be more convenient simply to re-
initialize the board with a $$$*** command.
Example RHX:$0F3F ; Look for end of unreserved memory
008A3D ; Reply indicates some reserved
$$$*** ; Re-initialize card to clear memory
RHX:$0F3F ; Check end of unreserved memory
00A000 ; Reply indicates none reserved
DEFINE UBUFFER 256 ; Reserve memory for buffer
RHX:$0F3F ; Check for beginning of buffer
009F00 ; Reply confirms 256 words reserved
M1000->D:$9F00 ; Define M-variable to first word
M1010->Y:$9F80,12,1 ; Define M- variable to a middle word
M1023->X:$9FFF,24,S ; Define M- variable to last word
See Also User Buffer, M-Variables (Computational Features)
On-line commands $$$***, R[H]{address}, W{address}
DELETE BLCOMP
Function Erase backlash compensation table
Scope Motor specific
Syntax DELETE BLCOMP
DEL BLCOMP
Remarks This command causes PMAC to erase the compensation table for the addressed motor,
freeing that memory for other use.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any BLCOMP buffer exists for a lower numbered motor, or if any
TBUF, ROTARY, or GATHER buffer exists. Any of these buffers
must be DELETEd first. BLCOMP buffers must be DEFINEd from
high-numbered motor to low-numbered motor, and DELETEd from
low-numbered motor to high-numbered motor.
Example #2 DEL BLCOMP ; Erase table belonging to Motor 2
ERR003............. ; PMAC rejects this command
#1 DEL BLCOMP ; Erase table belonging to Motor 1
#2 DEL BLCOMP ; Erase table belonging to Motor 2
Note:
When the executive program’s data gathering function operates, it
automatically reserves the entire open buffer space for gathered data.
When this has happened, no additional programs or program lines may
be entered into PMAC’s buffer space until the DELETE GATHER
command has freed this memory.
Example CLOSE ............... ; Make sure no buffers are open
DELETE GATHER ; Free memory
OPEN PROG 50 ; Open new buffer for entry
CLEAR ............... ; Erase contents of buffer
... ; Enter new contents here
See Also Buffered Commands (Talking to PMAC)
On-line commands GATHER, DEFINE GATHER, SIZE
DELETE LOOKAHEAD {Option 6L firmware only}
Function Erase lookahead buffer
Scope Coordinate-system specific
Syntax: DELETE LOOKAHEAD
DEL LOOK
Remarks This command erases the lookahead buffer for the addressed coordinate system, freeing the
memory for other uses. It also permits a motor to be added to, or removed from, the
coordinate system, which cannot be done while there is a defined lookahead buffer for the
coordinate system.
PMAC will reject the DELETE LOOKAHEAD command, reporting an ERR003 if I6 = 1 or 3,
if a data gathering buffer exists. An existing data gathering buffer must be erased with a
DELETE GATHER command before the lookahead buffer may be deleted.
DELETE PLCC
Function Erase specified compiled PLC program
Scope Global
Syntax DELETE PLCC {constant}
DEL PLCC {constant}
where:
• {constant} is an integer from 0 to 31, representing the program number
Remarks This command causes PMAC to erase the specified compiled PLC program. Remember that
because all of the compiled PLC programs must be downloaded to PMAC together, the only
way to restore this PLC is to download the entire set of compiled PLCs.
Only one PLCC program can be deleted in one command. Ranges and lists of PLCC
program numbers are not permitted in this command.
To perform the same function for an uncompiled PLC program, the command sequence
would be OPEN PLC n CLEAR CLOSE.
Example DELETE PLCC 5 ; Erase compiled PLC program 5
DEL PLCC 0 ; Erase compiled PLC program 0
See Also Compiled PLCs (Writing a PLC Program)
I-variable I5
On-line commands DISABLE PLCC, ENABLE PLCC, CLEAR
DELETE ROTARY
Function Delete rotary motion program buffer of addressed coordinate system
Scope Coordinate-system specific
Syntax DELETE ROTARY
DEL ROT
Remarks This command causes PMAC to erase the rotary buffer for the currently addressed coordinate
system and frees the memory that had been allocated for it.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
the ROTARY buffer for this coordinate system is open or executing,
or if any ROTARY buffer exists for a lower numbered coordinate
system, or if a GATHER buffer exists. Any of these buffers must be
deleted first. ROTARY buffers must be defined from high-numbered
coordinate system to low-numbered coordinate system, and deleted
from low-numbered motor to high-numbered motor.
Example &2 DELETE ROTARY ; Try to erase C.S. 2’s rotary buffer
ERR003............. ; PMAC rejects this; C.S. 1 still has a rotary
&1 DELETE ROTARY ; Erase C.S. 1’s rotary buffer
&2 DELETE ROTARY ; Erase C.S. 2’s rotary buffer; OK now
See Also Rotary Program Buffers (Writing a Motion Program)
On-line commands DEFINE ROTARY, OPEN ROTARY.
DELETE TBUF
Function Delete buffer for axis transformation matrices.
Scope Global
Syntax DELETE TBUF
DEL TBUF
Remarks This command frees up the space in PMAC’s memory that was used for axis transformation
matrices. These matrices can be used for real-time translation, rotation, scaling, and
mirroring of the X, Y, and Z axes of any coordinate system.
PMAC will reject this command, reporting an ERR007 if I6=1 or 3, if any ROTARYor
GATHER buffer exists. Any of these buffers must be DELETEd first.
Example DEL TBUF
DELETE TBUF
See Also Axis Transformation Matrices (Writing a Motion Program)
On-line commands DEFINE TBUF
Program commands TSEL, ADIS, AROT, IDIS, IROT, TINIT
DELETE TCOMP
Function Erase torque compensation table
Scope Motor specific
Syntax DELETE TCOMP
DEL TCOMP
Remarks This command causes PMAC to erase the torque compensation table for the addressed motor,
freeing that memory for other use.
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if any TCOMP buffer
exists for a lower numbered motor, or if any BLCOMP, TBUF, ROTARY, or GATHER
buffer exists. Any of these buffers must be deleted first. TCOMP buffers must be defined
from high-numbered motor to low-numbered motor, and deleted from low-numbered motor
to high-numbered motor.
Example #2 DEL TCOMP ; Erase table belonging to Motor 2
ERR003............. ; PMAC rejects this command
#1 DEL TCOMP ; Erase table belonging to Motor 1
#2 DEL TCOMP ; Erase table belonging to Motor 2
See Also Torque Compensation (Setting Up a Motor)
I-variables I51
On-line command DEFINE TCOMP
DELETE TRACE
Function Formerly: Erase the motion program trace buffer.
Scope Global
Syntax DELETE TRACE
DEL TRAC
Remarks The TRACE buffer feature on PMAC has been removed. DELETE TRACE is still a valid
command and will not cause an error when sent to PMAC, but it causes no operation to be
performed.
Example CLOSE ............... ; Make sure no buffers are open
DELETE GATHER DELETE TRACE ; Free memory
OPEN PLC 17 . ; Open new buffer for entry
CLEAR ............... ; Erase contents of buffer
... ; Enter new contents here
See Also On-line commands DELETE GATHER.
DISABLE PLC
Function Pause execution of specified PLC program(s).
Scope Global
Syntax DISABLE PLC {constant}[,{constant}...]
DIS PLC {constant}[,{constant}...]
DISABLE PLC {constant}[..{constant}]
DIS PLC {constant}[..{constant}]
where:
• {constant} is an integer from 0 to 31, representing the program number
Remarks This command causes PMAC to disable (stop executing) the specified uncompiled PLC
program or programs. Execution can subsequently be resumed at the top of the program with
the ENABLE PLC command. If it is desired to restart execution at the stopped point,
execution should be stopped with the PAUSE PLC command, and restarted with the
RESUME PLC command
The on-line DISABLE PLC command can only suspend execution of a PLC program at the
end of a scan, which is either the end of the program, or after an ENDWHILE statement in the
program.
PLC programs are specified by number, and may be specified in a command singularly, in a
list (separated by commas), or in a range of consecutively numbered programs. PLC
programs can be re-enabled by using the ENABLE PLC command.
If a motion or PLC program buffer is open when this command is sent to PMAC, the
command will be entered into that buffer for later execution.
Example DISABLE PLC 1
DIS PLC 5
DIS PLC 3,4,7
DISABLE PLC 0..31
See Also I-variable I5
On-line commands ENABLE PLC, OPEN PLC, PAUSE PLC, RESUME PLC, LIST PLC,
<CONTROL-D>.
Program commands DISABLE PLC, ENABLE PLC, PAUSE PLC, RESUME PLC
DISABLE PLCC
Function Disable compiled PLC program(s).
Scope Global
Syntax DISABLE PLCC {constant}[,{constant}]
DIS PLCC {constant}[,{constant}]
DISABLE PLCC {constant}..{constant}
DIS PLCC {constant}..{constant}
where:
• {constant} is an integer from 0 to 31, representing the compiled PLC program
number
Remarks This command causes PMAC to disable (stop executing) the specified compiled PLC
program or programs. Compiled PLC programs are specified by number, and may be
specified in a command singularly, in a list (separated by commas), or in a range of
consecutively numbered programs. PLC programs can be re-enabled by using the ENABLE
PLCC command.
If a motion or PLC program buffer is open when this command is sent to PMAC, the
command will be entered into that buffer for later execution.
Example DISABLE PLCC 1
DIS PLCC 5
DIS PLCC 3,4,7
DISABLE PLCC 0..31
See Also I-variable I5
On-line commands DISABLE PLC, ENABLE PLC, ENABLE PLCC, OPEN PLC,
<CONTROL-D>.
Program commands DISABLE PLC, DISABLE PLCC, ENABLE PLC, ENABLE PLCC
EAVERSION
Function Report full specification of firmware version
Scope Global
Syntax EAVERSION
EAVER
Remarks This command causes PMAC to report the full version of the firmware version that it is
using. It always returns an 8-digit response, with the following meanings to the digits.
Digit # Meaning Settings
1 PMAC Type 0 = PMAC(1)
1 = PMAC2
2 = Ultralite PMAC
3 = PMAC2-VME
4 = Ultralite PMAC2-VME
2 Memory backup type 0 = Battery backup
1 = AMD-style flash backup
2 = Intel-style flash backup
3 Options 0 = Standard
1 = ESA
2 = Lookahead
3 = ESA + Lookahead
4 Test version 0 = Released
1 = 1st test version
2 = 2nd test version, etc.
5 Revision suffix 0 = First released version of
revision number
1 = A version
2 = B version, etc.
6–8 Released version 3-digit representation without
number decimal point (e.g. 116 for 1.16)
Example EAVERSION
01007116 ; PMAC(1), AMD-flash backup,
; Standard firmware, released,
; G revision of 1.16
EAVER
41138116 ; Ultralite PMAC2-VME, AMD-flash,
; ESA firmware, 3rd test version,
; H revision of 1.16
See Also On-line commands DATE, TYPE, VERSION
ENABLE PLC
Function Enable specified PLC program(s).
Scope Global
Syntax ENABLE PLC {constant}[,{constant}...]
ENA PLC {constant}[,{constant}...]
ENABLE PLC {constant}[..{constant}]
ENA PLC {constant}[..{constant}]
where:
• {constant} is an integer from 0 to 31, representing the program number
Remarks This command causes PMAC to enable (start executing) the specified uncompiled PLC
program or programs at the top of the program. Execution of the PLC program may have
been stopped with the DISABLE PLC, PAUSE PLC, or OPEN PLC command.
PLC programs are specified by number, and may be used singularly in this command, in a list
(separated by commas), or in a range of consecutively numbered programs.
If a motion or PLC program buffer is open when this command is sent to PMAC, the
command will be entered into that buffer for later execution.
I-variable I5 must be in the proper state to allow the PLC program(s) specified in this
command to execute.
Note:
This command must be used to start operation of a PLC program after
it has been entered or edited, because the OPEN PLC command
automatically disables the program, and CLOSE does not re-enable it.
Example ENABLE PLC 1
ENA PLC 2,7
ENABLE PLC 3,21
ENABLE PLC 0..31
This example shows the sequence of commands to download a very simple PLC program and have it
enabled automatically on the download:
OPEN PLC 7 CLEAR
P1=P1+1
CLOSE
ENABLE PLC 7
See Also I-variable I5
On-line commands DISABLE PLC, OPEN PLC, PAUSE PLC, RESUME PLC, LIST
PLC, <CONTROL-D>.
Program commands DISABLE PLC, ENABLE PLC, PAUSE PLC, RESUME PLC
ENABLE PLCC
Function Enable specified compiled PLC program(s).
Scope Global
Syntax ENABLE PLCC {constant}[,{constant}]
ENA PLCC {constant}[,{constant}]
ENABLE PLCC {constant}..{constant}
ENA PLCC {constant}..{constant}
where:
• {constant} is an integer from 0 to 31, representing the program number
Remarks This command causes PMAC to enable (start executing) the specified compiled PLC
program or programs. Compiled PLC programs are specified by number, and may be used
singularly in this command, in a list (separated by commas), or in a range of consecutively
numbered programs.
If a motion or PLC program buffer is open when this command is sent to PMAC, the
command will be entered into that buffer for later execution.
I-variable I5 must be in the proper state to allow the compiled PLC program(s) specified in
this command to execute.
GATHER
Function Begin data gathering.
Scope Global
Syntax GATHER [TRIGGER]
GAT [TRIG]
Remarks This command causes data gathering to commence according to the configuration defined in
I-variables I19-I45. If TRIGGER is not used in the command, gathering will start on the next
servo cycle. If TRIGGER is used, gathering will start on the first servo cycle after machine
input MI2 goes true.
Gathering will proceed at the frequency set by I19 (in number of servo interrupt cycles). If
I19 is 0, only one set of data will be gathered per GATHER command. If PMAC is already
gathering data, GATHER will cause resynchronization of the gathering cycle to the next servo
cycle.
Gathering will continue until PMAC receives an ENDGATHER command, or until the buffer
created by the DEFINE GATHER command is full.
This command is usually used in conjunction with the data gathering and plotting functions
of the PMAC Executive Program.
If a motion or PLC program buffer is open when this command is sent to PMAC, the
command will be entered into that buffer for later execution.
Example GAT B1R .......... Start gathering and run program 1
ENDG.................. Stop gathering – give this command when moves
........................... of interest are done
OPEN PROG2 CLEAR
X10
DWELL1000
CMD”GATHER” . Program issues start command here
X20 .................... Move of interest
DWELL50
CMD”ENDG”...... Program issues stop command here
CLOSE
See Also Data Gathering Function (Analysis Features)
I-variables I19-I45
On-line commands DEFINE GATHER, GATHER, LIST GATHER, DELETE GATHER
Gathering and Plotting (PMAC Executive Program Manual)
H
Function Perform a feedhold
Scope Coordinate-system specific
Syntax H
Remarks This causes the currently addressed coordinate system to suspend execution of the program
starting immediately by bringing its time base value to zero, decelerating along its path at a
rate defined by the coordinate system I-variable Ix95. Technically the program is still
executing after an H command, but at zero speed. This means that the motors defined in the
coordinate system cannot be moved while performing the feed hold.
To do a hold of the currently addressed coordinate system in a manner that permits jogging of
the motors in the coordinate system while in feed hold mode, refer to the \ “program hold”
command.
The H command is very similar in effect to a %0 command, except that deceleration is
controlled by Ix95, not Ix94, and execution can be resumed with an R or an S command,
instead of a %100 command. In addition, H works under external time base, whereas a %0
command does not.
Full speed execution along the path will commence again on an R or S command. The ramp
up to full speed will also take place at a rate determined by Ix95 (full time-base value, either
internally or externally set). Once the full speed is reached, Ix94 determines any time-base
changes.
See Also Stopping Commands (Making Your Application Safe)
Control-Panel Port HOLD/ Input (Connecting PMAC to the Machine)
Time-Base Control (Synchronizing PMAC to External Events)
I-variables I52, Ix93, Ix94, Ix95
On-line commands <CTRL-O>, %, %{constant}, A, K, \, Q
JPAN Connector Pin 12
HOME
Function Start Homing Search Move
Scope Motor specific
Syntax HOME
HM
Remarks This command causes the addressed motor to perform a homing search routine. The
characteristics of the homing search move are controlled by motor I-variables Ix03 and Ix19-
Ix26, plus encoder I-variables 2 and 3 for that motor’s position encoder.
The on-line home command simply starts the homing search routine. PMAC provides no
automatic indication that the search has completed (although the In-Position interrupt could
be used for this purpose) or whether the move completed successfully. Polling, or a
combination of polling and interrupts, is generally used to determine completion and success.
By contrast, when a homing search move is given in a motion program (e.g. HOME1,2), the
motion program will keep track of completion by itself as part of its sequencing algorithms.
If there is an axis offset in the axis-definition statement for the motor, and/or following error
in the motor servo loop, the reported position at the end of the homing search move will be
equal to the axis offset minus the following error, not to zero.
Example HOME.................. ; Start homing search on the addressed motor
#1HM.................. ; Start homing search on Motor 1
#3HM#4HM ; Start homing search on Motors 3 and 4
See Also Control Panel Port HOME/ Input (Connecting PMAC to the Machine)
Homing Moves (Basic Motor Moves)
I-variables Ix03, Ix19-Ix26, Encoder I-Variables 2 & 3
On-line command HOMEZ
Program command HOME{constant}, HOMEZ{constant}
JPAN Connector Pin 11
HOMEZ
Function Do a Zero-Move Homing
Scope Motor specific
Syntax HOMEZ
HMZ
Remarks This command causes the addressed motor to perform a zero-move homing search. Instead
of jogging until it finds a pre-defined trigger, and calling its position at the trigger the home
position, with this command, the motor calls wherever it is (commanded position) at the time
of the command the home position.
If there is an axis offset in the axis-definition statement for the motor, and/or following error
in the motor servo loop, the reported position at the end of the homing operation will be equal
to the axis offset minus the following error, not to zero.
Example ; On-line command examples
HOMEZ ............... ; Do zero-move homing search on the addressed motor
#1HMZ ............... ; Do zero-move homing search on Motor 1
#3HMZ#4HMZ ... ; Do zero-move homing search on Motors 3 and 4
........................... ; Buffered motion program examples
HOMEZ1
HOMEZ2,3
........................... ; On-line commands issued from PLC program
IF (P1=1)...... ;
CMD”#5HOMEZ” ; Program issues on-line command
P1=0............. ; So command is not repeatedly issued
ENDIF
See Also Homing Moves (Basic Motor Moves)
On-line command HOME
Program command HOME{constant}, HOMEZ{constant}
I{constant}
Function Report the current I-variable value(s).
Scope Global
Syntax I{constant}[..{constant}]
where:
• {constant} is an integer from 0 to 1023 representing the number of the I-variable; the
optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
Remarks This command causes PMAC to report the current value of the specified I-variable or range
of I-variables.
When is 0 or 2, only the value of the I-variable itself is returned (e.g. 10000). When I9 is 1
or 3, the entire variable value assignment statement (e.g. I130=10000) is returned by
PMAC.
When I9 is 0 or 1, the values of “address” I-variables are reported in decimal form. When I9
is 2 or 3, the values of these variables are reported in hexadecimal form.
Note:
If a motion program buffer (including a rotary buffer) is open,
I{constant} will be entered into that buffer for later execution, to
be interpreted as a full-circle move command with a vector to the
center along the X-axis (see Circular Moves in the Writing a Motion
Program section).
Example I5 ...................... ; Request the value of I5
2......................... ; PMAC responds
I130..135...... ; Request the value of I130 through I135
60000 ............... ; PMAC responds with 6 lines
5000
5000
50000
1
20000
To see the effect of I9 on the form of the response, observe the following:
I9=0 I125
49152 ............... ; Short form, decimal
I9=1 I125
I125=49152 ... ; Long form, decimal
I9=2 I125
$C000 ............... ; Short form, hexadecimal
I9=3 I125
I125=$C000 ; Long form, hexadecimal
See Also Initialization (I) Variables (Computational Features)
I-Variable Specifications
I-variable I9
On-line commands I{constant}={expression}, M{constant}, P{constant},
Q{constant}
Program commands {axis}{data}{vector}{data}, I{data}
I{constant}={expression}
Function Assign a value to an I-variable.
Scope Global
Syntax I{constant}[..{constant}]={expression}
where:
• {constant} is an integer from 0 to 1023 representing the number of the I-variable;
• the optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
• {expression} contains the value to be given to the specified I-variable(s)
Remarks This command assigns the value on the right side of the equals sign to the specified I-variable
or range of I-variables.
If a motion or PLC program buffer is open when this command is sent to PMAC, the
command will be entered into the buffer for later execution.
Example I5=2
I130=1.25*I130
I22..44=0
I102=$C003
I104=I103
J-
Function Jog Negative
Scope Motor specific
Syntax J-
Remarks This command causes the addressed motor to jog in the negative direction indefinitely.
Jogging acceleration and velocity are determined by the values of Ix19-Ix22 in force at the
time of this command.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example J- ...................... ; Jog addressed motor negative
#5J-.................. ; Jog Motor 5 negative
#3J-#4J- ; Jog Motors 3 and 4 negative
See Also Control Panel Port JOG-/ Input (Connecting PMAC to the Machine)
JPAN Connector Pin 4
Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
On-line commands J+, J/, J=, J={constant}, J:{constant}, J^{constant}
J/
Function Jog Stop
Scope Motor specific
Syntax J/
Remarks This command causes the addressed motor to stop jogging. It also restores position control if
the motor’s servo loop has been opened (enabled or killed), with the new commanded
position set equal to the actual position at the time of the J/ command. Jogging deceleration
is determined by the values of Ix19-Ix21 in force at the time of this command.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example #1J+.................. ; Jog Motor 1 positive
J/ ...................... ; Stop jogging Motor 1
O5 ...................... ; Open-loop output of 5% on Motor 1
O0 ...................... ; Open loop output of 0%
J/ ...................... ; Restore closed-loop control
K......................... ; Kill output
J/ ; Restore closed-loop control
See Also Control Panel Port JOG+/, JOG-/ Inputs (Connecting PMAC to the Machine)
JPAN Connector Pin 4, 6
Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
On-line commands <CTRL-A>, A, J+, J-, J=, J={constant}, J:{constant},
J^{constant}, K, O{constant}
J:{constant}
Function Jog Relative to Commanded Position
Scope Motor specific
Syntax J:{constant}
where:
• {constant} is a floating point value specifying the distance to jog, in counts.
Remarks This command causes a motor to jog the distance specified by {constant} relative to the
present commanded position. Jogging acceleration and velocity are determined by the values of
Ix19-Ix22 in force at the time of this command. Compare to J^{constant}, which is a jog
relative to the present actual position. A variable incremental jog command can be executed with
the J:* command. PMAC will reject this command if the motor is in a coordinate system that is
currently running a motion program (reporting ERR001 if I6 is 1 or 3).
Example #1HM.................. ; Do homing search move on Motor 1
J:2000............. ; Jog a distance of 2000 counts (to 2000 counts)
J:2000 ; Jog a distance of 2000 counts (to 4000 counts)
See Also Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
On-line commands J+, J-, J/, J=, J={constant}, J^{constant}
J:*
Function Jog to specified variable distance from present commanded position
Scope Motor specific
Syntax J:*
Remarks This command causes the addressed motor to jog the distance specified in the motor’s
variable jog position/distance register relative to the present commanded position. Jogging
acceleration and velocity are determined by the values of Ix19-Ix22 in force at the time of
this command. Compare to J^* , which is a jog relative to the present actual position.
The variable jog position/distance register is a floating-point register with units of counts. It
is best accessed with a floating-point M-variable. The register is located at PMAC address
L:$082B for motor 1, L:$08EB for motor 2, etc. (suggested M-variable Mx72) The usual
procedure is to write the destination position to this register by assigning a value to the M-
variable, then issuing the J:* command.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example M172->L:$082B ; Define #1 variable jog position/distance reg.
#1HMZ ............... ; Declare present position to be zero
M172=3000...... ; Assign distance value to register
#1J:* ............... ; Jog Motor 1 this distance; end cmd. pos. will be 3000
#1J:* ............... ; Jog Motor 1 this distance; end cmd. pos. will be 6000
M172=P1*SIN(P2) ; Assign new distance value to register
#1J:* ............... ; Jog Motor 1 this distance
#1J= ; Return to prejog target position
See Also Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
Memory map registers L:$082B, L:$08EB, etc.
Suggested M-variable definitions M172, M272, etc.
On-line commands J=, J={constant}, J=*, J^*
J=
Function Jog to Prejog Position
Scope Motor specific
Syntax J=
Remarks This command causes the addressed motor to jog to the last pre-jog and pre-handwheel-move
position (the most recent programmed position). Jogging acceleration and velocity are
determined by the values of Ix19-Ix22 in force at the time of this command.
The register containing this position information for the motor is called the target position
register (D:$080B for Motor 1, D:$08CB for Motor 2, etc.). Suggested M-variable
definitions M163, M263, etc. can be used in programs to give access to these registers.
If the / or \ stop command has been used to suspend program execution, and one or more
motors jogged away from the stop position, the J= command must be used to return the
motor(s) back to the stop position before program execution can be resumed.
The J= command can also be useful if a program has been aborted in the middle of a move,
because it will move the motor to the programmed move end position (provided I13=0 so
PMAC is not in segmentation mode), so the program may be resumed properly from that
point.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example &1Q .................... ; Stop motion program at end of move
#1J+.................. ; Jog Motor 1 away from this position
J/ ...................... ; Stop jogging
J= ...................... ; Jog back to position where program quit
R......................... ; Resume motion program
&1A .................... ; Stop motion program in middle of move
#1J=#2J=#3J= ; Move all motors to original move end position
R ; Resume motion program
See Also Control Panel Port PREJ/ Input (Connecting PMAC to the Machine)
JPAN Connector Pin 7
Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
On-line commands J+, J-, J/, J={constant}, J:{constant}, J^{constant}
J={constant}
Function Jog to specified position
Scope Motor specific
Syntax J={constant}
where:
• {constant} is a floating point value specifying the location to which to jog, in encoder
counts.
Remarks This command causes the addressed motor to jog to the position specified by {constant}.
Jogging acceleration and velocity are determined by the values of Ix19-Ix22 in force at the
time of this command.
J=={constant}
Function Jog to specified motor position and make that position the “pre-jog” position
Scope Motor specific
Syntax J=={constant}
where:
• {constant} is a floating point value specifying the location to which to jog, in encoder
counts.
Remarks This command causes the addressed motor to jog the position specified by {constant}. It
also makes this position the pre-jog position, so it will be the destination of subsequent J=
commands. Jogging acceleration and velocity are determined by the values of Ix19-Ix22 in
force at the time of this command.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example #1J==10000 . ; Jog Motor 1 to 10000 counts and make that the pre-jog
........................... ; position.
J+ ...................... ; Jog indefinitely in the positive direction
J= ; Return to 10000 counts
See Also Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
On-line commands J=, J={constant}, J=*, J^*
J^{constant}
Function Jog Relative to Actual Position
Scope Motor specific
Syntax J^{constant}
where:
• {constant} is a floating point value specifying the distance to jog, in counts.
Remarks This causes a motor to jog the distance specified by {constant} relative to the present
actual position. Jogging acceleration and velocity are determined by the values of Ix19-Ix22
in force at the time of this command. Compare to J:{constant}, which is a jog relative
to the present commanded position.
Usually the J:{constant} command is more useful, because its destination is not
dependent on the following error at the instant of the command. The J^0 command can be
useful for “swallowing” any existing following error.
A variable incremental jog can be executed with the J^* command.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example #1HM.................. ; Do homing search move on Motor 1
J^2000............. ; Jog a distance of 2000 counts from actual position
........................... ; If actual was -5 cts, new command pos is 1995 cts
J^2000............. ; Jog a distance of 2000 counts from actual position
; If actual was 1992 cts, new cmd pos is 3992 cts
See Also Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
On-line commands J+, J-, J/, J=, J={constant}, J:{constant}, J=*, J:*, J^*
J^*
Function Jog to specified variable distance from present actual position
Scope Motor specific
Syntax J^*
Remarks This command causes the addressed motor to jog the distance specified in the motor’s
variable jog position/distance register relative to the present actual position. Jogging
acceleration and velocity are determined by the values of Ix19-Ix22 in force at the time of
this command. Compare to J:* , which is a jog relative to the present commanded position.
The variable jog position/distance register is a floating-point register with units of counts. It
is best accessed with a floating-point M-variable. The register is located at PMAC address
L:$082B for motor 1, L:$08EB for motor 2, etc. (suggested M-variable Mx72).The usual
procedure is to write the destination position to this register by assigning a value to the M-
variable, then issuing the J^* command.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example M172->L:$082B ; Define #1 variable jog position/distance reg.
#1HMZ ............... ; Declare present position to be zero
M172=3000...... ; Assign distance value to register
#1J^* ............... ; Jog Motor 1 this distance; if following error at
........................... ; command was 3, end cmd. pos. will be 2997
#1J^* ............... ; Jog Motor 1 this distance; if following error at
........................... ; command was 2, end cmd. pos. will be 5995
M172=P1*SIN(P2) ; Assign new distance value to register
#1J^* ............... ; Jog Motor 1 this distance
#1J= ; Return to prejog target position
See Also Jogging Moves (Basic Motor Moves)
I-variables Ix19-Ix22
Memory map registers L:$082B, L:$08EB, etc.
Suggested M-variable definitions M172, M272, etc.
On-line commands J=, J={constant}, J=*, J^*
{jog command}^{constant}
Function Jog until trigger
Scope Motor specific
Syntax J=^{constant}
J={constant}^{constant}
J:{constant}^{constant}
J^{constant}^{constant}
J=*^{constant}
J:*^{constant}
J^*^{constant}
where:
• {constant} after the ^ is a floating point value specifying the distance from the trigger
to which to jog after the trigger is found, in encoder counts
Remarks This command format permits a jog-until-trigger function. When the ^{constant}
structure is added to any definite jog command, the jog move can be interrupted by a pre-
defined trigger condition, and the motor will move to a point relative to the trigger position as
specified by the final value in the command.
The indefinite jog commands J+ and J- cannot be turned into jog-until-trigger moves.
Jog-until-trigger moves are very similar to homing search moves, except they have a definite
end position in the absence of a trigger, and they do not change the motor zero position. In
the absence of a trigger, the move will simply stop at the pre-defined position.
The trigger condition for a jog-until-trigger move can be either an input flag, or a warning
following error condition for the motor. If bit 17 of Ix03 is 0 (the default), the trigger is a
transition of an input flag and/or encoder index channel from the set defined for the motor by
Ix25. Encoder/flag variables 2 and 3 (e.g. I912 and I913) define which edges of which input
signals create the trigger.
If bit 17 of Ix03 is 1, the trigger is the warning following error status bit of the motor
becoming true. Ix12 for the motor sets the error threshold for this condition.
The trigger position can either be the hardware-captured position, or a software-read position.
If bit 16 of Ix03 is 0 (the default), the encoder position latched by the trigger in PMAC’s
DSPGATE hardware is used as the trigger position. This is the most accurate option because
it uses the position at the moment of the trigger, but it can only be used with incremental
encoder feedback brought in on the same channel number as the triggering flag set. This
option cannot be used for other types of feedback, or for triggering on following error.
If bit 16 of Ix03 is 1, PMAC reads the present sensor position after it sees the trigger. This
can be used with any type of feedback and either trigger condition, but can be less accurate
than the hardware capture because of software delays.
Jogging acceleration and velocity are determined by the values of Ix19-Ix22 in force at the
time of this command.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example #1J=^1000 .. ; Jog to pre-jog position in the absence of a trigger, but if trigger
........................... ; is found, jog to +1000 counts from trigger.
#2J:5000^-100 ; Jog 5000 counts in the positive direction in the absence of a
........................... ; trigger, but if trigger is found, jog to -100 counts from
........................... ; trigger position.
#3J=20000^0 . ; Jog to 20000 counts in the absence of a trigger, but if
; trigger is found, return to trigger position.
See Also Jogging Moves (Basic Motor Moves)
I-variables Ix03, Ix19-Ix22, Ix25, Encoder/Flag I-variables 2 and 3
On-line commands J=, J={constant}, J:{constant}, J^{constant},
..........................J=*, J:*, J^*
Program commands {axis}{data}^{data}
K
Function Kill motor output
Scope Motor specific
Syntax K
Remarks This command causes PMAC to kill the outputs for the addressed motor. The servo loop is
disabled, the DAC outputs are set to zero (Ix29 and/or Ix79 offsets are still in effect), and the
AENA output for the motor is taken to the disable state (polarity is determined by E17).
Closed-loop control of this motor can be resumed with a J command. The A command will
re-establish closed-loop control for all motors in the addressed coordinate system, and the
<CTRL-A> command will do so for all motors on PMAC.
The action on a K command is equivalent to what PMAC does automatically to the motor on
an amplifier fault or a fatal following error fault.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3). The program must be stopped
first, usually with an A command. However, the global <CTRL-K> command will kill all
motors immediately, regardless of whether any are running motion programs.
Example K......................... ; Kill the addressed motor
#1K .................... ; Kill Motor 1
J/ ; Re-establish closed-loop control of Motor 1
See Also Amplifier Fault, Following Error Limits, Stop Commands (Making Your Application Safe)
I-variables Ix29, Ix79
On-line commands <CTRL-A>, <CTRL-K>, A, Q, H, J/
Jumpers E17, E17A-E17H
LEARN
Function Learn present commanded position
Scope Coordinate-system specific
Syntax LEARN[({axis}[,{axis}...]]
LRN[({axis}[,{axis}...]]
Note:
No spaces are permitted in this command.
Remarks This command causes PMAC to add a line to the end of the open motion program buffer
containing axis position commands equal to the current commanded positions for some or all
of the motors defined in the addressed coordinate system. In this way, PMAC can “learn” a
sequence of points to be repeated by subsequent execution of the motion program.
PMAC effectively performs a PMATCH function, reading motor commanded positions and
inverting the axis definition equations to compute axis positions.
If axis names are specified in the LEARN command, only position commands for those axes
are used in the line added to the motion program. If no axis names are specified in the learn
command, position commands for all nine possible axis names are used in the line added to
the motion program. The position command for an axis with no motor attached (“phantom”
axis) will be zero.
Note:
If a motor is closed loop, the learned position will differ from the
actual position by the amount of the position following error because
commanded position is used. If a motor is open-loop or killed, PMAC
automatically sets motor commanded position equal to motor actual
position, so the LEARN function can be used regardless of the state of
the motor.
Example &1 ......... ; Address coordinate system 1
#1->10000X . ; Define motor 1 in C.S. 1
#2->10000Y ... ; Define motor 2 in C.S. 1
OPEN PROG 1 CLEAR ; Prepare program buffer for entry
F10 TA200 TS50 ; Enter required non-move commands
{Move motors to a position, e.g. #1 to 13450 commanded, #2 to 29317 commanded}
LEARN(X,Y) ... ; Tell PMAC to learn these positions
X1.345 Y2.9317 ; This is the line that PMAC adds to PROG 1
{move motors to new position, e.g. #1 to 16752 cmd., #2 to 34726 cmd}
LEARN ............... ; Tell PMAC to learn positions
A0 B0 C0 U0 V0 W0 X1.6752 Y3.4726 Z0
; PMAC adds positions for all axes to PROG 1
See Also Learning a Motion Program (Writing a Motion Program)
On-line command PMATCH
LIST
Function List the contents of the currently opened buffer
Scope Global
Syntax LIST
Remarks This command causes PMAC to report the contents of the currently opened buffer (PLC,
PROG, or ROT) to the host. If no buffer is open, PMAC will report an error (ERR003 if I6=1
or 3). Note that what is reported will not include any OPEN, CLEAR, or CLOSE statements
(since these are not program commands).
You can list an unopened buffer by specifying the buffer name in the list command (e.g.
LIST PROG 1). See further LIST commands, below.
Example OPEN PROG 1 ; Open buffer for entry
LIST ....... ; Request listing of open buffer
LINEAR ..... ; PMAC reports contents of open buffer
F10
X20 Y20
X0 Y0
RETURN
CLOSE ...... ; Close buffer
LIST ....... ; Request listing of open buffer
<BELL>ERR003 ; PMAC reports error because no open buffer
See Also On-line commands OPEN, CLOSE, LIST PLC, LIST PROGRAM
LIST BLCOMP
Function List contents of addressed motor’s backlash compensation table
Scope Motor specific
Syntax LIST BLCOMP
Remarks This command causes PMAC to report to the host the contents of the backlash compensation
table belonging to the addressed motor. The values are reported in decimal ASCII form,
multiple values to a line, with individual values separated by spaces.
The LIST BLCOMP DEF command should be used to report the header information for this
table.
If there is no table for the addressed motor, PMAC will reject the command (reporting
ERR003 if I6=1 or 3).
Example LIST BLCOMP . ; Request contents of backlash comp table
9 17 -3 6 35 87 65 24 18 -9 -16 -34 ; PMAC responds
-7 12 -3 -8 32 44 16 0 -20 -5 0 ; Continued response
See Also Backlash Compensation Tables (Setting Up a Motor)
On-line commands DEFINE BLCOMP, DELETE BLCOMP, LIST BLCOMP DEF
LIST BLCOMP DEF
Function List definition of addressed motor’s backlash compensation table
Scope Motor specific
Syntax LIST BLCOMP DEF
Remarks This command causes PMAC to report to the host the definition of the backlash
compensation table that belongs to the addressed motor. The definition reported consists of
the two items established in the DEFINE BLCOMP command that set up the motor:
1. The number of entries in the table;
2. The span of the table in counts of the motor.
If there is no table for the addressed motor, PMAC will reject the command (reporting
ERR003 if I6=1 or 3).
Example LIST BLCOMP DEF ; Request def of addressed motor backlash comp table
100,100000 . ; PMAC responds; 100 entries in table,
........................... ; span is 100,000 counts
See Also Backlash Compensation Tables (Setting Up a Motor)
On-line commands DEFINE BLCOMP, DELETE BLCOMP, LIST BLCOMP
LIST COMP
Function List contents of addressed motor’s compensation table
Scope Motor specific
Syntax LIST COMP
Remarks This command causes PMAC to report to the host the contents of the compensation table
belonging to the addressed motor. The values are reported in decimal ASCII form, multiple
values to a line, with individual values separated by spaces.
The LIST COMP DEF command should be used to report the header information for this
table.
If there is no table for the addressed motor, PMAC will reject the command (reporting
ERR003 if I6=1 or 3).
The compensation table “belonging” to this motor may not affect this motor’s position or be
affected by it
Example LIST COMP...... ; Request contents of compensation table
9 17 -3 6 35 87 65 24 18 -9 -16 -34 ; PMAC responds
-7 12 -3 -8 32 44 16 0 -20 -5 0 ; Continued response
See Also Leadscrew Compensation Tables (Setting Up a Motor)
On-line commands DEFINE COMP, DELETE COMP, LIST COMP DEF
LIST COMP DEF
Function List definition of addressed motor’s compensation table
Scope Motor specific
Syntax LIST COMP DEF
Remarks This command causes PMAC to report to the host the definition of the compensation table
that belongs to the addressed motor. The definition reported consists of the four items
established in the DEFINE COMP command that set up the motor (even if some of those
items were not specified explicitly):
1. The number of entries in the table (number of rows and number of columns for a two-
dimensional table)
2. The number of the motor whose position provides the source data for the table (both
source motors for a two-dimensional table)
3. The number of the motor whose position is modified by the table
4. The span of the table in counts of the source motor (in both dimensions for a two-
dimensional table)
Note:
If there is no table for the addressed motor, PMAC will reject the
command (reporting ERR003 if I6=1 or 3).
Note:
The compensation table “belonging” to this motor may not affect this
motor’s position or be affected by it
Example LIST COMP DEF ; Request definition of compensation table
100,#2,#2,100000 ; PMAC responds; 100 entries in table,
........................... ; Motor 2 is source and target, span is 100,000
........................... ; counts
#3 LIST COMP DEF ; Request def of comp table belonging to Motor 3
10,20,#4,#5,#6,50000,100000 ; PMAC responds
........................... ; A 2D 10x20 table, span of 50Kx100K counts
; #4 & #5 as source, #6 as target
See Also Leadscrew Compensation Tables (Setting Up a Motor)
On-line commands DEFINE COMP, DELETE COMP, LIST COMP
LIST GATHER
Function Report contents of the data gathering buffer.
Scope Global
Syntax LIST GATHER [{start}] [,{length}]
LIS GAT [{start}] [,{length}]
where:
• The optional {start} parameter is an integer constant specifying the distance from the
start of the buffer (in words of memory) to begin the listing (0 is the default);
• The optional {length} parameter (after a comma) is an integer constant specifying the
number of words of the buffer to be sent to the host (to the end of the buffer is the
default)
Remarks This command causes PMAC to report the contents of the data-gathering buffer to the host.
The data is reported as 48-bit long words in hexadecimal format (12 characters per word)
separated by spaces, 16 long words per line.
If neither {start} nor {length} is specified, the entire contents of the buffer will be
reported. If {start} is specified, the reporting will begin {start} words from the
beginning of the buffer. If {length} is specified, the reporting will continue for
{length} words from the starting point.
Example LIST GATHER . ; reports the whole buffer
LIST GATHER 256 ; skips the first 256 long words
LIST GATHER 0,32 ; reports the first 32 words
LIST GATHER ,32 ; does the same as above
LIST GATHER 64,128 ; skips the first 64 words, reports the next 128
See Also Data Gathering Function (Analysis Features)
I-variables I19, I20, I21-I44.
On-line commands GATHER, ENDGATHER, DEFINE GATHER
Gathering and Plotting (PMAC Executive Program Manual)
LIST LINK
Function List Linking Addresses of Internal PMAC Routines
Scope Global
Syntax LIST LINK
Remarks This command causes PMAC to list the addresses of the internal routines that the PLC cross-
compiler needs to properly compile and link its programs.
This command is used automatically by the PLC cross-compiler in the Executive program.
For the standalone DOS cross-compiler, the ASCII characters of PMAC’s response to this
command must be contained in a file named LISTLINK.TXT in the same directory and
subdirectory as the cross-compiler. Each separate version of PMAC’s firmware potentially
has different addresses for these routines, so a new LISTLINK.TXT file must be created any
time the PMAC firmware is updated, even for a minor change such as from V1.15A to
V1.15B.
Example LIST LINK...... ; Request linking addresses
004532 004A97 005619 005F21 0062FE 0063A4 ; PMAC responds
See Also Compiled PLCs (Writing a PLC Program)
LIST PC
Function List Program at Program Counter
Scope Coordinate-system specific
Syntax LIST PC[,[{constant}]]
where:
• {constant} is a positive integer representing the number of words in the program to
be listed
Remarks This command causes PMAC to list the program line(s) that it is (are) about to calculate in
the addressed coordinate system, with the first line preceded by the program number and
each line preceded by the address offset. LIST PC just lists the next line to be calculated.
LIST PC, lists from the next line to be calculated to the end of the program. LIST
PC,{constant} lists the specified address range size starting at the next line to be
calculated. To see the current line of execution, use the LIST PE command.
Because PMAC calculates ahead in a continuous sequence of moves, the LIST PC
(Program Calculation) command will in general return a program line further down in the
program than LIST PE will.
If the coordinate system is not pointing to any motion program, PMAC will return an error
(ERR003 if I6=1 or 3). Initially the pointing must be done with the B{constant}
command.
Example LIST PC .......... ; List next line to be calculated
P1:22:X10Y20 ; PMAC responds
LIST PC,4...... ; List next four words of program to be calculated
P1:22:X10Y20 ; PMAC responds
24:X15Y30
LIST PC, ........ ; List rest of program
P1:22:X10Y20 ; PMAC responds
24:X15Y30
26:M1=0
28:RETURN
See Also On-line commands B{constant}, LIST, PC, LIST PE, PE
LIST PE
Function List Program at Program Execution
Scope Coordinate-system specific
Syntax LIST PE[,[{constant}]]
where:
• {constant} is a positive integer representing the number of words in the program to
be listed
Remarks This command causes PMAC to list the program line(s) starting with the line containing the
move that it is currently executing in the addressed coordinate system, with the first line
preceded by the program number, and each line preceded by the address offset.
Remarks This command causes PMAC to report the contents of the specified uncompiled PLC
program buffer to the host. The contents are reported in ASCII text form. If I9 is 0 or 2, the
contents are reported in short form (e.g. ENDW). If I9 is 1 or 3, the contents are reported in
long form (e.g. ENDWHILE).
If neither {start} nor {length} is specified, the entire contents of the buffer will be
reported. If {start} is specified, the reporting will begin {start} words from the
beginning of the buffer. If {length} is specified, the reporting will continue for
{length} words from the starting point.
If the first comma is present, but no start point is specified, the listing will start from the next
line to be executed in the PLC program. Because PMAC can only execute this command
between PLC scans, this line will be the first to execute in the next scan. If the second
comma is present, but no length is specified, the listing will continue to the end of the
program.
If either {start}, {length}, or both, or just the comma, is included in the command, the
listing of the program will include the buffer address offsets with each line.
PLCs 0-15 can be protected by password. If the PLC is protected by password, and the
proper password has not been given, PMAC will reject this command (reporting an ERR002
if I6=1 or 3).
Example LIST PLC 5
P1=0
WHILE (P1<1000)
P1=P1+1
ENDWHILE
RETURN
LIST PLC 5,0
0:P1=0
1:WHILE(P1<1000)
3:P1=P1+1
6:ENDWHILE
7:RETURN
LIST PLC 5,,1
1:WHILE(P1<1000)
LIST PLC 5,,
1:WHILE(P1<1000)
3:P1=P1+1
6:ENDWHILE
7:RETURN
See Also PLC Program Features
I-variables I3, I4, I9
On-line commands LIST, LIST PROG, PASSWORD={string}
Program Command Specification
LIST PROGRAM
Function List the contents of the specified motion program.
Scope Global
Syntax LIST PROGRAM {constant} [,[{start}]] [,[{length}]]
LIST PROG {constant} [,[{start}]] [,[{length}]]
where:
• {constant} is an integer from 1 to 32767 specifying the number of the motion
program
• the optional {start} parameter is an integer constant specifying the distance from the
start of the buffer (in words of memory) to begin the listing (0 is the default);
• the optional {length} parameter (after a comma) is an integer constant specifying the
number of words of the buffer to be sent to the host (to the end of the buffer is the
default)
Remarks This command causes PMAC to report the contents of the specified fixed motion program
buffer (PROG) to the host. The contents are reported in ASCII text form. If I9 is 0 or 2, the
contents are reported in short form (e.g. LIN). If I9 is 1 or 3, the contents are reported in
long form (e.g. LINEAR).
If neither {start} nor {length} is specified, the entire contents of the buffer will be
reported. If {start} is specified, the reporting will begin {start} words from the
beginning of the buffer. If {length} is specified, the reporting will continue for
{length} words from the starting point.
If either {start}, {length}, or both, or just the comma, is included in the command, the
listing of the program will include the buffer address offsets with each line. Having a listing
with these offsets can be useful in conjunction with later use of the PC (Program-Counter)
and LIST PC commands.
If the motion program requested by this command does not exist in PMAC, PMAC will reject
this command (reporting an ERR003 if I6=1 or 3).
PROGs 1000-32767 can be protected by password. If the PROG is protected by password,
and the proper password has not been given, PMAC will reject this command (reporting an
ERR002 if I6=1 or 3).
Example LIST PROG 9 ; Request listing of all of motion program 9
LINEAR ..... ; PMAC responds
F10
X10Y10
X0Y0
RETURN
LIST PROG 9, ; Request listing of program w/ address offsets
0:LINEAR
1:F10
2:X10Y10 ... ; Note that a 2-axis command takes 2 addresses
4:X0Y0
6:RETURN
LIST PROG 9,4 ; Request listing starting at address 4
4:X0Y0
6:RETURN
LIST PROG 9,2,4 ; Request listing starting at 2, 4 words long
2:X10Y10
4:X0Y0
LIST PROG 9,,2 ; Request listing starting at top, 2 words long
0:LINEAR
1:F10
See Also Writing a Motion Program
I-variables I3, I4, I9
On-line commands LIST, PC, LIST PC., PASSWORD={string}.
Program Command Specification
LIST ROTARY
Function List contents of addressed coordinate system’s rotary program buffer
Scope Coordinate-system specific
Syntax LIST ROTARY [{start}] [,{length}]
LIST ROT [{start}] [,{length}]
where:
• the optional {start} parameter is an integer constant specifying the distance from the
start of the buffer (in words of memory) to begin the listing (0 is the default);
• the optional {length} parameter (after a comma) is an integer constant specifying the
number of words of the buffer to be sent to the host (to the end of the buffer is the
default)
Remarks This command causes PMAC to report the contents of the rotary motion program buffer for
the addressed coordinate system to the host. The contents are reported in ASCII text form. If
I9 is 0 or 2, the contents are reported in short form (e.g. LIN). If I9 is 1 or 3, the contents are
reported in long form (e.g. LINEAR).
If neither {start} nor {length} is specified, the entire contents of the buffer will be
reported. If {start} is specified, the reporting will begin {start} words from the
beginning of the buffer. If {length} is specified, the reporting will continue for
{length} words from the starting point.
If either {start}, {length}, or both, or just the comma, is included in the command, the
listing of the program will include the buffer address offsets with each line. Having a listing
with these offsets can be useful in conjunction with later use of the PC (Program-Counter)
and LIST PC commands.
If the loading of the rotary buffer has caused the buffer to “wrap around” and re-use the
beginning of the buffer, the listing will start relative to this new top of the buffer (even if
there are previously loaded, and still unexecuted, lines at the bottom of the buffer).
See Also Writing a Motion Program
I-variables I3, I4, I9
On-line commands LIST, PC, LIST PE,
Program Command Specification
LIST TCOMP
Function List contents of addressed motor’s torque compensation table
Scope Motor specific
Syntax LIST TCOMP
Remarks This command causes PMAC to report to the host the contents of the torque compensation
table belonging to the addressed motor. The values are reported in decimal ASCII form,
multiple values to a line, with individual values separated by spaces.
The LIST TCOMP DEF command should be used to report the header information for this
table.
If there is no table for the addressed motor, PMAC will reject the command (reporting
ERR003 if I6=1 or 3).
Example LIST TCOMP ... ; Request contents of backlash comp table
9 17 -3 6 35 87 65 24 18 -9 -16 -34 ; PMAC responds
-7 12 -3 -8 32 44 16 0 -20 -5 0 ; Continued response
See Also Backlash Compensation Tables (Setting Up a Motor)
On-line commands DEFINE TCOMP, DELETE TCOMP, LIST TCOMP DEF
LIST TCOMP DEF
Function List definition of addressed motor’s torque compensation table
Scope Motor specific
Syntax LIST TCOMP DEF
Remarks This command causes PMAC to report to the host the definition of the backlash
compensation table that belongs to the addressed motor. The definition reported consists of
the two items established in the DEFINE TCOMP command that set up the motor:
Remarks This command assigns the value on the right side of the equals sign to the specified M-
variable(s). It does not assign a definition (address) to the M-variable(s); that is done with
the M{constant}->{definition command.
If a motion or PLC program buffer is open when this command is sent to PMAC, it will be
entered into the buffer for later execution.
Example M1=1
M9=M9 & $20
M102=-16384
M1..8=0
See Also M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->{definition}
Program commands M{constant}, M{constant}={expression}
M{constant}->
Function Report current M-variable definition(s)
Scope Global
Syntax M{constant}[..{constant}]->
where:
• {constant} is an integer from 0 to 1023 representing the number of the M-variable;
• the optional second {constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
Note:
No spaces are permitted between the M-variable name and the
“arrow” double character in this command.
Remarks This command causes PMAC to report the definition (address) of the specified M-variable or
range of M-variables. It does not cause PMAC to report the value of the M-variable{s); that
is done with the M{constant} command.
When I9 is 0 or 2, only the definition itself (e.g. Y:$FFC2,0) is returned. When I9 is 1or 3,
the entire definition statement (e.g. M11->Y:$FFC2,0) is returned.
Example M1->.................. ; Host requests definition
Y:$FFC2,8...... ; PMAC’s response
M101..103->
X:$C001,24,S
Y:$C003,8,16,S
X:$C003,24,S
See Also M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->{definition},
M{constant}={expression}
Program command M{constant}={expression}
M{constant} ->*
Function Self-Referenced M-Variable Definition
Scope Global
Syntax M{constant}[..{constant}]->*
where:
• {constant} is an integer from 0 to 1023 representing the number of the M-variable;
Note:
No spaces are permitted between the M-variable name and the arrow
double character in this command.
Remarks This command causes PMAC to define the specified M-variable or range of M-variables to a
48-bit double word (both X and Y memory; X more significant) at the specified location in
PMAC’s address space. The data is interpreted as a fixed-point signed (two’s complement)
integer.
The definition consists of the letter D, an optional colon (:), and the word address.
Memory locations for which this format is useful are labeled with D: in the memory map.
Example M161->D:$0028 ; Motor 1 desired position register specified in hex
Example M165->L:$081F
M265->L$0820
M265->L2080
See Also M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->,
..........M{constant}->D:{address}, M{constant}={expression}
Program command M{constant}={expression}
M{constant}->TWB:{multiplex address}
Function Binary Thumbwheel-Multiplexer Definition
Scope Global
Syntax M{constant}[..{constant}]->TWB[:]{multiplex
address},{offset},{size},{format}
where:
• {constant} is an integer from 0 to 1023 representing the number of the M-variable;
• the optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
• {multiplex address} is an integer constant in the range 0 to 255, representing the
byte address in the multiplexing scheme on the thumbwheel port of the least significant
bit to be used in the M-variable(s);
• {offset} is an integer constant from 0 to 7, representing which bit of this byte is the
least significant bit to be used in the M-variable;
• {size} is an integer constant from 1 to 32, representing the number of consecutive bits
to be used in the M-variable(s);
• {format} (optional) is either U for unsigned, or S for signed (two’s complement). If
no format is specified, U (unsigned) is assumed
Note:
No spaces are permitted between the M-variable name and the
“arrow” double character in this command.
Remarks This command causes PMAC to define the specified M-variable or range of M-variables to a
consecutive of input bits multiplexed on the thumbwheel port with Accessory 18 or
compatible hardware.
Example M0->TWB:0,0,1
M1->TWB:0,1,1
M10->TWB:3,4,4,U
M745->TWB:4,0,16,S
M872->TWB:0,4,1
See Also M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->,
..........M{constant}->TWD:{address}
Thumbwheel Multiplexer Board (ACC-18) Manual
M{constant}->TWD:{address}
Function BCD Thumbwheel-Multiplexer M-Variable Definition
Scope Global
Syntax M{constant}[..{constant}]->TWD[:]{multiplex
address},{offset},{size}[.{dp}],{format}
where:
• {constant} is an integer from 0 to 1023 representing the number of the M-variable;
• the optional second {constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
• {multiplex address} is an integer constant in the range 0 to 255, representing the
address in the multiplexing scheme on the thumbwheel port of the most significant digit
(lowest address) to be used in the M-variable(s);
• {offset} is 0 or 4, representing whether the most significant digit is in the low nibble
(left digit of pair) or high nibble (right digit of pair) of the pair of digits at {multiplex
address}, respectively;
• {size} is an integer constant from 1 to 12, representing the number of digits to be used
in the M-variable(s);
• {dp} (optional) is an integer constant from 0 to 8, representing the number of these
digits to be interpreted as being to the right of the decimal point;
• {format} (optional) is either U for unsigned, or S for signed. If it is signed, the least
significant bit of the most significant digit is taken as the sign bit (the rest of the most
significant digit is ignored). If no format is specified, U (unsigned) is assumed.
Note:
No spaces are permitted between the M-variable name and the arrow
double character in this command.
Remarks This command causes PMAC to define the specified M-variable or range of M-variables to
point to a set of binary-coded-decimal digits multiplexed on the thumbwheel port with
Accessory 18 or compatible hardware.
M{constant}->TWS:{address}
Function Serial Thumbwheel-Multiplexer M-Variable Definition
Scope Global
Syntax M{constant}[..{constant}]->TWS[:]{multiplex address}
where:
• {constant} is an integer from 0 to 1023 representing the number of the M-variable;
• the optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
• {multiplex address} is an integer constant, divisible by 4, in the range 0 to 124,
representing the address in the multiplexing scheme of the first of four bytes in the 32-bit
In this situation, any accidental read of an output port (say via the Executive programs watch
window) will cause all the output transistors to be turned off (outputs pulled to the supply
voltage)! Alternatively, writing to an input port, will automatically reconfigure it to an output
port! It is therefore safer and more predictable when bits 0 & 1 of the M-variable definition
are intentionally used to disable either the read function or the write function. Setting one of
these bits gives the read-only or write-only form of the TWS M-variable.
An M-variable pointing to an input port is defined as read-only by setting the {multiplex
address} to a legal byte number (from column 2 of Table 1 of the Acc 34x manual) plus 1.
Any attempt to write to a TWS type M-variable defined in this manner (with bit zero of its
address set to 1) is automatically prevented by PMAC firmware. For an output port, the
{multiplex address} should be a legal byte number (from column 2 of Table 1 of the
Acc 34x manual) plus 2. Any attempt to read a TWS type M-variable defined in this manner
(with bit one of its address set to 1) returns zero and the actual read is prevented by PMAC
firmware.
Because you can not directly access the individual bits of the “thumbwheel port on an
Accessory 34x board and because of the relatively long time it takes to clock the data in or
out of PMAC (A 32-bit Read or a 32-bit Write to an individual port takes approximately 64
microseconds of time in the PMAC’s background time slot) it is best to keep an “image” of
each M-variable of this type in internal memory. The image variable would preferably be a
32-bit or 48-bit fixed point M-variable, but it could also be a 48-bit floating point P or Q
variable.
The best procedure for using TWS M-variables in a program is as follows. The input word
(TWS M-variable) should be copied into its image variable at the beginning of a sequence of
operations. The operations can then be done on the image variable without requiring PMAC
to actually read or write to the I/O port for each operation. The output word is first
“assembled” into its image variable, and then copied to the actual output word once at the
end of a sequence of operations. This procedure will allow the most efficient and flexible use
of TWS M-variables.
This type of variable can only be used in background tasks (PLCs and PLCCs 1-31). They
cannot be used in foreground tasks (motion programs and PLC and PLCC 0).
Example To address Port B of board #1 as an output using M101, use the following definition. This
addressing format is not recommended because accidental reads of the port are not protected
against (Consider using the write-only format).
M100->TWS:4 ;Port B (BIO 0-31) of an ACC-34x with SW1 switches all on
;not assigned for write-only
To address Port B as above using the write-only addressing format, use the following
definition:
M100->TWS:6 ;Port B (BIO 0-31) of an ACC-34x with SW1 switches all ON
;assigned for write-only (6=4+2)
To address Port A of board #1 as an input using M99, use the following definition. This
addressing format is not recommended because accidental writing to the port is not protected
against (Consider using the read-only format).
M99->TWS:0 ;Port A (AIO 0-31) of an ACC-34x with SW1 switches all on
; not assigned for read-only
To address Port A as above using the read-only addressing format, use the following
definition:
M100->TWS:1 ;Port A (AIO 0-31) of an ACC-34x with SW1 switches all on
;assigned for read-only (1=0+1)
Yet another example: to address Port A of board #6 as an input using M300, we would use
the following definition:
M300->TWS:41 ;Port A (AIO 0-31) of an ACC-34x with SW1 switches
; ON, ON, OFF, ON, ON assigned for read-only (41=40+1)
See Also M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->,
M{constant}->TWR:{address}
Serial I/O Multiplexer Board (ACC-34) Manual
M{constant}->X/Y:{address}
Function Short Word M-Variable Definition
Scope Global
Syntax M{constant}[..{constant}]->
X[:]{address},{offset}[,{width}[,{format}]]
M{constant}[..{constant}]->
Y[:]{address},{offset}[,{width}[,{format}]]
where:
• {constant} is an integer from 0 to 1023 representing the number of the M-variable;
• the optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
• {address} is an integer constant from 0 to 65,535 ($0 to $FFFF if specified in hex);
• {offset} is an integer constant from 0 to 23, representing the starting (least
significant) bit of the word to be used in the M-variable(s), or 24 to specify the use of all
24 bits;
• {width} (optional) is an integer constant from the set {1, 4, 8, 12, 16, 20, 24},
representing the number of bits from the word to be used in the M-variable(s); if
{width} is not specifed, a value of 1 is assumed;
• {format} (optional) is a letter from the set [U, S, D, C], specifying how PMAC is to
interpret this value: (U=Unsigned integer, S=Signed integer, D=Binary-coded Decimal,
C=Complementary binary-coded decimal); if {format} is not specified, U is assumed.
Note:
No spaces are permitted between the M-variable name and the arrow
double character in this command.
Remarks This command causes PMAC to define the specified M-variable or range of M-variables to
point to a location in one of the two halves (X or Y) of PMAC’s data memory. In this form,
the variable can have a width of 1 to 24 bits and can be decoded several different ways, so the
bit offset, bit width, and decoding format must be specified (the bit width and decoding
format do have defaults.
The definition consists of the letter X or Y, an optional colon (:), the word address, the
starting bit number (offset), an optional bit width number, and an option format-specifying
letter.
Legal values for bit width and bit offset are inter-related. The table below shows the possible
values of {width}, and the corresponding legal values of {offset} for each setting of
{width}.
{width} {offset}
1 0 – 23
4 0,4,8,12,16,20
8 0,4,8,12,16
12 0,4,8,12
16 0,4,8
20 0,4
24 0
The format is irrelevant for 1-bit M-variables, and should not be included for them. If no
format is specified, ‘U’ is assumed.
Example ; Machine Output 1
M1->Y:$FFC2,8,1 ; 1-bit (full spec.)
M1->Y$FFC2,8 ; 1-bit (short spec.)
; Encoder 1 Capture/Compare Register
M103->X:$C003,0,24,U ; 24-bit (full spec.)
M103->X$C003,24 ; 24-bit (short spec.)
; DAC 1 Output Register
M102->Y:$C003,8,16,S ; 16-bit value
M102->Y49155,8,16,S ; same, decimal address
See Also M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->,
M{constant}->D:{address}, M{constant}={expression}
Program command M{constant}={expression}
MACROAUX
Function Report or write MACRO auxiliary parameter value
Scope Global
Syntax MACROAUX{NodeNum}{ParamNum}[={constant}]
MX{NodeNum}{ParamNum}[={constant}]
where:
• {NodeNum} is an integer constant from 0 to 15 specifying the slave number of the node
• {ParamNum} is an integer constant from 0 to 65535 specifying the auxiliary parameter
number for this node (2 to 254 required for a write operation)
• {constant} is an integer constant from -32768 to +32767 representing the value to be
written to the specified parameter
Remarks This command permits PMAC to read or write auxiliary register values from slave nodes
across the MACRO ring. The command must specify the node number of the slave node, the
auxiliary parameter number at this node, and if a write command, the value to write into the
register.
If used as a read command (no ‘={constant}’ in the command), PMAC will report the
value of the specified parameter back to the host as ASCII text, just as if the value of one of
its own parameters had been requested.
Only one auxiliary access (read or write) of a single node can be done on one command line.
In order to access the auxiliary registers of a MACRO node n, bit n of I1000 must be set to 1.
If the slave node returns an error message or the slave node does not respond within 32 servo
cycles, PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to report
such a MACRO auxiliary communications error. Register X:$0798 holds the error value. It
is set to $010000 for a timeout error, or $xxxxFE if the slave node reports an error, where
xxxx is the 16-bit error code reported by the slave node.
Example MACROAUX1,24=2000 ; Set Node 1 Parameter 24 to 2000
MACROAUX1,24 ; Request value of Node 1 Parameter 24
MACROAUXWRITE
Function Write MACRO auxiliary parameter value
Scope Global
Syntax MACROAUXWRITE{NodeNum}{ParamNum}{Variable}
MXW{NodeNum}{ParamNum}{Variable}
where:
• {NodeNum} is an integer constant from 0 to 15 specifying the slave number of the node
• {ParamNum} is an integer constant from 2 to 253 specifying the auxiliary parameter
number for this node
• {Variable} is the name of the PMAC variable (I, P, Q, or M) from which the
parameter value is to be copied
Remarks This command permits PMAC to write auxiliary register values to slave nodes across the
MACRO ring. The command must specify the node number of the slave node, the auxiliary
parameter number at this node, and the name of the PMAC variable from which the value
comes.
Only one auxiliary access (read or write) of a single node can be done on one command line.
In order to access the auxiliary registers of a MACRO node n, bit n of I1000 must be set to 1.
If the slave node returns an error message or the slave node does not respond within 32 servo
cycles, PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to report
such a MACRO auxiliary communications error. Register X:$0798 holds the error value. It
is set to $010000 for a timeout error, or $xxxxFE if the slave node reports an error, where
xxxx is the 16-bit error code reported by the slave node.
Example MACROAUXWRITE1,24,P1 ; Write value of P1 to Node 1 Parameter 24
MXW5,128,M100 ; Write value of M100 to Node 5 Parameter 128
See Also On-line commands MACROAUX, MACROAUXREAD
PLC Program commands MACROAUXREAD, MACROAUXWRITE
MACROSLV{command} {node#}
Function Send command to Type 1 MACRO slave
Scope Global
Syntax MACROSLAVE{command}{node #}
MS{command}{node #}
where:
• {command} is one of the following text strings:
• $$$ normal station reset
• $$$*** station reset and re-initialize
• CLRF station fault clear
• CONFIG report station configuration value
• DATE report station firmware date
• SAVE save station setup
• VER report station firmware version
• {node #} is a constant in the range 0 to 15 representing the number of the node
on the PMAC matching the slave node to be accessed
Remarks This command causes PMAC to issue the specified command to a MACRO slave station
using the Type 1 auxiliary master-to-slave protocol. If {node #} is set to 15, the action
automatically applies to all slave stations commanded from the PMAC.
The MS CONFIG command allows the user to set and report a user-specified configuration
value. This provides any easy way for the user to see if the MACRO station has already been
configured to the user’s specifications. The factory default configuration value is 0. It is
recommended that after the user finishes the software configuration of the station, a special
number be given to the configuration value with the
MS CONFIG{node #}={constant} command. This number will be saved to the non-
volatile memory with the MS SAVE command.
Subsequently, when the system is powered up, the station can be polled with the MS
CONFIG {node #} command. If the expected value is returned, the station can be
assumed to have the proper software setup. If the expected value is not returned (for
instance, when a replacement station has just been installed) then the setup will have to be
transmitted to the station.
In order for the PMAC to be able to execute this command, the following conditions must be
true:
• The PMAC must be set up as a master or the synchronizing ring master (I995= $xx90 or
$xx30);
• The node 15 auxiliary register copy function must be disabled (I1000 bit 15 = 0);
• Node 15 must not be used for any other function.
If the slave node returns an error message or it does not respond within I1003 servo cycles,
PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to report such a
MACRO auxiliary communications error. Register X:$0798 holds the error value. It is set to
$010000 for a timeout error, or $xxxxFE if the slave node reports an error, where xxxx is the
16-bit error code reported by the slave node.
Example MS $$$0 ; Resets MACRO station which has active node 0
MS $$$***4 ; Reinitializes MACRO station which has active node 4
MS CLRF8 ; Clears fault on Node 8 of MACRO station
MS CONFIG12 ; Causes MACRO station to report its configuration #
37 ; PMAC reports MACRO station configuration # to host
MS CONFIG12=37 ; Sets MACRO station configuration number
MS DATE 0 ; Causes MACRO station to report its firmware date
08/12/1999 ; PMAC reports MACRO station firmware date to host
MS SAVE 4 ; Causes MACRO station to save setup variables
MS VER 8 ; Causes MACRO station to report its firmware version
1.104 ; PMAC reports MACRO station firmware version to host
MACROSLV{node#},{slave variable}
Function Report Type 1 MACRO auxiliary parameter value
Scope Global
Syntax MACROSLAVE{node #},{slave variable}
MS{node #},{slave variable}
where:
• {node #} is a constant in the range 0 to 15 representing the number of the node on the
PMAC matching the slave node to be accessed
• {slave variable} is the name of the variable on the slave station whose value is to
be reported
Remarks This command causes PMAC to query the MACRO slave station at the specified node
number using the MACRO Type 1 master-to-slave auxiliary protocol, and report back the
value of the specified slave station variable to the host computer.
In order for the PMAC to be able to execute this command, the following conditions must be
true:
• The PMAC must be set up as a master or the synchronizing ring master (I995= $xx90 or
$xx30);
• The node 15 auxiliary register copy function must be disabled (I1000 bit 15 = 0);
• Node 15 must not be used for any other function.
If the slave node returns an error message or it does not respond within I1003 servo cycles,
PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to report such a
MACRO auxiliary communications error. Register X:$0798 holds the error value. It is set to
$010000 for a timeout error, or $xxxxFE if the slave node reports an error, where xxxx is the
16-bit error code reported by the slave node.
Example MS0,MI910 ; Causes slave to report value of Node 0 variable MI910
7 ; PMAC reports this value back to host
MS1,MI997 ; Causes slave to report value global variable MI997
; PMAC reports this value back to host
MACROSLV{node#},{slave variable}={constant}
Function Set Type 1 MACRO auxiliary parameter value
Scope Global
Syntax MACROSLAVE{node #},{slave variable}={constant}
MS{node #},{slave variable}={constant}
where:
• {node #} is a constant in the range 0 to 15 representing the number of the node on the
PMAC matching the slave node to be accessed
• {slave variable} is the name of the MI-variable or C-command on the slave
station whose value is to be set;
• {constant} is a number representing the value to be written to the specified MI-
variable
Remarks This command causes PMAC to write the specified constant value to the variable of the
MACRO slave station at the specified node number using the MACRO Type 1 master-to-
slave auxiliary protocol.
In order for the PMAC to be able to execute this command, the following conditions must be
true:
• The PMAC must be set up as a master or the synchronizing ring master (I995= $xx90 or
$xx30);
• The node 15 auxiliary register copy function must be disabled (I1000 bit 15 = 0);
• Node 15 must not be used for any other function.
If the slave node returns an error message or it does not respond within I1003 servo cycles,
PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to report such a
MACRO auxiliary communications error. Register X:$0798 holds the error value. It is set to
$010000 for a timeout error, or $xxxxFE if the slave node reports an error, where xxxx is the
16-bit error code reported by the slave node.
MACROSLVREAD
Function Read (copy) Type 1 MACRO auxiliary parameter value
Scope Global
Syntax MACROSLVREAD{node #},{slave variable},{PMAC variable}
MSR{node #},{slave variable},{PMAC variable}
where:
• {node #} is a constant in the range 0 to 15 representing the number of the node on the
PMAC matching the slave node to be accessed
• {slave variable} is the name of the variable on the slave station whose value is to
be reported
• {PMAC variable} is the name of the variable on the PMAC into which the value of
the slave station variable is to be copied
Remarks This command causes PMAC to copy the value of the specified variable of the MACRO
slave station matching the specified node number on the PMAC to the specified PMAC
variable, using the MACRO Type 1 master-to-slave auxiliary protocol.
The variable on the PMAC can be any of the I, P, Q, or M-variable on the card.
If this command is issued to the PMAC while a PLC buffer is open, it will be stored in the
buffer as a PLC command, not executed as an on-line command.
In order for the PMAC to be able to execute this command, the following conditions must be
true:
• The PMAC must be set up as a master or the synchronizing ring master (I995= $xx90 or
$xx30);
• The node 15 auxiliary register copy function must be disabled (I1000 bit 15 = 0);
• Node 15 must not be used for any other function.
If the slave node returns an error message or it does not respond within I1003 servo cycles,
PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to report such a
MACRO auxiliary communications error. Register X:$0798 holds the error value. It is set to
$010000 for a timeout error, or $xxxxFE if the slave node reports an error, where xxxx is the
16-bit error code reported by the slave node.
Example MSR0,MI910,P1 ; Copies value of slave Node 0 variable MI910 into PMAC variable P1
MSR1,MI997,M10 ; Copies value of slave Node 1 variable MI997 into PMAC variable M10
MACROSLVWRITE
Function Write (copy) Type 1 MACRO auxiliary parameter value
Scope Global
Syntax MACROSLVWRITE{node #},{slave variable},{PMAC variable}
MSW{node #},{slave variable},{PMAC variable}
where:
• {node #} is a constant in the range 0 to 15 representing the number of the node on the
PMAC matching the slave node to be accessed
• {slave variable} is the name of the MI-variable or C-command on the slave
station whose value is to be set;
• {PMAC variable} is the name of the variable on the PMAC from which the value of
the slave station variable is to be copied
Remarks This command causes PMAC to copy the value of the specified variable on PMAC to the
specified variable of the MACRO slave station matching the specified node number on the
PMAC, using the MACRO Type 1 master-to-slave auxiliary protocol.
The variable on the PMAC can be any of the I, P, Q, or M-variables on the card.
If this command is issued to the PMAC while a PLC buffer is open, it will be stored in the
buffer as a PLC command, not executed as an on-line command.
In order for the PMAC to be able to execute this command, the following conditions must be
true:
• The PMAC must be set up as a master or the synchronizing ring master (I995= $xx90 or
$xx30);
• The node 15 auxiliary register copy function must be disabled (I1000 bit 15 = 0);
• Node 15 must not be used for any other function.
If the slave node returns an error message or it does not respond within I1003 servo cycles,
PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to report such a
MACRO auxiliary communications error. Register X:$0798 holds the error value. It is set to
$010000 for a timeout error, or $xxxxFE if the slave node reports an error, where xxxx is the
16-bit error code reported by the slave node.
Example MSW0,MI910,P35 ; Copies value of PMAC P35 into MACRO station node 0 variable MI910
MSW4,C4,P0 ; Causes MACRO station with active node 4 to execute Command #4,
; saving its setup variable values to non-volatile memory (P0 is a dummy
; variable here)
MFLUSH
Function Clear pending synchronous M-variable assignments
Scope Coordinate-system specific
Syntax MFLUSH
Remarks This command permits the user to clear synchronous M-variable assignment commands that
have been put on the stack for intended execution with a subsequent move (without executing
the commands). As an on-line command, it is useful for making sure pending outputs are not
executed after a program has been stopped.
Example / ; Stop execution of a program
MFLUSH ; Clear M-variable stack
B1R ; Start another program; formerly pending M-variables will not execute
See Also Program commands M{constant}=={expression},
M{constant}&={expression},
M{constant}|={expression},
M{constant}^={expression}
O{constant}
Function Open loop output
Scope Motor specific
Syntax O{constant}
where:
• {constant} is a floating-point value representing the magnitude of the output as a
percentage of Ix69 for the motor, with a range of +/-100
Remarks This command causes PMAC to put the motor in open-loop mode and force an output of the
specified magnitude, expressed as a percentage of the maximum output parameter for the
motor (Ix69). This command is commonly used for set-up and diagnostic purposes (for
instance, a positive O command must cause position to count in the positive direction, or
closed-loop control cannot be established), but it can also be used in actual applications.
If the motor is not PMAC-commutated, this command will create a DC output voltage on the
single DAC for the motor. If the motor is commutated by PMAC, the commutation
algorithm is still active, and the specified magnitude of output is apportioned between the
two DAC outputs for the motor according to the instantaneous commutation phase angle.
If the value specified is outside the range +/-100, the output will saturate at +/-100% of Ix69.
Closed-loop control for the motor can be re-established with the J command. It is a good
idea to stop the motor first with an O0 command if it has been moving in open-loop mode.
To do a variable O-command, define an M-variable to the filter result register (X:$003A,
etc.), command an O0 to the motor to put it in open-loop mode, then assign a variable value
to the M-variable. This technique will even work on PMAC-commutated motors.
PMAC will reject this command if the motor is in a coordinate system that is currently
running a motion program (reporting ERR001 if I6 is 1 or 3).
Example O50 .................... ; Open-loop output 50% of Ix69 for addressed motor
#2O33.333...... ; Open-loop output 1/3 of Ix69 for Motor 2
O0 ...................... ; Open-loop output of zero magnitude
J/ ; Re-establish closed-loop control
See Also On-line commands J/, K
Memory-map registers X:$003A, X:$0076, etc.
Suggested M-variable definitions Mx71.
OPEN BINARY ROTARY
Function Open rotary buffer for entry of binary commands only
Scope Global
Syntax OPEN BINARY ROTARY
OPEN BIN ROT
Remarks This command causes PMAC to open all existing rotary motion program buffers (created
with the DEFINE ROTARY command) for entry of binary-format program commands
through the dual-ported RAM only. Subsequent binary-format program commands valid for
rotary motion programs that are sent to the appropriate dedicated binary buffer in the
DPRAM are copied into the internal rotary program buffer for the appropriate coordinate
system.
This effect of this command differs from that of the OPEN ROTARY command. After the
OPEN ROTARY command, ASCII text commands that can be buffered motion program
commands are entered into the internal rotary program buffer, as well as binary-format
commands (if I57=1). After the OPEN BINARY ROTARY command, no ASCII text
commands can be entered into the internal rotary buffers. If a text command can be
interpreted as an on-line command, it is executed immediately. If it cannot be interpreted as
an on-line command, it is rejected with an error.
No other program buffers (PLC, fixed or rotary motion) may be open when the command is
sent (PMAC will report ERR007 if I6=1 or 3). It is a good idea always to precede an OPEN
command with a CLOSE command to make sure no other buffers have been left open.
When the rotary buffers are open for binary entry only, bit 6 of Y:$0003 (a new status bit –
part of the 11th digit reported in response to the ??? global status query command) is set to 1.
However, bits 19 and 18 of this word (part of the 8th digit reported) – Motion Buffer Open
and Rotary Buffer Open – are left at 0 to keep ASCII commands out of this buffer.
The binary rotary buffers can be closed for entry with the CLOSE command.
See Also I-variable I57
On-line commands CLOSE, OPEN ROTARY, ???
OPEN PLC
Function Open a PLC program buffer for entry
Scope Global
Syntax OPEN PLC {constant}
where:
• {constant} is an integer from 0 to 31 representing the PLC program to be opened
Remarks This command causes PMAC to open the specified PLC program buffer for entry and
editing. This permits subsequent program lines that are valid for a PLC to be entered into
this buffer. When entry of the program is finished, the CLOSE command should be used to
prevent further lines from being put in the buffer.
No other program buffers (PLC, fixed or rotary motion) may be open when this command is
sent (PMAC will report ERR007 if I6=1 or 3). It is a good idea always to precede an OPEN
command with a CLOSE command to make sure no other buffers have been left open.
PLCs 0-15 can be protected by password. If the PLC is protected by password, and the
proper password has not been given, PMAC will reject this command (reporting an ERR002
if I6=1 or 3).
Opening a PLC program buffer automatically disables that PLC program. Other PLC
programs and motion programs will keep executing. Closing the PLC program buffer after
entry does not re-enable the program. To re-enable the program, the ENABLE PLC
command must be used, or PMAC must be reset (with a saved value of I5 permitting this
PLC program to execute).
Example CLOSE ............... ; Make sure other buffers are closed
DELETE GATHER ; Make sure memory is free
OPEN PLC 7 ... ; Open buffer for entry, disabling program
CLEAR ............... ; Erase existing contents
IF (M11=1) ... ; Enter new version of program...
...
CLOSE ............... ; Close buffer at end of program
ENABLE PLC 7 ; Re-enable program
OPEN ROTARY
Function Open all existing rotary motion program buffers for entry
Scope Global
Syntax OPEN ROTARY
OPEN ROT
Remarks This command causes PMAC to open all existing rotary motion program buffers (created
with the DEFINE ROTARY command) for entry. Subsequent program commands valid for
rotary motion programs are entered into the rotary program buffer of the coordinate system
addressed at the time of that command. (Branching and looping commands should not be
used in a rotary program buffer.)
No other program buffers (PLC, fixed or rotary motion) may be open when this command is
sent (PMAC will report ERR007 if I6=1 or 3). It is a good idea always to precede an OPEN
command with a CLOSE command to make sure no other buffers have been left open.
The <CTRL-U> command performs the same function as OPEN ROTARY.
Note:
The B0 command that points the coordinate system to the rotary
buffer cannot be given while the rotary buffers are open, because
PMAC will interpret the command as a B-axis move command.
Example &2 DEFINE ROT 100 ; Create C.S. 2 rotary buffer
&1 DEFINE ROT 100 ; Create C.S. 1 rotary buffer
&1 B0 &2 B0 . ; Point both C.S.s to rotary buffers
OPEN ROT ........ ; Open buffers for entry
&1 X10 Y10 F5 ; Write to C.S. 1’s buffer
&2 X30 Y30 F10 ; Write to C.S. 2’s buffer
&1R &2R ; Start executing both buffers
See Also Rotary Motion Programs (Writing a Motion Program)
On-line commands <CTRL-L>, <CTRL-U>, CLOSE, DEFINE ROT, B{constant}, R
P
Function Report motor position
Scope Motor specific
Syntax P
Remarks This command causes PMAC to report the present actual position for the addressed motor to
the host, scaled in counts, rounded to the nearest tenth of a count.
PMAC reports the value of the actual position register plus the position bias register plus the
compensation correction register, and if bit 16 of Ix05 is 1 (handwheel offset mode), minus
the master position register.
Example P......................... ; Request the position of the addressed motor
1995.................. ; PMAC responds
#1P .................... ; Request position of Motor 1
-0.5.................. ; PMAC responds
#2P#4P............. ; Request positions of Motors 2 and 4
9998.................. ; PMAC responds with Motor 2 position first
10002 ; PMAC responds with Motor 4 position next
PASSWORD={string}
Function Enter/Set Program Password
Scope Global
Syntax PASSWORD={string}
where:
• {string} is a series of non-control ASCII characters (values from 32 decimal to 255
decimal). The password string is case sensitive.
Remarks This command permits the user to enter the card’s password, or once entered properly, to
change it. Without a properly entered password, PMAC will not open or list the contents of
any motion program numbered 1000 or greater, or of PLC programs 0-15. If asked to do so,
it will return an error (ERR002 reported if I6 is set to 1 or 3).
The default password is the null password (which means no password is needed to list the
programs). This is how the card is shipped from the factory, and after a $$$*** re-
initialization command. When there is a null password, you are automatically considered to
have entered the correct password on power-up/reset.
If you have entered the correct password (which is always the case for the null password),
PMAC interprets the PASSWORD={string} command as changing the password, and you
can change it to anything you want. When the password is changed, it has automatically
been matched and the host computer has access to the protected programs.
Note:
The password does not require quote marks. If you use quote marks
when you enter the password string for the first time, you must use
them every time you match this password string.
If you have not yet entered the correct password since the latest power-up/reset, PMAC
interprets the PASSWORD={string} command as an attempt to match the existing
password. If the command matches the existing password correctly, PMAC accepts it as a
valid command, and the host computer has access to the protected programs until the PMAC
is reset or has its power cycled. If the command does not match the existing password
correctly, PMAC returns an error (reporting ERR002 if I6=1 or 3), and the host computer
does not have access to the protected programs. The host computer is free to attempt to
match the existing password.
There is no way to read the current password. If the password is forgotten and access to the
protected programs is required, the card must be re-initialized with the $$$*** command,
which clears all program buffers as well as the password. Then the programs must be
reloaded, and a new password entered.
Example {Starting from power-up/reset with a null password}
LIST PLC 1 ; Request listing of protected program
P1=P1+1 ; PMAC responds because there is no password
RETURN
PASSWORD=Bush ; This sets the password to “Bush”
LIST PLC 1 ; Request listing of protected program
P1=P1+1 ; PMAC responds because password has been
RETURN ; matched by changing it.
$$$ ; Reset the card
LIST PLC 1 ; Request listing of protected program
ERR002 ; PMAC rejects because password not entered
PC
Function Report Program Counter
Scope Coordinate-system specific
Syntax PC
Remarks This command causes PMAC to report the motion program number and address offset of the
line in that program that it will next calculate (in the addressed coordinate system). It will
also report the program number and address offset of any lines it must RETURN to if it is
inside a GOSUB or CALL jump (up to 15 deep).
The number reported after the colon is not a line number; as an address offset, it is the
number of words of memory from the top of the program. The LIST PROGRAM command,
when used with comma delimiters, shows the program or section of the program with address
offsets for each line. The LIST PC command can show lines of the program with address
offsets from the point of calculation.
Because PMAC calculates ahead in a continuous sequence of moves, the PC (Program
Calculation) command will in general return a program line further down in the program than
PE will.
If the coordinate system is not pointing to any motion program, PMAC will return an error
(ERR003 if I6=1 or 3). Initially the pointing must be done with the B{constant}
command.
Example PC
P1:0.................. ; Ready to execute at the top of PROG 1
PC
P76:22............. ; Ready to execute at 22nd word of PROG 76
LIST PC
P76:22:X10Y20 ; Program line at 22nd word of PROG 76
PC
P1001:35>P3.12 ; Execution will return to PROG 3, address 12
See Also On-line commands B{constant}, LIST, LIST PC, LIST PE, LIST PROGRAM, PE
PE
Function Report Program Execution Pointer
Scope Coordinate-system specific
Syntax PE
Remarks This command causes PMAC to report the motion program number and address offset of the
currently executing programmed move in the addressed coordinate system. This is similar to
the PC command, which reports the program number and address offset of the next move to
be calculated. Since PMAC is calculating ahead in a continuous sequence of moves, PC will
in general report a move line several moves ahead of PE.
If the coordinate system is not pointing to any motion program, PMAC will return an error
(ERR003 if I6=1 or 3). Initially the pointing must be done with the B{constant}
command.
Example PE
P1:2
PE
P1:5
See Also On-line commands B{constant}, LIST, LIST PC, LIST PE, PC
PMATCH
Function Re-match Axis Positions to Motor Positions
Scope Coordinate-system specific
Syntax PMATCH
Remarks This command causes PMAC to recalculate the axis starting positions for the coordinate
system to match the current motor commanded positions (by inverting the axis definition
statement equations and solving for the axis position).
Normally this does not need to be done. However, if a motor move function, such as a jog
move, an open-loop move, or a stop on abort or limit, was done since the last axis move or
home, PMAC will not automatically know that the axis position has changed. If an axis
move is then attempted without the use of the PMATCH command, PMAC will use the wrong
axis starting point in its calculations.
Also, with an absolute sensor, a PMATCH command should be executed before the first
programmed move, so the starting axis position matches the (non-zero) motor position.
If the PMATCH function is not performed, PMAC will use the last axis destination position as
the starting point for its upcoming axis move calculations, which is not necessarily the same
position as the current commanded motor positions.
The PMATCH function can be executed from within a motion program using CMD”PMATCH”
with DWELLs both before and after. This is useful if the coordinate system setup changes in
the middle of the program (e.g. new axis brought in, or following mode changed).
If more than one motor is defined to a given axis (as in a gantry system), the commanded
position of the lower-numbered motor is used in the PMAC calculations.
Note:
If I14 is set to 1, the PMATCH function will be executed automatically
every time program execution is started. Most users will want to use
I14=1 so they do not have to worry about when this needs to be done.
Example #1J+.................. ; Jog motor 1
#1J/.................. ; Stop jogging
PMATCH............. ; Match axis position to current motor position
B200R ............... ; Execute program 200
OPEN PROG 10 CLEAR
...
CMD”&1#4->100C” ; Bring C-axis into coordinate system
DWELL100
CMD”PMATCH” . ; Issue PMATCH so C-axis has proper start position
DWELL100
C90
See Also Further Position Processing (Setting Up a Motor)
Axes, Coordinate Systems (Setting Up a Coordinate System)
I-variables I14, Ix06
PR
Function Report Rotary Program Remaining
Scope Coordinate-system specific
Syntax PR
Remarks This command causes PMAC to report the number of program lines that have been entered in
the rotary buffer for the addressed coordinate system but have not yet been executed
(program remaining). This command can be useful for finding out if it is time to send new
lines to the buffer. The value returned is accurate only if the rotary program buffer is open.
Example B0 ...................... ; Point to rotary buffer
OPEN ROT ........ ; Open rotary buffer
X10F10............. ; Enter 1st line
X20 .................... ; Enter 2nd line
X30 .................... ; Enter 3rd line
X40 .................... ; Enter 4th line
PR ...................... ; Ask for program remaining
4......................... ; PMAC responds that 4 lines remain
R......................... ; Start running the program
PR ...................... ; Ask for program remaining
2......................... ; PMAC responds two 2 lines remain
See Also Rotary Program Buffers (Writing a Motion Program)
BREQ interrupt (Using Interrupts – Writing a Host Communications Program)
I-variables I16, I17
Q
Function Quit Program at End of Move
Scope Coordinate-system specific
Syntax Q
Remarks This causes the currently addressed coordinate system to cease execution of the program at
the end of the currently executing move or the next move if that has already been calculated.
The program counter is set to the next line in the program, so execution may be resumed at
that point with an R or S command.
Compare this to the similar / command, which always stops at the end of the currently
executing move..
Example B10R.................. ; Point to beginning of PROG 10 and run
Q......................... ; Quit execution
R......................... ; Resume execution
Q......................... ; Quit execution again
S ; Resume execution for a single move
See Also Stopping Commands (Making Your Application Safe)
Control-Panel Port STEP/ Input (Connecting PMAC to the Machine)
JPAN Connector Pin 9
On-line commands <CTRL-Q>, A, H, K, /, \
Q{constant}
Function Report Q-Variable Value
Scope Coordinate-system specific
Syntax Q{constant}[..{constant}]
where:
• {constant} is an integer from 0 to 1023 representing the number of the Q-variable;
• the optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
Remarks This command causes PMAC to report back the present value of the specified Q-variable or
range of Q-variables for the addressed coordinate system.
Example Q10
35
Q255
-3.4578
Q101..103
0
98.5
-0.333333333
See Also Q-Variables (Computational Features)
On-line commands I{constant}, M{constant}, P{constant},
Q{constant}={expression}
Q{constant}={expression}
Function Q-Variable Value Assignment
Scope Coordinate-system specific
Syntax Q{constant}[..{constant}]={expression}
where:
• {constant} is an integer from 0 to 1023 representing the number of the Q-variable;
• the optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
• {expression} contains the value to be given to the specified Q-variable(s)
Remarks This command causes PMAC to assign the value of the expression to the specified Q-variable
or range of Q-variables for the addressed coordinate system.
If a motion program buffer is open when this command is sent to PMAC it is entered into the
buffer for later execution.
Example Q100=2.5
Q1..10=0
See Also Q-Variables (Computational Features)
On-line commands I{constant}={expression}, M{constant}={expression},
P{constant}={expression}, Q{constant}
Program command Q{constant}={expression}
R
Function Run Motion Program
Scope Coordinate-system specific
Syntax R
Remarks This command causes the addressed PMAC coordinate system to start continuous execution
of the motion program addressed by the coordinate system’s program counter from the
location of the program counter. Alternately, it will restore operation after a ‘\’ or ‘H’
command has been issued (even if a program was or is not running). Addressing of the
program counter is done initially using the B{constant command.
The coordinate system must be in a proper condition in order for PMAC to accept this
command. Otherwise, PMAC will reject this command with an error; if I6 is 1 or 3, it will
report the error number. The following conditions can cause PMAC to reject this command
(also listed are the remedies):
• Both limits set for a motor in coordinate system (ERR010); clear limits
• Another move in progress (ERR011); stop move (e.g. with J)
• Open-loop motor in coordinate system (ERR012); close loop with J or A
• Unactivated motor in coordinate system (ERR013); change Ix00remove motor from
coordinate system
• No motors in the coordinate system (ERR014); put at least 1 motor in C.S.
• Fixed motion program buffer open (ERR015); close buffer and point to program
• No program pointed to (ERR015); point to program with B command
• Program structured improperly (ERR016); correct program structure
• Motor(s) not at same position as stopped with / or \ command (ERR017); move back to
stopped position with J=
Example &1B1R ............... ; C.S.1 point to PROG 1 and run
&2B200.06...... ; C.S.2 point to N6000 of PROG 200 and run
Q......................... ; Quit this program
R......................... ; Resume running from point where stopped
H......................... ; Do a feed hold on this program
R ; Resume running from point where stopped
See Also Control Panel Port START/ Input (Connecting PMAC to the Machine)
Running a Motion Program (Writing a Motion Program)
I-variable I6
On-line commands <CTRL-R>, A, H, Q, S
JPAN Connector Pin 8
R[H]{address}
Function Report the contents of a specified memory address[es]
Scope Global
Syntax R[H]{address} [,{constant}]
where:
• {address} consists of a letter X, Y, or L; an option colon (:); and an integer value from
0 to 65535 (in hex, $0000 to $FFFF); specifying the starting PMAC memory or I/O
address to be read;
The RESUME PLC command cannot be used to restart execution of a PLC program that has
been stopped with a DISABLE PLC command. However, after a PLC has been stopped
with a DISABLE PLC command, if a PAUSE PLC command is then given for that PLC,
then a RESUME PLC command can be given to start operation at the point at which it has
been stopped.
Note that RESUME PLC 0..31 will restart all PLCs that have been paused, but not any
that have been disabled.
The line of the PLC at which execution will be resumed can be read with the LIST PLC,,1
command.
PLC programs are specified by number, and may be used singularly in this command, in a list
(separated by commas), or in a range of consecutively numbered programs.
If a motion or PLC program buffer is open when this command is sent to PMAC, the
command will be entered into that buffer for later execution.
I-variable I5 must be in the proper state to allow the PLC program(s) specified in this
command to execute.
Example RESUME PLC 1
RES PLC 2,7
RESUME PLC 3,21
RESUME PLC 0..31
{Note: If the RESUME command refers to multiple PLCs, only those PLCs that have been stopped with
the PAUSE command will be resumed.}
See Also I-variable I5
On-line commands DISABLE PLC, ENABLE PLC, OPEN PLC, PAUSE PLC, LIST
PLC, <CONTROL-D>.
Program commands DISABLE PLC, ENABLE PLC, PAUSE PLC, RESUME PLC
S
Function Execute One Move (Step) of Motion Program
Scope Coordinate-system specific
Syntax S
Remarks This command causes the addressed PMAC coordinate system to start single-step execution
of the motion program addressed by the coordinate system’s program counter from the
location of the program counter. Addressing of the program counter is done initially using
the B{constant command.
At the default I53 value of zero, a Step command causes program execution through the next
move or DWELL command in the program, even if this takes multiple program lines.
When I53 is set to 1, a Step command causes program execution of only a single program
line, even if there is no move or DWELL command on that line. If there is more than one
DWELL or DELAY command on a program line, a single Step command will only execute one
of the DWELL or DELAY commands.
Regardless of the setting of I53, if program execution on a Step command encounters a
BLOCKSTART statement in the program, execution will continue until a BLOCKSTOP
statement is encountered.
If the coordinate system is already executing a motion program when this command is sent,
the command puts the program in single-step mode, so execution will stop at the end of the
latest calculated move. In this case, its action is the equivalent of the Q command.
The coordinate system must be in a proper condition in order for PMAC to accept this
command. Otherwise, PMAC will reject this command with an error; if I6 is 1 or 3, it will
report the error number. The same conditions that cause PMAC to reject an R command will
cause it to reject an S command; refer to those conditions under the R command
specification.
Note:
PMAC does not provide the acknowledging handshake character to
the SAVE command until it has finished the saving operation, a
significant fraction of a second later on PMACs with battery backup
and about 5 to 10 seconds on PMACs with flash backup. The host
program should be prepared to wait much longer for this character
than is necessary on most commands. For this reason, it is usually not
a good idea to include the SAVE command as part of a “dump”
download of a large file.
During execution of the SAVE command, PMAC will execute no other background tasks,
including user PLCs and automatic safety checks, such as following error and overtravel
limits. Particularly on boards with the flash backup where saving takes many seconds, you
must make sure the system is not depending on these tasks for safety when the SAVE
command is issued.
Example I130=60000 ... ; Set Motor 1 proportional gain
SAVE.................. ; Save to non-volatile memory
I130=80000 ... ; Set new value
$$$ .................... ; Reset card
I130.................. ; Request value of I130
60000 ; PMAC responds with saved value
See Also On-line commands $$$, $$$***
Jumpers E50 and E51.
SETPHASE
Function Set motor commutation phase-position registers
Scope Global
Syntax SETPHASE{constant}[,{constant}...]
SETPHASE{constant}..{constant}
[,{constant}..{constant}...]
where:
• {constant} is an integer from 1 to 8 representing a motor number
Remarks This command causes PMAC to force the commutation phase-position register for the
specified motor or motor’s to the value of the Ix75 phase-position offset parameter.
The main use of this command is to correct the phase position value at a known position
(usually the motor home position) after an approximate phasing search or phasing read (e.g.
from Hall commutation sensors). The approximate referencing is sufficient to move to a
known position, but not necessarily to get peak performance from the motor.
Example SETPHASE1
SETPHASE1,3,5
SETPHASE1..4
SETPHASE1..3,5..7
See Also Power-On Phasing Search (Setting Up PMAC Commutation)
I-variables Ix75, Ix81
Program Command SETPHASE
SIZE
Function Report the amount of unused buffer memory in PMAC.
Scope Global
Syntax SIZE
Remarks This command causes PMAC to report to the host the amount of unused long words of
memory available for buffers. If no program buffer (motion, PLC or rotary buffer) is open,
this value is reported as a positive number. If a buffer is currently open, the value is reported
as a negative number.
Example DEFINE GATHER ; Reserve all remaining memory for gathering
SIZE.................. ; Ask for amount of open memory
0......................... ; PMAC reports none available
DELETE GATHER ; Free up memory from gathering buffer
SIZE.................. ; Ask for amount of open memory
41301 ............... ; PMAC reports number of words available
OPEN PROG 10 ; Open a motion program buffer
SIZE.................. ; Ask for amount of open memory
-41302 ; The negative sign shows a buffer is open
See Also I-Variable I18
On-line commands DELETE GATHER, DELETE TRACE
TYPE
Function Report type of PMAC
Scope Global
Syntax TYPE
Remarks This command causes PMAC to return a string reporting the configuration of the card. It will
report the configuration as a text string in the format:
{PMAC type},{Bus type},{Backup type},{Servo Type},{Ladder type},{Clock Multiplier}
where
{PMAC type}:
PMAC1 First generation PMAC (including PMAC”1.5”)
PMAC2 Second generation PMAC
PMACUL Ultra-lite (MACRO only PMAC2)
{Bus type}:
ISA IBM-PC ISA bus
VME VME bus
STD STD bus
ISA/VME PMAC1 firmware can support both busses
{Backup type}:
BATTERY Battery-backed RAM
FLASH AMD-style flash-backed RAM
I-FLASH Intel-style flash-backed RAM
{Servo type}:
PID Standard PID servo algorithm
ESA Option 6 Extended servo algorithm
{Ladder type}
Remarks In the case of PVT (position, velocity, time) motion mode, both the ending position and
velocity are specified for each segment of each axis. The command consists of one or
more groupings of axes labels with two data items separated by a colon character.
The first data item for each axis is the scaled ending position or distance (depending on
whether the axis is in absolute [ABS or incremental [INC] mode. Position scaling is
determined by the axis definition statement). The second data item (after the colon) is the
ending velocity.
The velocity units are the scaled position units as established by the axis definition
statements divided by the time units as set by Ix90 for Coordinate System x. The
velocity here is a signed quantity, not just a magnitude. See the examples in the PVT
mode description of the Writing a Motion Program section.
The time for the segment is the argument for the most recently executed PVT or TA
command, rounded to the nearest millisecond.
In PVT mode, if no velocity is given for the segment, PMAC assumes an ending velocity
of zero for the segment.
Example X1000:50
Y500:-32 Z737.2:68.93
A(P1+P2):(P3) B(SIN(Q1)):0
See Also PVT Mode Moves (Writing a Motion Program)
Axis Definition Statements (Setting Up a Coordinate System)
I-variables Ix87, Ix90
Motion program commands PVT, TA
{axis}{data}^{data}[{axis}{data}^{data}...]
Function Move Until Trigger
Type Motion program
Syntax {axis}{data}^{data}[{axis}{data}^{data}...]
where:
• {axis} is the character specifying which axis (X, Y, Z, A, B, C, U, V, W).
• the first {data} is a constant (no parentheses) or expression (in parentheses)
representing the end position or distance in the absence of a trigger.
• the second {data} (after the ^ arrow) is a constant (no parentheses) or expression
(in parentheses) representing the distance from the trigger position.
• [{axis}{data}^{data}...] is the optional specification of simultaneous
movement for more axes.
Remarks In the RAPID move mode, this move specification permits a move-until-trigger function.
The first part of the move description for an axis (before the ^ sign) specifies where to
move in the absence of a trigger. It is a position if the axis is in absolute mode; it is a
distance if the axis is in incremental mode. In both cases the units are the scaled axis
user units. If no trigger is found before this destination is reached, the move is a standard
RAPID move.
The second part of the move description for an axis (after the ^ sign) specifies the
distance from the trigger position to end the post-trigger move if a trigger is found. The
distance is expressed in the scaled axis user units.
Each motor assigned to an axis specified in the command, executes a separate move-
until-trigger. All the assigned motors will start together, but each can have its own
trigger condition. If a common trigger is required, the trigger signal must be wired into
all motor interfaces. Each motor can finish at a separate time. The next line in the
program will not start to execute until all motors have finished their moves. No blending
into the next move is possible.
The trigger for a motor can be either a hardware input trigger (if bit 17 of Ix03 is 0), or
the motor warning following error status bit (if bit 17 of Ix03) is 1. Bit 16 of Ix03 should
also be set to 1 in this case. If a hardware input trigger is used, Encoder/Flag I-variables
2 and 3 (e.g. I902 and I903) for the flag channel specified by Ix25 determine which
edge(s) of which flag(s) cause the trigger. If the warning following error bit is used for
torque-limited triggering, then Ix12 sets the size of the warning following error.
The speed of the move, both before the trigger and after, is set by Ix22 if I50=0 or by
Ix16 if I50=1. The acceleration is set by Ix19 to Ix21.
On the same line, some axes may be specified for normal untriggered RAPID moves that
will execute simultaneously.
If the move ends for a motor without a trigger being found, the “trigger move” status bit
(bit 7 of the second motor status word returned on a ? command) is left set after the end
of the move. If the trigger has been found, this bit is cleared to 0 at the end of the move.
Example X1000^0
X10^-0.01 Y5.43^0.05
A(P1)^(P2) B10^200 C(P3)^0 X10
See Also Move-Until-Trigger (Writing a Motion Program)
Torque-Limited Triggering (Setting Up a Motor)
RAPID-mode moves (Writing a Motion Program)
{axis}{data} [{axis}{data}...] {vector}{data} [{vector}{data}...]
Function Circular Arc Move Specification
Type Motion program (PROG and ROT)
Syntax {axis}{data} [{axis}{data}...] {vector}{data}
[{vector}{data}...]
where:
• {axis} is a character specifying which axis (X, Y, Z, A, B, C, U, V, W).
• {data} is a constant (no parentheses) or an expression (in parentheses) representing
the end position or distance.
• [{axis}{data}...] is the optional specification of simultaneous movement for
more axes.
• {vector} is a character (I, J, or K) specifying a vector component (parallel to the
X, Y, or Z axis, respectively) to the center of the arc; or the character R specifying
the magnitude of the vector.
• {data} specifies the magnitude of the vector component.
• [{vector}{data}...] is the optional specification of more vector components.
Remarks For a blended circular mode move, both the move endpoint and the vector to the arc
center are specified. The endpoint is specified just as in a LINEAR mode move, either
by position (referenced to the coordinate system origin), or distance (referenced to the
starting position).
The center of the arc for a circular move must also be specified in the move command.
This is usually done by defining the vector to the center. This vector can either be
referenced to the starting point of the move (incremental radial vector mode – the default,
or if an INC (R) command has been given), or it can be referenced to the coordinate
system origin (absolute radial vector mode – if an ABS (R) command has been given).
Alternatively, just the magnitude of the vector to the center can be specified with
R{data} on the command line. If this is the case, PMAC will calculate the location of
the center itself. If the value specified by {data} is positive, PMAC will compute the
short arc path to the destination (<= 180o); if it is negative, PMAC will compute the long
arc path (>= 180o). It is not possible to specify a full circle in one command with the R
vector specifier.
The plane for the circular arc must have been defined by the NORMAL command (the
default – NORMAL K-1 – defines the XY plane). This command can only define planes
in XYZ-space, which means that only the X, Y, and Z axes can be used for circular
interpolation. Other axes specified in the same move command will be interpolated
linearly to finish in the same time.
The direction of the arc to the destination point – clockwise or counterclockwise – is
controlled by whether the card is in CIRCLE1 (clockwise) or CIRCLE2
(counterclockwise) mode. The sense of clockwise in the plane is determined by the
direction of the NORMAL vector to the plane.
If the destination point is a different distance from the center point than is the starting
point, the radius is changed smoothly through the course of the move, creating a spiral.
This is useful in compensating for any roundoff errors in the specifications. However, if
the distance from either the starting point or the destination point to the center point is
zero, an error condition will be generated and the program will stop.
If the vector from the starting point to the center point does not lie in the circular
interpolation plane, the projection of that vector into the plane is used. If the destination
point does not lie in the same circular interpolation plane as the starting point, a helical
move is done to the destination point.
If the destination point (or its projection into the circular interpolation plane containing
the starting point) is the same as the starting point, a full 360o arc is made in the specified
direction (provided that IJK vector specification is used). In this case, only the vector
needs to be specified in the move command, because for any axis whose destination is
not specified, the destination point is automatically taken to be the same as the starting
point.
If no vector, and no radial magnitude is specified in the move command, a linear move
will be done to the destination point, even if the program is in circular mode.
Note:
PMAC performs arc moves by segmenting the arc and performing the
best cubic fit on each segment. I-variable I13 determines the time for
each segment. I13 must be set greater than zero to put PMAC into this
segmentation mode in order for arc moves to be done. If I13 is set to
zero, circular arc moves will be done in linear fashion.
Remarks This command loads the currently selected (with TSEL) transformation matrix for the
coordinate system with rotation/scaling values contained in the nine Q-variables starting
with the specified one. This has the effect of renaming the current commanded X, Y, and
Z axis positions (from the latest programmed move) by multiplying the XYZ vector by
this matrix.
The rotation and scaling is done relative to the “base” XYZ coordinate system, defined
by the axis definition statements. The math performed is:
[Xrot Yrot Zrot]T = [Rot Matrix] [Xbase Ybase Zbase]T
This command does not cause any movement of any axes. It simply renames the present
positions.
Note:
When using this command to scale the coordinate system, use the I, J, K
vector specification for circle commands. Do not use the radius center
specification. The radius does not get scaled.
Example Create a 3x3 matrix to rotate the XY plane by 30 degrees about the origin
Q40=COS(30) Q41=SIN(30) Q42=0
Q43=-SIN(30) Q44=COS(30) Q45=0
Q46=0 Q47=0 Q48=1
AROT 40 ; Implement the change
Create a 3x3 matrix to scale the XYZ space by a factor of 3
Q50=3 Q51=0 Q52=0
Q53=0 Q54=3 Q55=0
Q56=0 Q57=0 Q58=3
AROT 50 ; Implement the change
See Also Axis Matrix Transformations (Writing a Motion Program)
On-line command DEFINE TBUF
Program commands TSEL, ADIS, IDIS, IROT, TINIT
B{data}
Function B-Axis Move
Type Motion program (PROG and ROT)
Syntax B{data}
where:
• {data} is a floating-point constant or expression representing the position or
distance in user units for the U-axis.
Remarks This command causes a move of the B-axis. (See {axis}{data} description, above.)
See Also Program commands {axis}{data}, A, C, U, V, W, X, Y, Z, CALL,
READ
BLOCKSTART
Function Mark Start of Stepping Block
Type Motion program (PROG and ROT)
Syntax BLOCKSTART
BSTART
Remarks This statement allows for multiple moves to be done on a single step command.
Execution on a step command will proceed until the next BLOCKSTOP statement in the
program (without BLOCKSTART, only a single servo command is executed on a step
command). Also, if Ix92=1 (move blending disabled), all moves between BLOCKSTART
and BLOCKSTOP will be blended together. This does not affect how a program is
executed from a run command if Ix92=0.
This structure is particularly useful for executing a single sequence of PVT mode moves,
because the individual segments do not end at zero velocity, making normal stepping
very difficult.
Example For the program segment:
BLOCKSTART
INC
X10:100
X20:100
X20:100
X10:0
BLOCKSTOP
All four move segments will be executed on a single S command.
See Also I-variable Ix92
On-line commands <CONTROL-S>, R, S.
Program commands BLOCKSTOP, STOP
BLOCKSTOP
Function Mark End of Stepping Block
Type Motion program (PROG and ROT)
Syntax BLOCKSTOP
BSTOP
Remarks This statement marks the end of the block of statements, begun with a BLOCKSTART, to
be done on a single ‘step’ command, or to be blended together even if Ix92=1 (move
blending disabled). This does not affect how a program is executed from a ‘run’
command if Ix92=1.
Example See example under BLOCKSTART above.
See Also I-variable Ix92
On-line commands <CONTROL-S>, R, S
Program commands BLOCKSTART, STOP
C{data}
Function C-Axis Move
Type Motion program (PROG and ROT)
Syntax C{data}
where:
• {data} is a floating-point constant or expression representing the position or
distance in user units for the U-axis.
Remarks This command causes a move of the C-axis. (See {axis}{data} description above.)
See Also Program commands {axis}{data}, A, B, U, V, W, X, Y, Z, CALL, READ
CALL
Function Jump to Subprogram With Return
Type Motion program (PROG and ROT)
Syntax CALL{data} [{letter}{data}...]
where:
• the first {data} is a floating-point constant or expression from 1.00000 to
32767.99999, with the integer part representing the motion program number to be
called, and the fractional part representing the line label (N or O) within the program
to be called (the line label number is equal to the fractional part multiplied by
100,000; every motion program has an implicit N0 at the top).
• {letter} is any letter of the English alphabet, except N or O, representing the
variable into which the value following it will be placed (Q101 to Q126 for A to Z
respectively).
• following {data} is a floating-point constant or expression representing the value
to be put into the variable.
Remarks This command allows the program to execute a subprogram and then return execution to
the next line in the program. A subprogram is entered into PMAC the same as a
program, and is labeled as PROGn (so one program can call another as a subprogram).
The number n of the PROG heading is the one to which the value after CALL refers:
CALL7 would execute PROG7 and return.
The value immediately following CALL can take fractional values. If there is no
fractional component, the called program starts at the beginning. If there is a fractional
component, the called program is entered at a line label specified by the fractional
component (if this label does not exist, PMAC will generate an error and stop execution).
PMAC works with five fractional digits to specify the line label; if fewer are used, it
automatically fills out the rest with zeros. For instance, CALL 35.1 is interpreted as
CALL 35.10000, which causes a jump to label N10000 of program 35. CALL
47.123 causes a jump to label N12300 of program 47.
If letters and data (e.g. X1000) follow the CALL{data}, these can be arguments to be
passed to the subprogram. If arguments are to be passed, the first line executed in the
subroutine should be a READ statement. This statement will take the values associated
with the specified letters and place them in the appropriate Q-variable. For instance, the
data following A is placed in variable Q101 for the coordinate system executing the
program; that following B is placed in Q102; and so on, until the data following Z is
placed in Q126. The subprogram can then use these variables.
If the subprogram calls another subprogram with arguments, the same Q-variables are
used. Refer to READ for more details.
If there is no READ statement in the subroutine, or if not all the letter values in the CALL
line are read (the READ statement stops as soon as it sees a letter in the calling line that is
not in its list of letters to read), the remaining letter commands are executed upon return
from the subroutine. For example, G01 X10 Y10 is equivalent to a CALL 1000.01
X10 Y10. To implement the normal function for G01 (linear move mode), there would
be the following subroutine in PROG 1000:
N1000 LINEAR RETURN
Upon the return, X10 Y10 would be executed as a move according to the move mode in
force, which is LINEAR.
If the specified program and/or line label do not exist, the CALL command is ignored,
and the program continues as if it were not there. No error is generated.
Example CALL500 ; to Prog 500 at the top (N0)
CALL500.1 ; to Prog 500 label N10000
CALL500.12 ; to Prog 500 label N12000
CALL500.123 ; to Prog 500 label N12300
CALL500.1234 ; to Prog 500 label N12340
CALL500.12345 ; to Prog 500 label N12345
CALL700 D10 E20 ; to Prog 700 passing D and E
See Also On-line command B{constant}
Program commands GOTO, GOSUB, READ, RETURN, G{data}, M{data}, T{data},
D{data}, N{constant}, O{constant}, PRELUDE
CC0
Function Turn Off Cutter Radius Compensation
Type Motion program (PROG and ROT)
Syntax CC0
Remarks This turns off the cutter radius compensation mode, reducing it gradually through the
next move. This is equivalent to the G40 command of the machine-tool standard RS-274
language.
Example CCR0.5 ; 1/2 unit cutter radius
CC1 ; Cutter compensation on to the left
X10 Y10 ; Compensation introduced during this move
X10 Y20
X20 Y20
X20 Y10
X10 Y10
CC0 ; Cutter compensation off
X0 Y0 ; Compensation eliminated during this move
OPEN PROG 1000 ; G-Code Subprogram
...
N40000 CC0 RETURN ; To implement G40 directly in PMAC
See Also Cutter (Tool) Radius Compensation
Program commands CC1, CC2, CCR{data}
CC1
Function Turn On Cutter Radius Compensation Left
Type Motion program (PROG and ROT)
Syntax CC1
Remarks This turns on the cutter radius compensation mode, introducing the compensation
gradually through the next move. The cutter is offset to the left of the programmed tool
path, looking in the direction of cutter movement. The plane of the compensation is
determined by the NORMAL command. This is equivalent to the G41Error!
Bookmark not defined. command of the machine-tool standard RS-274
language.
Example CCR0.25 ; 1/4 unit cutter radius
CC1 ; Cutter compensation on to the left
X10 Y10 ; Compensation introduced during this move
X10 Y20
X20 Y20
X20 Y10
X10 Y10
CC0 ; Cutter compensation off
X0 Y0 ; Compensation eliminated during this move
OPEN PROG 1000 ; G-Code Subprogram
...
N41000 CC1 RETURN ; To implement G41 directly in PMAC
See Also Cutter (Tool) Radius Compensation
Program commands CC2, CC0, CCR{data}, NORMAL
CC2
Function Turn On Cutter Radius Compensation Right
Type Motion program (PROG and ROT)
Syntax CC2
Remarks This turns on the cutter radius compensation mode, introducing the compensation
gradually through the next move. The cutter is offset to the right of the programmed tool
path, looking in the direction of cutter movement. The plane of the compensation is
determined by the NORMAL command. This is equivalent to the G42 command of the
machine-tool standard RS-274 language.
Example CCR1.5 ; 1-1/2 unit cutter radius
CC2 ; Cutter compensation on to the right
X10 Y10 ; Compensation introduced during this move
X10 Y20
X20 Y20
X20 Y10
X10 Y10
CC0 ; Cutter compensation off
X0 Y0 ; Compensation eliminated during this move
OPEN PROG 1000 ; G-Code Subprogram
...
N42000 CC2 RETURN ; To implement G42 directly in PMAC
See Also Tool Radius Compensation
Program commands CC1, CC0, CCR, NORMAL
CCR{data}
Function Set Cutter Compensation Radius
Type Motion program (PROG and ROT)
Syntax CCR{data}
where:
• {data} represents the cutter compensation radius to be used, in user length units.
Remarks This sets the radius for cutter compensation (when on) in user units, as defined by the
axis definition statements for the X, Y, and Z axes for the coordinate system. This
function is often part of the D tool data used in the machine-tool standard RS-274 (G)
code.
See Also Program commands CC1, CC2, CC0, D{data}, NORMAL
CIRCLE1
Function Set Blended Clockwise Circular Move Mode
Type Motion program (PROG and ROT)
Syntax CIRCLE1
CIR1
Remarks This command puts the program into clockwise circular move mode. The plane for the
circular interpolation is defined by the most recent NORMAL command, which has also
defined the sense of clockwise and counterclockwise in the plane.
The program is taken out of this circular move mode by another move mode command:
the other CIRCLE mode, LINEAR, PVT, RAPID, etc. Any circular move command
must have either an R or an IJK vector specification. Otherwise it will be performed as a
linear move even when in CIRCLE mode.
Note:
PMAC must be in move segmentation mode (I13>0) in order to perform
circular interpolation. If I13=0 (no move segmentation), the moves will
be linearly interpolated.
Example LINEAR ; Linear interpolation mode
X10Y10 F2 ; Linear move
CIRCLE1 ; Clockwise circular interpolation mode
X20 Y20 I10 ; Arc of 10-unit radius
X25 Y15 J-5 ; Arc of 5-unit radius
LINEAR ; Go back to linear mode
X25 Y5 ; Linear move
See Also Circular Moves (Writing a Motion Program)
I-variable I13
Program commands NORMAL, CIRCLE2, LINEAR, PVT, RAPID, SPLINE1,
{axis}{data}{vector}{data}
CIRCLE2
Function Set Blended Counterclockwise Circular Move Mode
Type Motion program (PROG and ROT)
Syntax CIRCLE2
CIR2
Remarks The CIRCLE2 command puts the program into counterclockwise circular move mode.
The plane for the circular interpolation is defined by the most recent NORMAL command,
which has also defined the sense of clockwise and counterclockwise in the plane.
The program is taken out of this circular move mode by another move mode command:
the other CIRCLE mode, LINEAR, PVT, RAPID, etc. Any circular move command
must have either an R or an IJK vector specification. Otherwise it will be performed as a
linear move even when in CIRCLE mode.
Note:
PMAC must be in move segmentation mode (I13>0) in order to perform
circular interpolation. If I13=0 (no move segmentation), the moves will
be linearly interpolated.
for a new command, program execution is temporarily halted until the new command can
be placed on the queue.
Also, commands that generate a response to the host (including errors if I6 is not equal to
2) potentially can fill up the response queue if there is no host or the host is not prepared
to read the responses. This will temporarily halt program execution until the response
queue is emptied. In standalone applications, it is a good idea to set I1 to 1, disabling the
serial handshake, so any responses can be sent out the serial port (the default response
port) at any time, even if there is no host to receive it.
In a PLC program, it is a good idea to have at least one of the conditions that caused the
command issuance to occur set false immediately. This will prevent the same command
from being issued again on succeeding scans of the PLC, overflowing the command
and/or response queues.
Typically in a motion program, the time between moves prevents this overflow unless
there are a lot of commands and the moves take a very short time.
PMAC will not issue an acknowledging character (<ACK> or <LF>) to a valid command
issued from a program. It will issue a <BELL> character for an invalid command issued
from a program unless I6 is set to 2. It is a good idea to have I6 not set to 2 in early
development so you will know when PMAC has rejected such a command. Setting I6 to
2 in the actual application can prevent program hang up from a full response queue, or
from disturbing the normal host communications protocol.
If PMAC variable I64 is set to 1, any response sent to the host as a result of an internal
COMMAND statement is preceded by a <CTRL-B> character, making it easier for the host
computer to tell that this is an unsolicited response.
Many otherwise valid commands will be rejected when issued from a motion program.
For instance, you cannot jog any motor in the coordinate system executing the program,
because all these motors are considered to be running in the program, even if the program
is not requesting a move of the motors at that time.
When issuing commands from a program, be sure to include all the necessary syntax
(motor and/or coordinate system specifiers) in the command statement or use the
ADDRESS command. For example, use CMD"#4HM" and CMD"&1A" instead of
CMD"HM" and CMD"A". Otherwise, motor and coordinate system commands will be
sent to the most recently addressed motor and coordinate system.
Example COMMAND"#1J+"
CMD"#4HM"
CMD"&1B5R"
CMD"P1"
47.5
ADDRESS#3
COMMAND"J-"
IF(M40=1 AND M41=1)
CMD"&4R"
M41=0
ENDIF
See Also Addressing Modes, On-Line Commands (Talking To PMAC)
I-variables I1, I3, I6.
Program commands ADDRESS, COMMAND^{letter}
Writing A PLC Program
COMMAND^{letter}
Function Program Control-Character Command Issuance
Type Motion program (PROG or ROT), PLC program
Syntax COMMAND^{letter}
CMD^{letter}
where:
• {letter} is a letter character from A to Z (upper or lowercase) representing the
corresponding control character.
Remarks This statement causes the motion program to issue a control-character command as if it
came from the host. All control-character commands are global, so there are no
addressing concerns.
Warning:
Do not put the up-arrow character and the letter in quotes (do not use
COMMAND"^A") or PMAC will attempt to issue a command with the
two non-control characters ^ and A for this example, instead of the
control character.
Commands issued from within a program are placed in the command queue, to be parsed
and acted upon at the appropriate time by PMAC’s command interpreter, which operates
in background, between other background tasks. If issued from a motion program, the
command will not be interpreted before the next move or dwell command in the motion
program is calculated. If issued from a PLC program, the command will not be
interpreted before the end of the current scan of the PLC. This delay can make the action
appear to execute out of sequence.
Because of the queuing of commands and the fact that command interpretation is a lower
priority than command issuing, it is possible to overflow the queue. If there is no room
for a new command, program execution is temporarily halted until the new command can
be placed on the queue.
Also, commands that generate a response to the host (including errors if I6 is not equal to
2) can fill up the response queue if there is no host or the host is not prepared to read the
responses. This will temporarily halt program execution until the response queue is
emptied. In standalone applications, it is a good idea to set I1 to 1, disabling the serial
handshake, so any responses can be sent out the serial port (the default response port) at
any time, even if there is no host to receive it.
In a PLC program, it is a good idea to have at least one of the conditions that caused the
command issuance to occur set false immediately. This will prevent the same command
from being issued again on succeeding scans of the PLC, overflowing the command
and/or response queues. Typically in a motion program, the time between moves
prevents this overflow unless there are a lot of commands and the moves take a very
short time.
PMAC will not issue an acknowledging character (<ACK> or <LF>) to a valid command
issued from a program. It will issue a <BELL> character for an invalid command issued
from a program unless I6 is set to 2. It is a good idea to have I6 not set to 2 in early
development so you will know when PMAC has rejected such a command. Setting I6 to
2 in the actual application can prevent program hangup from a full response queue, or
If PMAC variable I64 is set to 1, any response sent to the host as a result of an internal
COMMAND statement is preceded by a <CTRL-B> character, making it easier for the host
computer to tell that this is an unsolicited response.
Example CMD^D would disable all PLC programs (equivalent to issuing a <CONTROL-D> from the host).
CMD^K would kill (disable) all motors on PMAC.
CMD^A would stop all programs and moves on PMAC, also closing any loops that were open.
See Also I-variables I1, I6
On-line commands <CONTROL-A> to <CONTROL-Z>
Program command COMMAND”{command}”
D{data}
Function Tool Data (D-Code)
Type Motion program
Syntax D{data}
where:
• {data} is a floating-point constant or expression in the range 0.000 to 999.999,
specifying the program number and the line label to jump to
Remarks PMAC interprets this statement as a CALL 10n3.({data’}*1000) command,
where n is the hundreds’ digit of {data}, and {data’} is the value of {data}
without the hundred’s digit (modulo 100 in mathematical terms). That is, this statement
causes a jump (with return) to motion program 10n3, and the specified line label.
(Programs 10n3 are usually used to implement the tool data operations as the system
designer sees fit.) The value of {data’} can be from 0.0 to 99.999, corresponding to
line labels N0 to N99999.
If the specified program and/or line label do not exist, the D command is ignored, and the
program continues as if it were not there. No error is generated.
This structure permits the implementation of customizable D-code routines for machine-
tool style applications by the writing of subroutines in motion programs 10n3.
Arguments can be passed to these subroutines by following the D-code with one or more
sets of {letter}{data}, as in CALL and READ statements.
Most users will have D-codes only in the range 0-99, which permits the use of PROG
1003 only, and allows {data’} to equal {data} for direct specification of the line
label.
Example D01 jumps to N1000 of PROG 1003
D12 jumps to N12000 of PROG 1003
D115 jumps to N15000 of PROG 1013
See Also Program commands CALL{data}, G{data}, M{data}, T{data}, RETURN
DELAY{data}
Function Delay for Specified Time
Type Motion program
Syntax DELAY{data}
DLY{data}
where:
• {data} is a floating-point constant or expression, specifying the delay time in
milliseconds.
Remarks This command causes PMAC to keep the command positions of all axes in the
coordinate system constant (no movement) for the time specified in {data}.
There are three differences between DELAY and DWELL. First, if DELAY comes after a
blended move, the TA deceleration time from the move occurs within the DELAY time,
not before it. Second, the actual time for DELAY does varies with a changing time base
(current %value, from whatever source), whereas DWELL always uses the fixed time base
(%100). Third, PMAC precomputes upcoming moves (and the lines preceding them)
during a DELAY, but it does not do so during a DWELL.
A DELAY command is equivalent to a zero-distance move of the time specified in
milliseconds. As for a move, if the specified DELAY time is less than the acceleration
time currently in force (TA or 2*TS), the delay will be for the acceleration time, not the
specified DELAY time.
Example DELAY750
DELAY(Q1+100)
See Also Time-Base Control (Synchronizing PMAC to External Events)
I-variables I10, Ix87, Ix88
On-line command %{constant}
Program commands DWELL, TA, TS
DISABLE PLC
Function Disable PLC Program(s)
Type Motion program (PROG or ROT), PLC program
Syntax DISABLE PLC {constant}[,{constant}...]
DIS PLC {constant}[,{constant}...]
DISABLE PLC {constant}[..{constant}]
DIS PLC {constant}[..{constant}]
where:
• {constant} is an integer from 0 to 31, representing the program number.
Remarks This command causes PMAC to disable (stop executing) the specified uncompiled PLC
program or programs. Execution can subsequently be resumed at the top of the program
with the ENABLE PLC command. If it is desired to restart execution at the stopped
point, execution should be stopped with the PAUSE PLC command, and restarted with
the RESUME PLC command.
Execution of a PLC program can only be disabled at the end of a scan, which is either the
end of the program, or after executing an ENDWHILE statement in the program. (A PLC
program can be paused in the middle of a scan, however.)
PLC programs are specified by number, and may be specified in a command singularly,
in a list (separated by commas), or in a range of consecutively numbered programs.
If no buffer is open when this command is sent to PMAC, it will be executed
immediately as an on-line command.
Example DISABLE PLC 1
DISABLE PLC 4,5
DISABLE PLC 7..20
DIS PLC 3,8,11
DIS PLC 0..31
See Also
I-variable I5
On-line commands ENABLE PLC, DISABLE PLC, ENABLE PLCC, DISABLE
PLCC, <CONTROL-D>
Program command ENABLE PLC, DISABLE PLCC, ENABLE PLCC
DISABLE PLCC {constant}[,{constant}...]
Function Disable Compiled PLC Programs
Type Motion program (PROG or ROT), PLC program (uncompiled or compiled), except for
PLC0 and PLCC0
Syntax DISABLE PLCC {constant}[,{constant}...]
DISABLE PLCC {constant}[..{constant}]
DIS PLCC {constant}[,{constant}...]
DIS PLCC {constant}[..{constant}]
where:
• {constant} is an integer from 0 to 31 representing the compiled PLC number
Remarks
Warning:
This command should not be used in a foreground PLC either
uncompiled PLC 0 or compiled PLCC 0 as its operation cannot be
guaranteed in these programs.
This command disables the operation of the specified compiled PLC (PLCC) programs.
The programs are specified by number, and can be used singly, in a list separated by
commas, or in a continuous range.
I-variable I5 is a separate master control of PLC program operation. Think of the two
bits of I5 as two master circuit breakers for a house, and the individual PLC and PLCC
enable/disable bits as separate light switches within the house. Both the master breaker
and the switch must be on for the PLC to operate. The breakers and the switches can be
operated independently without affecting the setting of the others.
Example DISABLE PLCC 1
DISABLE PLCC 4,5
DISABLE PLCC 7..20
DIS PLCC 3,8,11
DIS PLC 0..31
See Also I-variable I5
On-line commands ENABLE PLC, DISABLE PLC, ENABLE PLCC, DISABLE
PLCC, <CONTROL-D>
Program command ENABLE PLC, DISABLE PLC, ENABLE PLCC
DISPLAY [{constant}] "{message}"
Function Display Text to Display Port
Type Motion program (PROG and ROT), PLC program
Syntax DISPLAY [{constant}] "{message}"
DISP [{constant}] "{message}"
where:
• {constant} is an integer value between 0 and 79 specifying the starting character
number on the display; if no value is specified, 0 is used.
Remarks This command causes PMAC to send the string contained in {message} to the display
port (J1 connector) for the liquid-crystal or vacuum-fluorescent display (Accessory 12 or
equivalent).
The optional constant value specifies the starting point for the string on the display. It has
a range of 0 to 79, where 0 is upper left, 39 is upper right, 40 is lower left, and 79 is
lower right.
Example DISPLAY 10"Hello World"
DISP "VALUE OF P1 IS"
DISP 15, 8.3, P1
See Also Display Port (Connecting PMAC to the Machine);
Accessory 12 (Basic Specifications)
Program commands DISPLAY {variable}, SEND"{message}"
DISPLAY ... {variable}
Function Formatted Display of Variable Value
Type Motion program (PROG and ROT), PLC program
Syntax DISPLAY {constant}, {constant}.{constant}, {variable}
DISP {constant}, {constant}.{constant}, {variable}
where:
• the first {constant} is an integer from 0 to 79 representing the starting location
(character number) on the display.
• the second {constant} is an integer from 2 to 16 representing the total number of
characters to be used to display the value (integer digits, decimal point, and fractional
digits).
• the third {constant} is an integer from 0 to 9 (and at least two less than the
second {constant}) representing the number of fractional digits to be displayed.
• {variable} is the name of the variable to be displayed.
Remarks This command causes PMAC to send a formatted string containing the value of the
specified variable to the display port. The value of any I, P, Q, or M variable may be
displayed with this command.
The first constant value specifies the starting point for the string on the display. It has a
range of 0 to 79, where 0 is upper left, 39 is upper right, 40 is lower left, and 79 is lower
right. The second constant specifies the number of characters to be used in displaying
the value. It has a range of 2 to 16. The third constant specifies the number of places to
the right of the decimal point. It has a range of 0 to 9, and must be at least 2 less than the
number of characters. The last thing specified in the statement is the name of the
variable – I, P, Q, or M.
Example DISPLAY 0, 8.0, P50
DISPLAY 24, 2.0, M1
DISPLAY 40, 12.4, Q100
See Also Display Port (Connecting PMAC to the Machine);
Accessory 12 (Basic Specifications)
Program commands DISPLAY"{message}", COMMAND"{command}"
DWELL
Function Dwell for Specified Time
Type Motion program (PROG and ROT)
Syntax DWELL{data}
DWE{data}
where:
• {data} is a non-negative floating point constant or expression representing the
dwell time in milliseconds.
Remarks This command causes the card to keep the commanded positions of all axes in the
coordinate system constant for the time specified in {data}.
There are three differences between DWELL and the similar DELAY command. First, if
the previous servo command was a blended move, there will be a TA time deceleration to
a stop before the dwell time starts. Second, DWELL is not sensitive to a varying time
base – it always operates in ‘real time’ (as defined by I10). Third, PMAC does not pre-
compute upcoming moves (and the program lines before them during the DWELL; it waits
until after it is done to start further calculations, which it performs in the time specified
by I11 or I12.
Use of any DWELL command, even a DWELL0, while in external time base will cause a
loss of synchronicity with the master signal.
Example DWELL250
DWELL(P1+P2)
DWE0
See Also Dwell and Delay (Writing a Motion Program)
I-variables I10, I11, I12.
Program command DELAY
ELSE
Function Start False Condition Branch
Type Motion program (PROG only), PLC program
Syntax ELSE (Motion or PLC Program)
ELSE {action} (Motion Program only)
Remarks Warning:
With nested IF branches, be careful to match the ELSE statements to the
proper IF statement. In a motion program, it is possible to have a
single-line IF statement (IF({condition}) {action}). An
ELSE statement on the next program line is automatically matched to
this IF statement. Put a non-ELSE statement in between to make the
next ELSE statement match a previous IF statement.
This statement must be matched with an IF statement (ELSE requires a preceding IF,
but IF does not require a following ELSE). It follows the statements executed upon a
true IF condition. It is followed by the statements to be executed upon a false IF
condition.
ELSE lines can take two forms (only the first of which is valid in a PLC program):
With no statement following on that line, all subsequent statements down to the next
ENDIF statement will be executed provided that the preceding IF condition is false.
ELSE
{statement}
[{statement}
...]
ENDIF
With a statement or statements following on that line, the single statement will be
executed provided that the preceding IF condition is false. No ENDIF statement should
be used in this case.
ELSE {statement} [{statement}...]
Note:
This single-line ELSE branch form is valid only in motion programs. If
this is tried in a PLC program, PMAC will put the statements on the next
program line and expect an ENDIF to close the branch. The logic will
not be as expected.
Example This first example has multi-line true and false branches. It could be used in either a motion
program or a PLC program:
IF (M11=1)
P1=17
P2=13
ELSE
P1=13
P2=17
ENDIF
This second example has a multi-line true branch, and a single-line false branch. This structure
could only be used in a motion program:
IF (M11=0)
X(P1)
DWELL 1000
ELSE DWELL 500
This example has a single-line true branch, and a multi-line false branch. This structure could
only be used in a motion program:
IF (SIN(P1)>0.5) Y(1000*SIN(P1))
ELSE
P1=P1+5
Y(1100*SIN(P1))
ENDIF
This example has single-line true and false branches. This structure could only be used in a
motion program:
IF (P1 !< 5) X10
ELSE X-10
See Also Program commands IF, ENDIF.
ENABLE PLC
Function Enable PLC Buffer(s)
Type Motion program (PROG and ROT), PLC program
Syntax ENABLE PLC {constant}[,{constant}...]
ENA PLC {constant}[,{constant}...]
ENABLE PLC {constant}[..{constant}]
ENA PLC {constant}[..{constant}]
where:
• {constant} is an integer from 0 to 31 representing the program number.
Remarks This command causes PMAC to enable (start executing) the specified uncompiled PLC
program or programs at the top of the program. Execution of the PLC program may have
been stopped with the DISABLE PLC, PAUSE PLC, or OPEN PLC command.
PLC programs are specified by number, and may be used singularly in this command, in
a list (separated by commas), or in a range of consecutively numbered programs.
If no buffer is open when this command is sent to PMAC, it will be executed
immediately as an on-line command.
Example ENABLE PLC 0
ENABLE PLC 1,2,5
ENABLE PLC 1..16
ENA PLC 7
See Also I-variable I5
On-line commands ENABLE PLC, DISABLE PLC, <CONTROL-D>
Program command DISABLE PLC
ENABLE PLCC
Function Enable Compiled PLC Program(s)
Type Motion program (PROG and ROT), PLC program (uncompiled and compiled)
Syntax ENABLE PLCC {constant}[,{constant}...]
ENABLE PLCC {constant}[..{constant}]
ENA PLCC {constant}[,{constant}...]
ENA PLCC {constant}[..{constant}]
where:
• {constant} is an integer from 0 to 31 representing the compiled PLC number.
Remarks This command enables the operation of the specified compiled PLC (PLCC) buffers,
provided I5 is set properly to allow their operation. The programs are specified by
number, and can be used singly, in a list separated by commas, or in a continuous range.
I-variable I5 is a separate master control of PLC program operation. Think of the two
bits of I5 as two master circuit breakers for a house, and the individual PLC and PLCC
enable/disable bits as separate light switches within the house. Both the master breaker
and the switch must be on for the PLC to operate. The breakers and the switches can be
operated independently without affecting the setting of the others.
Example ENABLE PLCC 0
ENABLE PLCC 1,2,5
ENABLE PLCC 1..16
ENA PLCC 7
PLCs). The next scan of this PLC will start at the matching WHILE statement.
In the execution of a motion program, if PMAC finds two jumps backward (toward the
top) in the program while looking for the next move command, PMAC will pause
execution of the program and not try to blend the moves together. It will go on to other
tasks and resume execution of the motion program on a later scan. Two statements can
cause such a jump back: ENDWHILE and GOTO (RETURN does not count).
The pertinent result is that PMAC will not blend moves when it hits two ENDWHILE
statements (or the same ENDWHILE twice) between execution of move commands.
Example WHILE (Q10<10)
Q10=Q10+1
ENDWHILE
See Also Program commands WHILE, ENDIF
F{data}
Function Set Move Feedrate (Velocity)
Type Motion program (PROG and ROT)
Syntax F{data}
where:
• {data} is a positive floating-point constant or expression representing the vector
velocity in user length units per user time units.
Remarks This statement sets the commanded velocity for upcoming LINEAR and CIRCLE mode
blended moves. It will be ignored in other types of moves (SPLINE, PVT, and RAPID).
It overrides any previous TM or F statement, and is overridden by any following TM or F
statement.
The units of velocity specified in an F command are scaled position units (as set by the
axis definition statements) per time unit (defined by “Feedrate Time Unit” I-variable for
the coordinate system: Ix90).
The velocity specified here is the vector velocity of all of the feedrate axes of the
coordinate system. That is, the move time is calculated as the vector distance of the
feedrate axes (square root of the sum of the squares of the individual axes), divided by
the feedrate value specified here. The minimum effective feedrate value will provide a
move time of 223 msec. The maximum effective feedrate value will provide a move time
of 1 msec. Any non-feedrate axes commanded to move on the same move-command line
will move at the speed necessary to finish in this same amount of time.
Note:
If the vector distance of a feedrate-specified move is so short that the
computed move time (vector distance divided by feedrate) would be less
than the acceleration time currently in force (TA or 2*TS), the move will
take the full acceleration time instead, and the axes will move more
slowly than specified by the F command.
Axes are designated as feedrate axes with the FRAX command. If no FRAX command is
used, the default feedrate axes are the X, Y, and Z axes. Any axis involved in circular
interpolation is automatically a feedrate axis, regardless of whether it was specified in the
latest FRAX command. In multi-axis systems, feedrate specification of moves is really
only useful for systems with Cartesian geometries, for which these moves give a constant
INC
X30 Y40 Z10 F100
2 2
Vector distance is SQRT(30 + 40 ) = 50 mm. At a speed of 100 mm/sec, move time (unblended)
is 0.5 sec. X-axis speed is 30/0.5 = 60 mm/sec; Y-axis speed is 40/0.5 = 80 mm/sec; Z-axis speed
is 10/0.5 = 20 mm/sec.
Z20
2 2
Vector distance is SQRT(0 +0 ) = 0 mm. Move time (unblended) is 0.0 sec, so Z-axis speed is
limited only by acceleration parameters.
FRAX(X,Y,Z)
INC
X-30 Y-40 Z120 F65
2 2 2
Vector distance is SQRT(-30 + -40 +120 ) = 130 mm. Move time is 130/65 = 2.0 sec. X-axis
speed is 30/2.0 = 15 mm/sec; Y-axis speed is 40/2.0 = 20 mm/sec; Z-axis speed is 120/2.0 = 60
mm/sec.
See Also I-variables Ix87, Ix88, Ix89, Ix90
On-line command FRAX
Program commands F, LINEAR, CIRCLE, {axis}{data}.
G{data}
Function Preparatory Code (G-Code)
Type Motion program
Syntax G{data}
where:
• {data} is a floating-point constant or expression in the range 0.000 to 999.999,
specifying the program number and the line label to jump to
Remarks PMAC interprets this statement as a CALL 10n0.({data’}*1000) command,
where n is the hundreds’ digit of {data}, and {data’} is the value of {data}
without the hundred’s digit (modulo 100 in mathematical terms). That is, this statement
causes a jump (with return) to motion program 10n0, and the specified line label.
(Programs 10n0 are usually used to implement the preparatory codes as the system
designer sees fit.) The value of {data’} can be from 0.0 to 99.999, corresponding to
line labels N0 to N99999.
If the specified program and/or line label do not exist, the G command is ignored, and the
program continues as if it were not there. No error is generated.
This structure permits the implementation of customizable G-code routines for machine-
tool style applications by the writing of subroutines in motion programs 10n0.
Arguments can be passed to these subroutines by following the G-code with one or more
sets of {letter}{data}, as in CALL and READ statements.
Most users will have G-codes only in the range 0-99, which permits the use of PROG
1000 only, and allows {data’} to equal {data} for direct specification of the line
label.
Example G01 jumps to N1000 of PROG 1000
G12 jumps to N12000 of PROG 1000
G115 jumps to N15000 of PROG 1010
See Also Program commands CALL{data}, D{data}, M{data}, T{data}, RETURN
GOSUB
Function Unconditional Jump With Return
Type Motion program (PROG only)
Syntax GOSUB{data}
where:
• {data} is a constant or expression representing the line label to jump to.
• {letter} (optional) is any letter character except N or O.
Remarks This command causes the motion program execution to jump to the line label (N or O) of
the same motion program specified in {data}, with a jump back to the commands
immediately following the GOSUB upon encountering the next RETURN command.
If {data} is a constant, the path to the subroutine will have been linked before program
run time, so the jump is very quick. If {data} is a variable expression, it must be
evaluated at run time, and the appropriate label then searched for.
The search starts downward in the program to the end, then continues (if necessary) from
the top of the program down.
A variable GOSUB command permits the equivalent structure to the CASE statement
found in many high-level languages.
If the specified line label is not found, the GOSUB command will be ignored, and the
program will continue as if the command had not occurred.
The CALL command is similar, except that it can jump to another motion program.
Example GOSUB300 jumps to N300 of this program, to jump back on RETURN.
GOSUB8743 jumps to N8743 of this program, to jump back on RETURN.
GOSUB(P17) jumps to the line label of this program whose number matches the current
value of P17, to jump back on RETURN.
See Also Writing a Motion Program
Program commands CALL, GOTO, N, O, RETURN
GOTO
Function Unconditional Jump Without Return
Type Motion program (PROG only)
Syntax GOTO{data}
where:
• {data} is an integer constant or expression with a value from 0 to 99,999.
Remarks This command causes the motion program execution to jump to the line label (N or O)
specified in {data} with no jump back.
If {data} is a constant, the path to the label will have been linked before program run
time, so the jump is very quick. If {data} is a variable expression, it must be evaluated
at run time, and the appropriate label then searched for. The search starts downward in
the program to the end, then continues (if necessary) from the top of the program down.
A variable GOTO command permits the equivalent structure to the CASE statement found
in many high-level languages. (See Example, below.)
If the specified line label is not found, the program will stop, and the coordinate system’s
Run-Time-Error bit will be set.
Note:
Modern philosophies of the proper structuring of computer code strongly
discourage the use of GOTO, because of its tendency to make code
undecipherable.
Example GOTO750
GOTO35000
GOTO1
GOTO(50+P1)
N51 P10=50*SIN(P11)
GOTO60
N52 P10=50*COS(P11)
GOTO60
N53 P10=50*TAN(P11)
N60 X(P10)
See Also Writing a Motion Program;
Program commands CALL, GOSUB, N, O.
HOME
Function Programmed Homing
Type Motion program
Syntax HOME {constant} [,{constant}...]
HOME {constant}..{constant} [,{constant}..{constant}...]
HM {constant} [,{constant}...]
HM {constant}..{constant} [,{constant}..{constant}...]
where:
• {constant} is an integer from one to eight representing a motor number.
Remarks This causes the specified motors to go through their homing search cycles. The motors
must be specified directly by number, not the matching axis letters. Also specify which
motors are to be homed. All motors specified in a single HOME command (e.g.,
HOME1,2) will start their homing cycles simultaneously. To home some motors
sequentially, specify them in consecutive commands (e.g., HOME1 HOME2), even if on
the same line.
Any previous moves will come to a stop before the home moves start. No other program
statement will be executed until all specified motors have finished homing. Homing
direction, speed, acceleration, etc., are determined by motor I-variables. If a motor is
specified that is not in the coordinate system running the program, the command or
portion of the command will be ignored, but an error will not be generated.
The speed of the home search move is determined by Ix23. If Ix23=0 then the
programmed home command for that axis is ignored.
Note:
Unlike an on-line homing command, the motor numbers in a program
homing command are specified after the word HOME itself, not before.
In addition, an on-line homing command simply starts the homing search
– it does not give any indication when the search is complete; but a
program homing command automatically recognizes the end of the
search, and then continues on in the program. A PLC program can only
issue an on-line home command.
Example HOME1 ;These are motion program commands
HM1,2,3
HOME1..3,5..7
HM1..8
#1HOME ;These are on-line commands
#1HM,#2HM,#3HM
See Also Homing-Search Moves (Basic Motor Moves)
On-line motor commands HOME, HOMEZ
Program command HOMEZ
HOMEZ
Function Programmed Zero-Move Homing
Type Motion program
Syntax HOMEZ {constant} [,{constant}...]
HOMEZ {constant}..{constant} [,{constant}..{constant}...]
HMZ {constant} [,{constant}...]
HMZ {constant}..{constant} [,{constant}..{constant}...]
where:
• {constant} is an integer from one to eight representing a motor number.
Remarks This commands causes the specified motors to go through pseudo-homing search cycles.
In this operation, the present commanded position of the motor is made the zero position
for the motor and the new commanded position for the motor.
If there is a following error and/or an axis definition offset at the time of the HOMEZ
command, the reported position after the command will be equal to the negative of the
following error plus the axis definition offset.
The motors must be specified directly by number, not the matching axis letters. Specify
which motors are to be homed. All motors specified in a single HOMEZ command (e.g.
HOMEZ1,2) will home simultaneously.
Note:
Unlike an on-line homing command, the motor numbers in a program
homing command are specified after the word HOMEZ itself, not before.
Example HOMEZ1 ;These are motion program commands
HMZ1,2,3
HOMEZ1..3,5..7
HMZ1..8
#1HOMEZ ;These are on-line commands
#1HMZ,#2HMZ,#3HMZ
See Also How PMAC Executes a Motion Program (Writing a Motion Program)
On-line command I{constant}={expression}
Program commands M{constant}={expression),
P{constant}={expression}, Q{constant}={expression},
M{constant}=={expression}
IDIS{constant}
Function Incremental displacement of X, Y, and Z axes
Type Motion program (PROG and ROT)
Syntax IDIS{constant
where:
• {constant} is an integer representing the number of the first of three consecutive
Q-variables to be used in the displacement vector.
Remarks This command adds to the offset values of the currently selected (with TSEL)
transformation matrix for the coordinate system the values contained in the three Q-
variables starting with the specified one.
This has the effect of renaming the current commanded X, Y, and Z axis positions (from
the latest programmed move) by adding the values of these variables
(Xnew=Xold+Q{constant}, Ynew=Yold+Q({constant}+1),
Znew=Zold+Q({constant}+2)). This command does not cause any movement of any
axes. It simply renames the present positions.
This command is similar to a PSET command, except that IDIS is incremental and does
not force a stop between moves, as PSET does.
Example X0 Y0 Z0
Q20=7.5
Q21=12.5
Q22=20
IDIS 20 ; This makes the current position X7.5, Y12.5, Z20
IDIS 20 ; This makes the current position X15 Y25 Z40
See Also Axis Matrix Transformations (Writing a Motion Program)
On-line command DEFINE TBUF
Program commands TSEL, ADIS, AROT, IROT, TINIT
IF ({condition})
Function Conditional branch
Type Motion and PLC program
Syntax IF ({condition}) (Valid in fixed motion (PROG) or PLC program only)
IF ({condition}) {action} [{action}...] (Valid in rotary or fixed
motion program only)
where:
• {condition} consists of one or more sets of {expression} {comparator}
{expression}, joined by logical operators AND or OR.
• {action} is a program command.
Remarks This command allows conditional branching in the program.
With an action statement or statements following on that line, it will execute those
statements provided the condition is true (this syntax is valid in motion programs only).
Remarks The INC command without arguments causes all subsequent command positions in
motion commands for all axes in the coordinate system running the motion program to be
treated as incremental distances from the latest command point. This is known as
incremental mode, as opposed to the default absolute mode.
An INC statement with arguments causes the specified axes to be in incremental mode,
and all others stay the way they were before.
If R is specified as one of the axes, the I, J, and K terms of the circular move radius
vector specification will be specified in incremental form (i.e. as a vector from the move
start point, not from the origin). An INC command without any arguments does not
affect this vector specification. The default radial vector specification is incremental.
If no motion program buffer is open when this command is sent to PMAC, it will be
executed as an on-line coordinate system command.
Example INC(A,B,C)
INC
INC(U)
INC(R)
See Also Circular Moves (Writing a Motion Program)
On-line commands ABS, INC
Program commands {axis}{data}, {axis}{data}{vector}{data}, ABS.
IROT{constant}
Function Incremental rotation/scaling of X, Y, and Z axes
Type Motion program (PROG and ROT)
Syntax IROT{constant}
where:
• {constant} is an integer representing the number of the first of nine consecutive
Q-variables to be used in the rotation/scaling matrix
Remarks This command multiplies the currently selected (with TSEL) transformation matrix for
the coordinate system by the rotation/scaling values contained in the nine Q-variables
starting with the specified one. This has the effect of renaming the current commanded
X, Y, and Z axis positions (from the latest programmed move) by multiplying the
existing rotation/scaling matrix by the matrix containing these Q-variables, adding angles
of rotation and multiplying scale factors.
The rotation and scaling is done relative to the latest rotation and scaling of the XYZ
coordinate system, defined by the most recent AROT or IROT commands. The math
performed is:
[New Rot Matrix] = [Old Rot Matrix] [Incremental Rot Matrix]
T
[Xrot Yrot Zrot] = [New Rot Matrix] [Xbase Ybase Zbase] T
This command does not cause movement of any axes. It simply renames the present
positions.
Note:
When using this command to scale the coordinate system, do not use the
radius center specification for circle commands. The radius does not get
scaled. Use the I, J, K vector specification instead.
Example Create a 3x3 matrix to rotate the XY plane by 30 degrees about the origin
Q40=COS(30) Q41=SIN(30) Q42=0
Q43=-SIN(30) Q44=COS(30) Q45=0
Q46=0 Q47=0 Q48=1
IROT 40 ; Implement the change, rotating 30 degrees from current
IROT 40 ; This rotates a further 30 degrees
Create a 3x3 matrix to scale the XYZ space by a factor of 3
Q50=3 Q51=0 Q52=0
Q53=0 Q54=3 Q55=0
Q56=0 Q57=0 Q58=3
IROT 50 ; Implement the change, scaling up by a factor of 3
IROT 50 ; Scale up by a further factor of 3 (total of 9x)
See Also Axis Matrix Transformations (Writing a Motion Program)
On-line command DEFINE TBUF
Program commands TSEL, ADIS, IDIS, AROT, TINIT
J{data}
Function J-Vector Specification for Circular Moves
Type Motion program (PROG and ROT)
Syntax J{data}
where:
• {data} is a floating-point constant or expression representing the magnitude of the
J-component of the vector in scaled user axis units.
Remarks In circular moves, this specifies the component of the vector to the arc center that is
parallel to the Y-axis. The starting point of the vector is either the move start point (for
INC (R) mode – default) or the XYZ-origin (for ABS (R) mode).
In a NORMAL command, this specifies the component of the normal vector to the plane of
circular interpolation and tool radius compensation that is parallel to the Y-axis.
Example X10 Y20 I5 J5
Y(2*P1) J(P1)
J33.333 specifies a full circle whose center is 33.333 units in the
positive Y-direction from the start and end point
NORMAL J-1 specifies a vector normal to the ZX plane
See Also Circular Interpolation, Tool Radius Compensation (Writing a Motion Program)
Motion Program Commands {axis}{data}{vector}{data}, ABS, INC,
NORMAL, I, K.
K{data}
Function K-Vector Specification for Circular Moves
Type Motion program (PROG and ROT)
Syntax K{data}
where:
• {data} is a floating-point constant or expression representing the magnitude of the
K-component of the vector in scaled user axis units.
Remarks In circular moves, this specifies the component of the vector to the arc center that is
parallel to the Z-axis. The starting point of the vector is either the move start point (for
INC (R) mode – default) or the XYZ-origin (for ABS (R) mode).
In a NORMAL command, this specifies the component of the normal vector to the plane of
circular interpolation and tool radius compensation that is parallel to the Y-axis.
Example X10 Z20 I5 K5
Z(2*P1) K(P1)
K33.333 specifies a full circle whose center is 33.333 units in the
positive Z-direction from the start and end point
NORMAL K-1 specifies a vector normal to the XY plane
See Also Circular Interpolation, Tool Radius Compensation (Writing a Motion Program)
Motion Program Commands {axis}{data}{vector}{data}, ABS, INC,
NORMAL, I, J.
LINEAR
Function Blended Linear Interpolation Move Mode
Type Motion program (PROG and ROT)
Syntax LINEAR
LIN
Remarks The LINEAR command puts the program in blended linear move mode (this is the
default condition on power-up/reset). Subsequent move commands in the program will
be processed according to the rules of this mode. On each axis, the card attempts to
reach a constant velocity that is determined by the most recent feedrate (F) or move time
(TM) command.
The LINEAR command takes the program out of any of the other move modes
(CIRCLE, PVT, RAPID, SPLINE). A command for any of these other move modes
takes the program out of LINEAR mode.
Example LINEAR ABS
CIRCLE1 X10 Y20 I5
LINEAR X10 Y0
OPEN PROG 1000 CLEAR
N1000 LINEAR RETURN
See Also Linear Blended Moves (Writing a Motion Program);
I-variables Ix87, Ix88, Ix89, Ix90;
Program commands CIRCLE, PVT, RAPID, SPLINE, TA, TS, TM, F,
{axis}{data}.
M{constant}={expression}
Function Set M-Variable Value
Type Motion program (PROG and ROT)
Syntax M{constant}={expression}
where:
• {constant} is an integer constant from 0 to 1023 representing the number of the
M-variable.
• {expression} is a mathematical expression representing the value to be assigned
to this M-variable.
Remarks This command sets the value of the specified M-variable to that of the expression on the
right side of the equals sign.
Note:
In a motion program, the assignment is done as the line is processed, not
necessarily in order with the actual execution of the move commands on
either side of it. If it is in the middle of a continuous move sequence, the
assignment occurs one or two moves ahead of its apparent place in the
program (because of the need to calculate ahead in the program).
If the actual assignment of the value to the variable should be synchronous with the
beginning of the next move, use the synchronous M-variable assignment command
M{constant}=={expression instead.
Example M1=1
M102=$00FF
M161=P161*I108*32
M20=M20 & $0F
See Also How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands I{constant}=, P{constant}=, Q{constant}=,
M{constant}==.
M{constant}=={expression}
Function Synchronous M-Variable Value Assignment
Type Motion program (PROG and ROT)
Syntax M{constant}=={expression}
where:
• {constant} is an integer constant from 0 to 1023 representing the number of the
M-variable.
• {expression} is a mathematical expression representing the value to be assigned
to this M-variable.
Remarks This command allows the value of an M-variable to be set synchronously with the start of
the next move or dwell. This is especially useful with M-variables assigned to outputs,
so the output changes synchronously with beginning or end of the move. Non-
synchronous calculations (with the single =) are fully executed ahead of time during
previous moves.
Note:
This command may not be used with any of the thumbwheel-multiplexer
forms of M-variables (TWB, TWD, TWR, TWS).
In this form, the expression on the right side is evaluated just as for a non-synchronous
assignment, but the resulting value is not assigned to the specified M-variable until the
start of the actual execution of the following motion command.
Note:
Remember that if this M-variable is used in further expressions before
the next move in the program is started, the value assigned in this
statement will not be received.
Example X10
M1==1 ; Set Output 1 at start of actual blending to next move.
X20
M60==P1+P2
See Also How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands I{constant}=, P{constant}=, Q{constant}=,
M{constant}=.
M{constant}&={expression}
Function M-Variable And-Equals Assignment
Type Motion program (PROG and ROT)
Syntax M{constant}&={expression}
where:
• {constant} is an integer constant from 0 to 1023 representing the number of the
M-variable.
• {expression} is a mathematical expression representing the value to be
‘ANDed’ with this M-variable.
Remarks This command is equivalent to M{constant}=M{constant}&{expression},
except that the bit-by-bit AND and the assignment of the resulting value to the M-
variable do not happen until the start of the actual execution of the following motion
command. The expression itself is evaluated when the program line is encountered, as in
a non-synchronous statement.
Note:
This command may not be used with any of the thumbwheel-multiplexer
forms of M-variables (TWB, TWD, TWR, or TWS), or with any of the
double-word forms (L, D, or F).
Remember that if you use this M-variable in further expressions before
the next move in the program is started, you will not get the value
assigned in this statement.
Example M20&=$FE ; Mask out LSB of byte M20
M346&=2 ; Clear all bits except bit 1
See Also How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands M{constant}=, M{constant}==, M{constant}|=,
M{constant}^=
M{constant}|={expression}
Function M Variable Or-Equals Assignment
Type Motion program (PROG and ROT)
Syntax M{constant}|={expression}
where:
• {constant} is an integer constant from 0 to 1023 representing the number of the
M-variable;
• {expression} is a mathematical expression representing the value to be ‘ORed’
with this M-variable.
Remarks This form is equivalent to M{constant}=M{constant}|{expression}, except
that the bit-by-bit OR and the assignment of the resulting value to the M-variable do not
happen until the start of the following servo command. The expression itself is evaluated
when the program line is encountered, as in a non-synchronous statement.
Note:
This command may not be used with any of the thumbwheel-multiplexer
forms of M-variables (TWB, TWD, TWR, or TWS), or with any of the
double-word forms (L, D, or F).
Remember that if you use this M-variable in further expressions before
the next move in the program is started, you will not get the value
assigned in this statement.
Example M20|=$01 ; Set low bit of byte M20, leave other bits
M875|=$FF00 ; Set high byte, leaving low byte as is
See Also How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands M{constant}=, M{constant}==, M{constant}&=,
M{constant}^=
M{constant}^={expression}
Function M-Variable ‘XOR-Equals’ Assignment
Type Motion program (PROG and ROT)
Syntax M{data}^={expression}
where:
• {constant} is an integer constant from 0 to 1023 representing the number of the
M-variable.
• {expression} is a mathematical expression representing the value to be ‘XORed’
with this M-variable.
Remarks This form is equivalent to M{constant}=M{constant}^{expression}, except
that the bit-by-bit XOR and the assignment of the resulting value to the M-variable do
not happen until the start of the following servo command. The expression itself is
evaluated when the program line is encountered, as in a non-synchronous statement.
Note:
This command may not be used with any of the thumbwheel-multiplexer
forms of M-variables (TWB, TWD, TWR, or TWS), or with any of the
double-word forms (L, D, or F).
Remember that if you use this M-variable in further expressions before
the next move in the program is started, you will not get the value
assigned in this statement.
Example M20^=$FF ; Toggle all bits of byte M20
M99^=$80 ; Toggle bit 7 of M99, leaving other bits as is
See Also How PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing a
Motion Program)
Program Commands M{constant}=, M{constant}==, M{constant}&=,
M{constant}|=
M{data}
Function Machine Code (M-Code)
Type Motion program
Syntax M{data}
where:
• {data} is a floating-point constant or expression in the range 0.000 to 999.999,
specifying the program number and the line label to jump to.
Remarks PMAC interprets this statement as a CALL 10n1.({data’}*1000) command,
where n is the hundreds’ digit of {data}, and {data’} is the value of {data}
without the hundred’s digit (modulo 100 in mathematical terms). That is, this statement
causes a jump (with return) to motion program 10n1, and the specified line label.
(Programs 10n1 are usually used to implement the machine codes as the system designer
sees fit.) The value of {data’} can be from 0.0 to 99.999, corresponding to line labels
N0 to N99999.
If the specified program and/or line label do not exist, the M command is ignored, and the
program continues as if it were not there. No error is generated.
This structure permits the implementation of customizable M-code routines for machine-
tool style applications by the writing of subroutines in motion programs 10n1.
Arguments can be passed to these subroutines by following the M-code with one or more
sets of {letter}{data}, as in CALL and READ statements.
Typically, M-codes will be only in the range 0-99, which permits the use of PROG 1001
only, and allows {data’} to equal {data} for direct specification of the line label.
Example M01 jumps to N1000 of PROG 1001
M12 jumps to N12000 of PROG 1001
M115 jumps to N15000 of PROG 1011
See Also Program commands CALL{data}, D{data}, M{data}, T{data}, RETURN
MACROAUXREAD
Function Read MACRO auxiliary parameter value
Type Background PLC (no motion program, PLC0, or compiled PLC)
Syntax MACROAUXREAD{NodeNum}{ParamNum}{Variable}
MXR{NodeNum}{ParamNum}{Variable}
where:
• {NodeNum} is an integer constant from 0 to 15 specifying the slave number of the
node.
• {ParamNum} is an integer constant from 0 to 65535 specifying the auxiliary
parameter number for this node.
• {Variable} is the name of the PMAC variable (I, P, Q, or M) into which the
parameter value is to be copied.
Remarks This command permits PMAC to read auxiliary register values from slave nodes across
the MACRO ring. The command must specify the node number of the slave node, the
auxiliary parameter number at this node, and the name of the PMAC variable to receive
the value.
Only one auxiliary access (read or write) of a single node can be done on one command
line.
In order to access the auxiliary registers of a MACRO node n, bit n of I1000 must be set
to 1.
If the slave node returns an error message or the slave node does not respond within 32
servo cycles, PMAC will note an error condition. Bit 5 of global status register X:$0003
is set to report such a MACRO auxiliary communications error. Register X:$0798 holds
the error value. It is set to $010000 for a timeout error, or $xxxxFE if the slave node
reports an error, where xxxx is the 16-bit error code reported by the slave node.
Example MACROAUXREAD1,24,P1 ; Read Node 1 Parameter 24 into P1
MXR5,128,M100 ; Read Node 5 Parameter 128 into M100
See Also On-line commands MACROAUX, MACROAUXREAD, MACROAUXWRITE
Program commands MACROAUXWRITE
MACROAUXWRITE
Function Write MACRO auxiliary parameter value
Type Background PLC (no motion program, PLC0, or compiled PLC)
Syntax MACROAUXWRITE{NodeNum}{ParamNum}{Variable}
MXW{NodeNum}{ParamNum}{Variable}
where:
• {NodeNum} is an integer constant from 0 to 15 specifying the slave number of the
node.
• {ParamNum} is an integer constant from 2 to 253 specifying the auxiliary
parameter number for this node.
• {Variable} is the name of the PMAC variable (I, P, Q, or M) from which the
parameter value is to be copied.
Remarks This command permits PMAC to write auxiliary register values to slave nodes across the
MACRO ring. The command must specify the node number of the slave node, the
auxiliary parameter number at this node, and the name of the PMAC variable from which
the value comes.
Only one auxiliary access (read or write) of a single node can be done on one command
line.
In order to access the auxiliary registers of a MACRO node n, bit n of I1000 must be set
to 1.
If the slave node returns an error message or the slave node does not respond within 32
servo cycles, PMAC will note an error condition. Bit 5 of global status register X:$0003
is set to report such a MACRO auxiliary communications error. Register X:$0798 holds
the error value. It is set to $010000 for a timeout error, or $xxxxFE if the slave node
reports an error, where xxxx is the 16-bit error code reported by the slave node.
Example MACROAUXWRITE1,24,P1 ; Write value of P1 to Node 1 Parameter 24
MXW5,128,M100 ; Write value of M100 to Node 5 Parameter 128
See Also On-line commands MACROAUX, MACROAUXREAD, MACROAUXWRITE
Program commands MACROAUXREAD
MACROSLVREAD
Function Read (copy) Type 1 MACRO auxiliary parameter value
Type Uncompiled PLC 1 – 31 only
Syntax MACROSLVREAD{node #},{slave variable},{PMAC variable}
MSR{node #},{slave variable},{PMAC variable}
where:
• {node #} is a constant in the range 0 to 15 representing the number of the node on
the PMAC matching the slave node to be accessed.
• {slave variable} is the name of the variable on the slave station whose value
is to be reported.
• {PMAC variable} is the name of the variable on the PMAC into which the value
of the slave station variable is to be copied.
Remarks This command causes PMAC to copy the value of the specified variable of the MACRO
slave station matching the specified node number on the PMAC to the specified PMAC
variable, using the MACRO Type 1 master-to-slave auxiliary protocol.
The variable on the PMAC can be any of the I, P, Q, or M-variable on the card.
In order for the PMAC to be able to execute this command, the following conditions
must be true:
• The PMAC must be set up as a master or the synchronizing ring master (I995=
$xx90 or $xx30).
• The node 15 auxiliary register copy function must be disabled (I1000 bit 15 = 0).
• Node 15 must not be used for any other function.
If the slave node returns an error message or it does not respond within I1003 servo
cycles, PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to
report such a MACRO auxiliary communications error. Register X:$0798 holds the error
value. It is set to $010000 for a timeout error, or $xxxxFE if the slave node reports an
error, where xxxx is the 16-bit error code reported by the slave node.
If this command is issued to a PMAC when no buffer is open, it will be executed as an
on-line command.
Example MSR0,MI910,P1 ; Copies value of slave Node 0 variable MI910 into PMAC variable P1
MSR1,MI997,M10 ; Copies value of slave Node 1 variable MI997 into PMAC variable M10
MACROSLVWRITE
Function Write (copy) Type 1 MACRO auxiliary parameter value
Type Uncompiled PLC 1 – 31 only
Syntax MACROSLVWRITE{node #},{slave variable},{PMAC variable}
MSW{node #},{slave variable},{PMAC variable}
where:
• {node #} is a constant in the range 0 to 15 representing the number of the node on
the PMAC matching the slave node to be accessed.
• {slave variable} is the name of the MI-variable or C-command on the slave
station whose value is to be set.
• {PMAC variable} is the name of the variable on the PMAC from which the
value of the slave station variable is to be copied.
Remarks This command causes PMAC to copy the value of the specified variable on PMAC to the
specified variable of the MACRO slave station matching the specified node number on
the PMAC, using the MACRO Type 1 master-to-slave auxiliary protocol.
The variable on the PMAC can be any of the I, P, Q, or M-variables on the card.
In order for the PMAC to be able to execute this command, the following conditions
must be true:
• The PMAC must be set up as a master or the synchronizing ring master (I995=
$xx90 or $xx30).
• The node 15 auxiliary register copy function must be disabled (I1000 bit 15 = 0).
• Node 15 must not be used for any other function.
If the slave node returns an error message or it does not respond within I1003 servo
cycles, PMAC will report ERR008. Bit 5 of global status register X:$0003 is set to
report such a MACRO auxiliary communications error. Register X:$0798 holds the error
value. It is set to $010000 for a timeout error, or $xxxxFE if the slave node reports an
error, where xxxx is the 16-bit error code reported by the slave node.
If this command is issued to a PMAC when no buffer is open, it will be executed as an
on-line command.
Example MSW0,MI910,P35 ; Copies value of PMAC P35 into MACRO station
; node 0 variable MI910
MSW4,C4,P0 ; Causes MACRO station with active node 4 to execute
; Command #4, saving its setup variable values to
; non-volatile memory (P0 is a dummy variable here)
N{constant}
Function Program Line Label
Type Motion program (PROG and ROT)
Syntax N{constant}
where:
• {constant} is an integer from 0 to 262,143 (218-1).
Remarks This is a label for a line in the program that allows the flow of execution to jump to that
line with a GOTO, GOSUB, CALL, G, M, T, or D statement or a B command.
A line only needs a label in order to jump to that line. Line labels do not have to be in
any sort of numerical order. The label must be at the beginning of a line. Remember that
each location label takes up space in PMAC memory.
Note:
There is always an implied N0 at the beginning of every motion
program. Putting an explicit N0 at the beginning may be useful for
people reading the program.
Example N1
N65537 X1000
See Also Subroutines and Subprograms (Writing a Motion Program)
On-line command B{constant}
Program commands O{constant}, GOTO, GOSUB, CALL, G, M, T, D.
NORMAL
Function Define Normal Vector to Plane of Circular Interpolation and Cutter Radius Compensation
Type Motion program (PROG and ROT)
Syntax NORMAL {vector}{data} [{vector}{data}...]
NRM {vector}{data} [{vector}{data}...]
where:
• {vector} is one of the letters I, J, and K, representing components of the total vector
parallel to the X, Y, and Z axes, respectively.
• {data} is a constant or expression representing the magnitude of the particular vector
component.
Remarks This statement defines the orientation of the plane in XYZ-space in which circular
interpolation and cutter radius compensation will take place by setting the normal
(perpendicular) vector to that plane.
The vector components that can be specified are I (X-axis direction), J (Y-axis direction),
and K (Z-axis direction). The ratio of the component magnitudes determines the
orientation of the normal vector, and therefore, of the plane. The length of this vector does
not matter – it does not have to be a unit vector.
The direction sense of the vector does matter, because it defines the clockwise sense of an
arc move, and the sense of cutter-compensation offset. PMAC uses a right-hand rule; that
is, in a right-handed coordinate system (I x J = K), if your right thumb points in the
direction of the norma vector specified here, your right fingers will curl in the direction of
a clockwise arc in the circular plane, and in the direction of offset-right from direction of
movement in the compensation plane.
Example The standard settings to produce circles in the principal planes will therefore be:
NORMAL K-1 ; XY plane – equivalent to G17
NORMAL J-1 ; ZX plane – equivalent to G18
NORMAL I-1 ; YZ plane – equivalent to G19
By using more than one vector component, a circular plane skewed from the principal planes can be
defined:
NORMAL I0.866 J0.500
NORMAL J25 K-25
NORMAL J(-SIN(Q1)) K(-COS(Q1))
NORMAL I(P101) J(P201) K(301)
See Also Circular Blended Moves, Cutter Radius Compensation (Writing a Motion Program)
Cartesian Axes (Setting Up a Coordinate System)
Program Commands CIRCLE1, CIRCLE2, CC0, CC1, CC2
O{constant}
Function Alternate Line Label
Type Motion program (PROG and ROT)
Syntax O{constant}
where:
• {constant} is an integer from 0 to 262,143 (218-1).
Remarks This is an alternate form of label in the motion program. It allows the flow of execution
to jump to that line with a GOTO, GOSUB, CALL, G, M, T, or D statement or a B
command. PMAC will store and report this as an N{constant statement, but O labels
are legal to send to the program buffer. (N10 and O10 are identical labels to PMAC.)
A line only needs a label in order to jump to that line. Line labels do not have to be in
any sort of numerical order. The label must be at the beginning of a line. Remember that
each location label takes up space in PMAC memory.
Example O1
O65537 X1000
See Also Subroutines and Subprograms (Writing a Motion Program)
On-line command B{constant}
Program commands O{constant}, GOTO, GOSUB, CALL, G, M, T, D.
OR({condition})
Function Conditional OR
Type PLC program
Syntax OR ({condition})
Remarks This statement forms part of an extended compound condition to be evaluated in a PLC
program. It must immediately follow an IF, WHILE, AND, or OR statement. This OR is
a boolean operator logically combining the condition on its line with the condition on the
program line above.
It takes lower precedence than operators within a compound condition on a single line
(those within parentheses), and also lower precedence than an AND operator that starts a
line. (ORs operate on groups of ANDed conditions.)
In motion programs, there can be compound conditions within one program line, but not
across multiple program lines, so this statement is not permitted in motion programs.
Note:
This logical OR, which acts on conditions, should not be confused with
the bit-by-bit | (vertical bar) or-operator, which operates on values.
Example IF (M11=1) ; This branch increments P1 every cycle that
AND (M12=0) ; inputs M11 and M12 are different, and decrements
OR (M11=0) ; them every cycle that they are the same.
AND (M12=1)
P1=P1+1
ELSE
P1=P1-1
ENDIF
IF (M11=1 AND M12=0) ; This does the same as above
OR (M11=0 AND M12=1)
P1=P1+1
ELSE
P1=P1-1
ENDIF
See Also Conditions (Program Computational Features)
Writing a PLC Program
Program commands IF, WHILE, AND
P{constant}={expression}
Function Set P-Variable Value
Type Motion program (PROG and ROT)
Syntax P{constant}={expression}
where:
• {constant} is an integer constant from 0 to 1023 representing the P-variable
number.
• {expression} represents the value to be assigned to this P-variable.
Remarks This command sets the value of the specified P-variable to that of the expression on the
right side of the equals sign. The assignment is done as the line is processed, which in a
motion program is usually one or two moves ahead of the move actually executing at the
time (because of the need to calculate ahead in the program).
Example P1=0
P746=P20+P40
P893=SIN(Q100)-0.5
See Also How PMAC Executes a Motion Program (Writing a Motion Program)
On-line command P{constant}={expression}
Program commands I{constant}={expression},
M{constant}={expression}, Q{constant}={expression}.
PAUSE PLC
Function Pause execution of PLC program(s)
Type Motion program (PROG or ROT), PLC program
Syntax PAUSE PLC {constant}[,{constant}...]
PAU PLC {constant}[,{constant}...]
PAUSE PLC {constant}[..{constant}]
PAU PLC {constant}[..{constant}]
Remarks This command causes PMAC to stop execution of the specified uncompiled PLC
program or programs, with the capability to restart execution at this point (not necessarily
at the top) with a RESUME PLC command. Execution can also be restarted at the top of
the program with the ENABLE PLC command.
If the PLC program is paused from within that PLC, execution is stopped immediately
after the PAUSE PLC command.
If the PLC program is paused while it is not in the middle of a scan, which is always the
case if it is paused from another background PLC, it will obviously be paused at the end
of a scan – after an ENDWHILE or after the last line.
If the PLC program is paused while it has been interrupted in the middle of a scan (for
example, from a motion program), its execution will resume after the interrupt and
continue until after it executes any of the following:
• Any ENABLE PLC, DISABLE PLC, PAUSE PLC, or RESUME PLC command
• An ENDWHILE command
• The last line of the program
Execution will be paused at this point.
PLC programs are specified by number, and may be specified in a command singularly,
in a list (separated by commas), or in a range of consecutively numbered programs.
If no buffer is open when this command is sent to PMAC, it will be executed
immediately as an on-line command.
Example PAUSE PLC 1
PAUSE PLC 4,5
PAUSE PLC 7..20
PAU PLC 3,8,11
PAU PLC 0..31
See Also I-variable I5
On-line commands ENABLE PLC, DISABLE PLC, <CONTROL-D>, PAUSE PLC,
RESUME PLC, LIST PLC
Program command ENABLE PLC, DISABLE PLC, RESUME PLC
PRELUDE
Function Specify automatic subroutine call function
Type Motion program
Syntax PRELUDE1{command}
PRELUDE0
where:
• {command} is a subprogram call from the set CALL{constant},
G{constant}, M{constant}, T{constant}, D{constant}.
Remarks The PRELUDE1 command permits automatic insertion of a subprogram call before each
subsequent motion command (e.g., X10Y10) or other letter-number command (e.g.,
L10) other than a line label in the motion program. The action taken is equivalent to
inserting the call into the program text before each subsequent motion command or letter-
number command.
The subprogram call to be performed can be specified in the PRELUDE1 command either
as a CALL command, or as a G, M, T, or D code. The value following the CALL or code
letter must be a constant. It cannot be a variable or expression. It does not have to be an
integer. If the routine called in the subprogram starts with a READ statement, the motion
or letter-number command itself can become arguments for the subprogram call. Any
motion command within a PRELUDE1 subroutine or subprogram call is executed directly
as a motion command, without an automatic subroutine call in front of it.
PMAC will only execute the PRELUDE1 function if the motion or letter-number
command is found at the beginning of a program line or immediately after the line label.
If another type of command occurs earlier on the program line, no PRELUDE1 function
will be executed before the motion or letter-number command. If the command is on a
line that is already in a subroutine or subprogram reached by a CALL or GOSUB
command, no PRELUDE1 function will be executed.
Each PRELUDE1 command supersedes the previous PRELUDE1 command. It is not
possible to nest automatic PRELUDE1 calls, but an automatic PRELUDE1 call can be
nested within explicit subroutine and subprogram calls.
PRELUDE0 disables any automatic subroutine call.
Example X10Y20
PSET X0 Y0 ; Call this position (0,0)
N92000 READ(X,Y,Z) ; To implement G92 in PROG 1000
PSET X(Q124)Y(Q125)Z(Q126) ; Equivalent of G92 X..Y..Z.
See Also Axes (Setting Up a Coordinate System)
On-line command {axis}={constant}
Program commands ADIS, AROT, IDIS, IROT
Suggested M-variable definitions Mx64
Memory map registers D:$0813, D:$08D3, etc.
PVT{data}
Function Set Position-Velocity-Time mode
Type Motion program (PROG and ROT)
Syntax PVT{data}
where:
• {data} is a positive constant or expression representing the time of a segment in
milliseconds (PMAC will round this value to the nearest integer in actual use).
Remarks This command puts the motion program into Position-Velocity-Time move mode, and
specifies the time for each segment of the move. In this mode, each move segment in the
program must specify the ending position and velocity for the axis. Taking the starting
position and velocity (from the previous segment), the ending position and velocity, and
the segment time, PMAC computes the unique cubic position profile (parabolic velocity
profile) to meet these constraints.
The segment time in a sequence of moves can be changed on the fly, either with another
PVT command, or with a TA command. TS, TM, and F settings are irrelevant in this
mode.
The PVT command takes the program out of any of the other move modes (LINEAR,
CIRCLE, SPLINE, RAPID), and any of the other move mode commands takes the
program out of PVT move mode.
Refer to the Writing a Motion Program section of this manual for more details.
Example INC ; incremental mode, specify moves by distance
PVT200 ; enter this mode – move time 200ms
X100:1500 ; cover 100 units ending at 1500 units/sec
X500:3000 ; cover 500 units ending at 3000 units/sec
X500:1500 ; cover 500 units ending at 1500 units/sec
X100:0 ; cover 100 units ending at 0 units/sec
PVT(P37)
See Also Position-Velocity-Time Mode Moves (Writing a Motion Program)
Program commands {axis}{data}:{data}..., TA, LINEAR, CIRCLEn, RAPID,
SPLINE1.
Q{constant}={expression}
Function Set Q-Variable Value
Type Motion program (PROG and ROT); PLC program
Syntax Q{constant}={expression}
where:
• {constant} is an integer value from 0 to 1023 representing the Q-variable number
• {expression} represents the value to be assigned to the specified Q-variable.
Remarks This command sets the value of the specified Q-variable to that of the expression on the
right side of the equals sign. The assignment is done as the line is processed, which in a
motion program performing a continuous move sequence is usually one or two moves
ahead of the move actually executing at the time (because of the need to calculate ahead
in the program).
Because each coordinate system has its own set of Q-variables, it is important to know
which coordinate system’s Q-variable is affected by this command.
When executed from inside a motion program, this command affects the specified Q-
variable of the coordinate system running the motion program.
When executed from inside a PLC program, this command affects the specified Q-
variable of the coordinate system specified by the most recent ADDRESS command
executed inside that PLC program. If there has been no ADDRESS command executed
since power-on/reset, it affects the Q-variable of Coordinate System 1.
Example Q1=3
Q99=2.71828
Q124=P100+ATAN(Q120)
See Also Q-Variables (Program Computational Features)
On-line command Q{constant}={expression}
Program commands ADDRESS, I{constant}={expression},
M{constant}={expression}, P{constant}={expression}
R{data}
Function Set Circle Radius
Type Motion program (PROG or ROT)
Syntax R{data}
where:
• {data} is a constant or expression representing the radius of the arc move specified
in user length units.
Remarks This partial command defines the magnitude of the radius for the circular move specified
on that command line. It does not affect the moves on any other command lines.. (If
there is no R radius specification and no IJK vector specification on a move command
line, the move will be done linearly, even if the program is in CIRCLE mode.)
If the radius value specified in {data} is greater than zero, the circular move to the
specified end point will describe an arc of less than or equal to 180º with a radial length
of the specified value. If the radius value specified in {data} is less than zero, the
circular move to the specified end point will describe an arc of greater than or equal to
180° with a radial length equal to the absolute value of {data}.
Note:
If you use the AROT or IROT commands to scale the coordinate system,
do not use the radius center specification for circle commands. The
radius does not get scaled. Use the I, J, K vector specification instead.
If the distance from the start point to the end point is more than twice the
magnitude specified in {data}, there is no circular arc move possible.
If the distance is greater than twice {data} by an amount less than Ix96
(expressed in user length units), PMAC will execute a spiral to the end
point. If the distance is greater by more than Ix96, PMAC will stop the
program with a run-time error.
Example RAPID X0 Y0 ; Move to origin
CIRCLE1 ; Clockwise circle mode
X10 Y10 R10 ; Quarter circle to (10, 10)
X0 Y0 R-10 ; Three-quarters circle back to (0, 0)
X(P101) R(P101/2) ; Half circle to (P101, 0)
See Also Circular Blended Moves (Writing a Motion Program);
I-variables I13, Ix96
Program commands CIRCLE1, CIRCLE2, {axis}{data}{vector}{data}
RAPID
Function Set Rapid Traverse Mode
Type Motion program (PROG and ROT)
Syntax RAPID
RPD
Remarks This command puts the program into a mode in which all motors defined to the
commanded axes move to their destination points in jog-style moves. This mode is
intended to create the minimum-time move from one point to another. Successive moves
are not blended together in this mode, and the different motors do not necessarily all
reach their end points at the same time
The accelerations and decelerations in this mode are controlled by motor jog-acceleration
I-variables Ix19, Ix20, and Ix21. If global I-variable I50 is set to 0, the velocities in this
mode are controlled by the motor jog speed I-variables Ix22. If I50 is set to 1, they are
controlled by the motor maximum speed I-variables Ix16. Only the motor with the
greatest distance-to-speed ratio for the move actually moves at this speed. All other
motors are slowed from the specified speed to complete the move in approximately the
same time, so that the move is nearly linear.
The RAPID command takes the program out of any of the other move modes (LINEAR,
CIRCLE, PVT, SPLINE). Any of the other move-mode commands takes the program
out of RAPID mode.
Example RAPID X10 Y20 ; Move quickly to starting cut position
M1=1 ; Turn on cutter
LINEAR X12 Y25 F2 ; Start cutting moves
...
M1=0 ; Turn off cutter
RAPID X0 Y ; Move quickly back to home position
Note:
No space is allowed between READ and the left parenthesis.
Remarks This statement allows a subprogram or subroutine to take arguments from the calling
routine. It looks at the remainder of the line calling this routine (CALL, G, M, T, D), takes
the values following the specified letters and puts them into particular Q-variables for the
coordinate system. For the Nth letter of the alphabet, the value is put in Q(100+N).
It scans the calling line until it sees a letter that is not in the list of letters to READ, or
until the end of the calling line. Each letter value successfully “read” into a Q-variable
causes a bit to be set in Q100, noting that it was read (bit N-1 for the Nth letter of the
alphabet). For any letter not successfully read in the most recent READ command, the
corresponding bit of Q100 is set to zero.
The Q-variable and flag bit of Q100 associated with each letter are shown in the
following table:
Letter Target Q100 Bit Value Bit Value
Variable Bit Decimal Hex
A Q101 0 1 $01
B Q102 1 2 $02
C Q103 2 4 $04
D Q104 3 8 $08
E Q105 4 16 $10
F Q106 5 32 $20
G Q107 6 64 $40
H Q108 7 128 $80
I Q109 8 256 $100
J Q110 9 512 $200
K Q111 10 1,024 $400
L Q112 11 2,048 $800
M Q113 12 4,096 $1000
N* Q114* 13* 8,192* $2000*
O* Q115* 14* 16,384* $4000*
P Q116 15 32,768 $8000
Q Q117 16 65,536 $10000
R Q118 17 131,072 $20000
S Q119 18 262,144 $40000
T Q120 19 524,288 $80000
U Q121 20 1,048,57 $100000
Any letter may be READ except N or O, which are reserved for line labels (and should
only be at the beginning of a line). If a letter value is read from the calling line, the
normal function of the letter (e.g., an axis move) is overridden, so that letter serves
merely to pass a parameter to the subroutine.
If there are remaining letter values on the calling line that are not read, those will be
executed according to their normal function after the return from the subroutine.
If the READ function encounters a letter in the calling line that is not in the list of letters
to be read, the reading action stops, even if there are other letters from the list still to be
read on the calling line. For example, if the calling line were CALL100 X10 Y20
Z30, and PROG 100 started with a READ(X,Z), the X-value would be read
successfully, but not the Z-value.
Example In standard machine tool code, a two-second DWELL would be commanded in the program as a
G04 X2000, for instance. In PMAC, a G04 is interpreted as a CALL to label N04000 of PROG
1000, so to implement this function properly, PROG 1000 would contain the following code:
N04000 READ(X)
DWELL (Q124)
RETURN
Also, in standard machine tool code, the value assigned to the current position of the axis may be
changed with the G92 code, followed by the letters and the new assigned values of any axes (e.g.
G92 X20 Y30). It is important only to assign new values to axes specified in this particular
G92 command, so the PMAC subroutine implementing G92 with the PSET command must check
to see if that particular axis is specified:
N92000 READ(X,Y,Z)
IF (Q100 & $800000 > 0) PSET X(Q124)
IF (Q100 & $1000000 > 0) PSET Y(Q125)
IF (Q100 & $2000000 > 0) PSET Z(Q126)
RETURN
See Also Subroutines and Subprograms (Writing a Motion Program)
Program commands CALL, GOSUB, G, M, T, D
RESUME PLC
Function Resume execution of PLC programs(s)
Type Motion program (PROG and ROT), PLC program
Syntax RESUME PLC {constant}[,{constant}...]
RES PLC {constant}[,{constant}...]
RESUME PLC{constant}[..{constant}]
RES PLC {constant}[..{constant}]
where:
• {constant} is an integer from 0 to 31, representing the program number.
Remarks This command causes PMAC to resume execution of the specified uncompiled PLC
program or programs at the point where execution was suspended with the PAUSE PLC
command, which is not necessarily at the top of the program.
The RESUME PLC command cannot be used to restart execution of a PLC program that
has been stopped with a DISABLE PLC command. However, after a PLC has been
stopped with a DISABLE PLC command, if a PAUSE PLC command is then given for
that PLC, then a RESUME PLC command can be given to start operation at the point at
which it has been stopped.
PLC programs are specified by number, and may be used singularly in this command, in
a list (separated by commas), or in a range of consecutively numbered programs.
If no buffer is open when this command is sent to PMAC, it will be executed
immediately as an on-line command.
Example RESUME PLC 0
RESUME PLC 1,2,5
RESUME PLC 1..16
RES PLC 7
See Also I-variable I5
On-line commands ENABLE PLC, DISABLE PLC, <CONTROL-D>, PAUSE PLC,
RESUME PLC
Program commands ENABLE PLC, DISABLE PLC, PAUSE PLC
RETURN
Function Return From Subroutine Jump/End Main Program
Type Motion program (PROG only)
Syntax RETURN
RET
Remarks The RETURN command tells the motion program to jump back to the routine that called
the execution of this routine. If this routine was started from an on-line command (Run),
program execution stops and the program pointer is reset to the top of this motion
program. Control is returned to the PMAC “operating system”.
If this routine was started from a GOSUB, CALL, G, M, T, or D command in a motion
program, program execution jumps back to the command immediately following the
calling command.
When the CLOSE command is sent to end the entry into a motion program buffer, PMAC
automatically appends a RETURN command to the end of that program. When the OPEN
command is sent to an existing motion program buffer, the final RETURN command is
automatically removed.
Example OPEN PROG 1 CLEAR
X20 F10
X0
CLOSE ; PMAC places a RETURN here
OPEN PROG 1000 CLEAR
N0 RAPID RETURN ; Execution jumps back after one-line routine
N1000 LINEAR RETURN ; Ditto
N2000 CIRCLE1 RETURN ; Ditto
...
CLOSE ; PMAC places a RETURN here
See Also Subroutines and Subprograms (Writing a Motion Program)
On-line commands OPEN, CLOSE
Program commands CALL, GOSUB, G, M, T, D
S{data}
Function Spindle data command
Type Motion program (PROG and ROT)
Syntax S{data}
where:
• {data} is a constant or expression representing the value to be passed to the storage
variable for later use.
Remarks This command causes the value in {data} to be loaded in variable Q127 for the
coordinate system executing the motion program. It takes no other action. It is intended
to pass spindle speed data in machine tool programs. The algorithms that actually control
the spindle would then use Q127 in their routines (e.g., to set jog speed, or voltage
output).
Note:
This command is distinct from S{data} information passed as part of a
subroutine call through a READ(S) command. In this form, the value is
placed in Q119 for the coordinate system.
Example S1800 ; This puts a value of 1800 in Q127
S(P1) ; This puts the value of P1 in Q127
G96 S50 ; Here the S-term is an argument in the G-code call
(PROG 1000) ; This is the subroutine that executes G96
N96000 READ(S) ; This puts a value of 50 in Q119
See Also Q-variables (Program Computational Features)
Implementing a Machine-Tool Style Program (Writing a Motion Program)
Motion program command READ
Example program SPINDLE.PMC
SEND
Function Cause PMAC to Send Message
Type Motion program (PROG and ROT); PLC program
Syntax SEND"{message}"
SENDS"{message}"
SENDP"{message}"
Remarks This command causes PMAC to send the specified message out of one of PMAC’s
communications ports. This is particularly useful in the debugging of applications. It
can also be used to prompt an operator, or to notify the host computer of certain
conditions.
If I62=0, PMAC automatically issues a carriage-return (<CR>) character at the end of the
message. If I62=1, PMAC does not issue a <CR> character at the end of the message. A
SEND^M must be used to issue a <CR> in this case.
Note:
If there is no host on the port to which the message is sent, or the host is
not ready to read the message, the message is left in the queue. If several
messages back up in the queue this way, the program issuing the
messages will halt execution until the messages are read. This is a
common mistake when the SEND command is used outside of an Edge-
Triggered condition in a PLC program. See Writing A PLC Program in
Chapter 3 for more details.
On the serial port, it is possible to send messages to a non-existent host
by disabling the port handshaking with I1=1.
SEND transmits over the active communications response port, whether serial, parallel
host port (PC-Bus or STD-Bus), VME-Bus port, or ASCII DPRAM buffer.
SENDS always transmits over the serial port regardless of which port is the current active
response port.
SENDP always transmits over the parallel host port (PC-Bus or STD-Bus), regardless of
which port is the current active response port.
There is no SENDV command for the VME bus exclusively. The SEND command must
be used with the VME port as the active response port.
When PMAC powers up or resets, the active response port is the serial port. When any
command is received over a bus port, the active response port becomes the bus port.
PMAC must then receive a <CONTROL-Z> command to cause the response port to
revert back to the serial port.
Note:
If a program, particularly a PLC, sends messages immediately on power-
up/reset, it can confuse a host-computer program (such as the PMAC
Executive Program) that is trying to “find” PMAC by querying it and
looking for a particular response.
It is possible, particularly in PLC programs, to order the sending of messages faster than
the port can handle them. Usually this will happen if the same SEND command is
executed through every scan in the PLC. For this reason, it is good practice to have at
least one of the conditions that causes the SEND command to execute to be set false
immediately to prevent execution of this SEND command on subsequent scans of the
PLC.
Note:
To cause PMAC to send the value of a variable, use the COMMAND
statement instead, specifying the name of the variable in quotes (e.g.
CMD”P1”)
Example SEND"Motion Program Started"
SENDS"DONE"
SENDP"Spindle Command Given"
IF (M188=1) ; C.S.1 Warning Following Error Bit set?
IF (P188=0) ; But not set last scan? (P188 follows M188)
SEND"Excessive Following Error" ; Notify operator
There is no SENDV command for the VME bus exclusively. The SEND command must
be used with the VME port as the active response port.
When PMAC powers up or resets, the active response port is the serial port. When any
command is received over a bus port, the active response port becomes the bus port.
PMAC must then receive a <CONTROL-Z> command to cause the response port to
revert back to the serial port.
It is possible, particularly in PLC programs, to order the sending of messages faster than
the port can handle them. Usually this will happen if the same SEND command is
executed through every scan in the PLC. For this reason, it is good practice to have at
least one of the conditions that causes the SEND command to execute to be set false
immediately to prevent execution of this SEND command on subsequent scans of the
PLC.
See Also On-line command <CTRL-Z>
Program commands SEND”{message}”, COMMAND”{command}”,
COMMAND^{letter}
SETPHASE
Function Set motor commutation phase-position register(s)
Type Motion program, PLC program
Syntax SETPHASE{constant}[,{constant}...]
SETPHASE{constant}..{constant}
[,{constant}..{constant}...]
where:
• {constant} is an integer from one to eight representing a motor number.
Remarks This command causes PMAC to force the commutation phase-position register for the
specified motor or motor’s to the value of the Ix75 phase-position offset parameter.
The main use of this command is to correct the phase position value at a known position
(usually the motor home position) after an approximate phasing search or phasing read
(e.g. from Hall commutation sensors). The approximate referencing is sufficient to move
to a known position, but not necessarily to get peak performance from the motor.
This command forces a value into an “actual” (not “commanded”) position register, so it
is important that the actual position value be known with precision, either due to small
following error or quick reaction to an actual-position trigger.
In a motion program, this command executes immediately at program calculation
(lookahead) time, so for proper use in a motion program, it must be preceded by a
DWELL command and/or an in-position loop. If a motor specified in the statement is not
assigned to the coordinate system executing the program, the action will not be executed
for that motor (but no error will be reported).
Example Motion program:
HOME1..3
WHILE(M180=0) WAIT ; Wait for all in-position
SETPHASE1..3 ; Force phase values in
PLC program:
CMD"#4$" ; Rough phase search/read
WHILE(M440=0) ; Wait for motor in-position
ENDWHILE
TA{data}
Function Set Acceleration Time
Type Motion program (PROG and ROT)
Syntax TA{data}
where:
• {data} is a constant or expression representing the acceleration time in
milliseconds
Remarks This statement specifies the commanded acceleration time between blended moves
(LINEAR and CIRCLE mode), and from and to a stop for these moves. In PVT and
SPLINE1 mode moves, which are generally continually accelerating and decelerating, it
specifies the actual move segment time. The units are milliseconds. PMAC will round
the specified value to the nearest integer number of milliseconds when executing this
command (no rounding is done in storing the value in the buffer).
Note:
Make sure the specified acceleration time (TA or 2*TS) is greater than
zero, even if you are planning to rely on the maximum acceleration rate
parameters (Ix17). A specified acceleration time of zero will cause a
divide-by-zero error. The minimum specified time should be TA1 TS0.
If the specified S-curve time (from TS, or Ix88) is greater than half the TA time, the time
used for the acceleration for blended moves will be twice the specified S-curve time.
The acceleration time is also the minimum time for a blended move. If the distance on a
feedrate-specified (F) move is so short that the calculated move time is less than the
acceleration time, or the time of a time-specified (TM) move is less than the acceleration
time, the move will be done in the acceleration time instead. This will slow down the
move. If TA controls the move time, it must be greater than the I13 time and the I8
period.
Note:
The acceleration time will be extended automatically when any motor in
the coordinate system is asked to exceed its maximum acceleration rate
(Ix17) for a programmed LINEAR mode move with I13=0 (no move
segmentation).
A move executed in a program before any TA statement will use the default acceleration
time specified by coordinate system I-variable Ix87.
In executing the TA command, PMAC rounds the specified value to the nearest integer
number of milliseconds (there is no rounding done when storing the command in the
buffer).
Example TA100
TA(P20)
TA(45.3+SQRT(Q10))
See Also Linear, Circular Blended Moves, Cubic Spline Moves, PVT Moves (Writing a Motion
Program)
I-variables Ix17, Ix87, Ix88
Program commands TS, TM, PVT.
TINIT
Function Initialize selected transformation matrix
Type Motion program (PROG and ROT)
Syntax TINIT
Remarks This command initializes the currently selected (with TSEL) transformation matrix for
the coordinate system by setting it to the identity matrix. This makes the rotation angle
0, the scaling 1, and the displacement 0, so the XYZ points for the coordinate system are
as the axis definition statements created them. PMAC will still perform the matrix
calculations, even though they have no effect. TSEL0 should be used to stop the matrix
calculations
The matrix can subsequently be changed with the ADIS, IDIS, AROT, and IROT
commands.
Example TSEL 4 ; Select transformation matrix 4
TINIT ; Initialize it to the identity matrix
IROT 71 ; Do incremental rotation/scaling with Q71-Q79
See Also Axis Matrix Transformations (Writing a Motion Program)
On-line command DEFINE TBUF
Program commands TSEL, ADIS, IDIS, AROT, IROT
TM{data}
Function Set Move Time
Type Motion program
Syntax TM{data}
where:
• {data} is a floating-point constant or expression representing the move time in
milliseconds. The maximum effective TM value is 223 msec. The minimum effective
TM value is 1 msec.
Remarks This command establishes the time to be taken by subsequent LINEAR or CIRCLE mode
(blended) motions. It overrides any previous TM or F statement, and is overridden by any
subsequent TM or F statement. It is irrelevant in RAPID, SPLINE, and PVT move
modes, but the latest value will stay active through those modes for the next return to
blended moves.
The acceleration time is the minimum time for a blended move. If the specified move
time is shorter than the acceleration time, the move will be done in the acceleration time
instead. This will slow down the move. If TM controls the move time it must be greater
than the I13 time and the I8 period.
Note:
For LINEAR mode moves with I13=0 (no move segmentation), if the
commanded velocity (distance/TM) of any motor in the move exceeds its
maximum limit (Ix16), all motors in the coordinate system will be
slowed down in proportion so that no motor exceeds its limit.
Example TM30
TM47.635
TM(P1/3)
See Also Linear and Circular Blended Moves (Writing a Motion Program)
I-variable Ix16
Program commands F, TA, TS, LINEAR, CIRCLE
TS{data}
Function Set S-Curve Acceleration Time
Type Motion program (PROG and ROT)
Syntax TS{data}
where:
• {data} is a positive constant or expression representing the S-curve time in
milliseconds.
Remarks This command specifies the time, at both the beginning and end of the total acceleration
time, in LINEAR and CIRCLE mode blended moves that is spent in S-curve
acceleration.
If TS is zero, the acceleration is constant throughout the TA time and the velocity profile
is trapezoidal. If TS is greater than zero, the acceleration will start at zero and linearly
increase through TS time, then stay constant (for time TC) until TA-TS time, and
linearly decrease to zero at TA time (that is, TA=2TS+TC). If TS is equal to TA/2, the
entire acceleration will be spent in S-curve form (TS values greater than TA/2 override
the TA value. Total acceleration time will be 2TS.
Note:
For LINEAR mode moves with PMAC not in segmentation mode
(I13=0), if the rate of acceleration for any motor in the coordinate system
exceeds that motor’s maximum as specified by Ix17, the acceleration
time for all motors is increased so that no motor exceeds its maximum
acceleration rate.
TS does not affect RAPID, PVT, or SPLINE mode moves, but it stays valid for the next
return to blended moves.
Note:
Make sure the specified acceleration time (TA or 2*TS) is greater than
zero, even if planning to rely on the maximum acceleration rate
parameters (Ix17). A specified acceleration time of zero will cause a
divide-by-zero error. The minimum specified time should be TA1 TS0.
In executing the TS command, PMAC rounds the specified value to the nearest integer
number of milliseconds (there is no rounding done when storing the command in the
buffer).
A blended move executed in a program before any TS statement will use the default S-
curve time specified by coordinate system I-variable Ix88.
Example TS20
TS(Q17)
TS(39.32+P43)
See Also Linear and Circular Blended Moves (Writing a Motion Program)
I-variables I13, Ix17, Ix21, Ix87, Ix88
Program commands TA, TM, F, LINEAR, CIRCLE
TSELECT{constant}
Function Select active transformation matrix for X, Y, and Z axes
Type Motion program (PROG and ROT)
Syntax TSELECT{constant}
where:
• {constant} is an integer representing the number of the matrix to be used.
Remarks This command selects the specified matrix for use as the active transformation matrix for
the X, Y, and Z axes of the coordinate system running the motion program. This matrix
can then be modified using the TINIT, ADIS, AROT, IDIS, and IROT commands to
perform translations, rotations, and scaling of the three axes. This matrix will be used
until another one is selected.
This matrix must already have been created with the on-line DEFINE TBUF command.
That command specifies the number of matrices to create, and it must have specified a
number at least as high as the number used in TSEL (you cannot select a matrix that has
not been created).
TSEL0 deselects all transformation matrices, saving calculation time.
Example DEFINE TBUF 5 ; Create five transformation matrices
OPEN PROG 10 CLEAR
...
TSEL 3 ; Select transformation matrix 3 (of 5)
TINIT ; Make matrix 3 the identity matrix
See Also Axis Matrix Transformations (Writing a Motion Program)
On-line command DEFINE TBUF
Program commands AROT, IROT, ADIS, IDIS, TINIT
U{data}
Function U-Axis Move
Type Motion program
Syntax U{data}
where:
• {data} is a floating point constant or expression representing the position or
distance in user units for the U-axis.
Remarks This command causes a move of the U-axis. (See {axis}{data} description, above.)
Example U10
U(P17+2.345)
X20 U20
U(COS(Q10)) V(SIN(Q10))
See Also Program commands {axis}{data}, A, B, C, V, W, X, Y, Z, CALL, READ
V{data}
Function V-Axis Move
Type Motion program (PROG and ROT)
Syntax V{data
where:
• {data} is a floating point constant or expression representing the position or
distance in user units for the V-axis.
Remarks This command causes a move of the V-axis. (See {axis}{data} description, above.)
Example V20
U56.5 V(P320)
Y10 V10
V(SQRT(Q20*Q20+Q21*Q21))
See Also Program commands {axis}{data}, A, B, C, U, W, X, Y, Z, CALL, READ
W{data}
Function W-Axis Move
Type Motion program
Syntax W{data}
where:
• {data} is a floating point constant or expression representing the position or
distance in user units for the W-axis.
Remarks This command causes a move of the W-axis. (See {axis}{data} description, above.)
Example W5
W(P10+33.5)
Z10 W10
W(ABS(Q22*Q22))
See Also Program commands {axis}{data}, A, B, C, U, V, X, Y, Z, CALL, READ
WAIT
Function Suspend program execution
Type Motion program (PROG and ROT)
Syntax WAIT
Remarks This command may be used on the same line as a WHILE condition to hold up execution
of the program until the condition goes false. When the condition goes false, program
execution resumes on the next line. Use of the WAIT statement allows indefinite pauses
without the need for repeated use of a servo command (e.g., DWELL or DELAY) to eat up
the time. However, it is impossible to predict how long the pause will be.
WAIT permits a faster resumption of the program upon the WHILE condition going false.
Also, the program timer is halted when WAITing, which allows the “In-position” bit to
go true (which can be used to trigger an action, or the next move).
Since PMAC executes a WHILE ({condition}) WAIT statement every Real Time
Interrupt until the condition goes false, it is essentially the same as a PLC0. This could
use excessive processor time and in severe cases trip the watchdog timer on PMACs that
simultaneously run several motion programs that use WAIT statements and or large PLC0
programs.
For example, if the condition only needs to be checked every 20 msec and not every Real
Time Interrupt, you should consider using a DWELL command to regulate the execution
time of the WHILE loop.
WHILE ({condition})
DWELL20
ENDW
Example WHILE (M11=0) WAIT ; Pause here until Machine Input 1 set
WHILE (M187=0) WAIT ; Pause here until all axes in-position
M1=1 ; Turn on Output 1 to activate punch
See Also I-variable Ix28
Program commands DWELL, DELAY, STOP
WHILE({condition})
Function Conditional looping
Type Motion program (PROG only); PLC program
Syntax WHILE ({condition})
WHILE ({condition}) {action}
where:
• {condition} consists of one or more sets of {expression} {comparator}
{expression}, joined by logical operators AND or OR.
• {action} is a program command.
Remarks This statement allows repeated execution of a statement or series of statements as long as
the condition is true. It is PMAC’s only looping construct. It can take two forms:
1. (Valid in motion program only) With a statement following on the same line, it will
repeatedly execute that statement as long as the condition is true. No ENDWHILE is
used to terminate the loop.
WHILE ({condition}) {action}
2. (Valid in motion and PLC programs) With no statement following on the same line,
it will execute statements on subsequent lines down to the next ENDWHILE
statement.
WHILE ({condition})
{statement}
[{statement}
...]
ENDWHILE
If a WHILE loop in a motion program has no move, DWELL, or DELAY inside, PMAC
will attempt to execute the loop twice (while true) each real-time interrupt cycle (stopped
from more loops only by the “double-jump-back” rule), much like a PLC0. This can
starve the background tasks for time, possibly even tripping the watchdog timer. PMAC
will not attempt to blend moves through such an “empty” WHILE loop if it finds the loop
condition true twice or more.
In PLC programs, extended compound WHILE conditions can be formed on multiple
program lines through use of AND and OR commands on the program lines immediately
following the WHILE command itself (this structure is not available in motion programs).
Conditions in each program line can be either simple or compound. AND and OR
operations within a program line take precedence over AND and OR operations between
lines.
Y{data}
Function Y-Axis Move
Type Motion program
Syntax Y{data}
where:
• {data} is a floating point constant or expression representing the position or
distance in user units for the Y-axis.
Remarks This command causes a move of the Y-axis. (See {axis}{data} description above.)
Example Y50
Y(P100)
X35 Y75
Y-0.221 Z3.475
Y(ABS(P3+P4)) A(INT(P3-P4))
See Also Program commands {axis}{data}, A, B, C, U, V, W, X, Z, CALL, READ
Z{data}
Function Z-Axis Move
Type Motion program
Syntax Z{data}
where:
• {data} is a floating point constant or expression representing the position or
distance in user units for the W-axis.
Remarks This command causes a move of the Z-axis. (See {axis}{data} description above.)
Example Z20
Z(Q25)
X10 Y20 Z30
Z23.4 R10.5
Z(P301+2*P302/P303)
See Also Program commands {axis}{data}, A, B, C, U, V, W, X, Y, CALL, READ
If the divisor is equal to 0, the result will saturate at +/-247 (+/-223 for an integer
division in a compiled PLC). No error will be reported, and the program will not stop.
It is the programmer’s responsibility to check for possible division-by-zero errors.
Example Command Result
P1=10*2/3 6.666666667
P1=10*(2/3) 6.666666667
M1=10*2/3 7
M1=10*(2/3) 7
L1=10*2/3 7
L1=10*(2/3) 10
L1 and M1 are integer variables; P1 is a floating-point variable
%
Function Modulo (remainder)
Remarks The % sign causes the calculation of the remainder due to the division of the numerical
value preceding it by the numerical value following it. Unless the division is executed
in a compiled PLC on a line with only L-variables and integers, the division operation
is always a floating-point calculation (even if integer values are used). The quotient is
computed as a floating-point value, then truncated to the next lowest (i.e., toward -∞)
integer so the remainder can be computed.
If the divisor “n” is a positive value, the modulo result is in the range {0 ≤ Result < n}.
If the divisor “n” is a negative value, the modulo result is in the range {–n ≤ Result <
n}.
Multiplication, division, modulo (remainder), and bit-by-bit “and” operations have
higher priority than addition, subtraction, bit-by-bit “or”, and bit-by-bit “exclusive-or”
operations. Operations of the same priority are implemented from left to right.
If the divisor is equal to 0, the division will saturate and the modulo result will be 0.
No error will be reported, and the program will not stop. It is the programmer’s
responsibility to check for possible division-by-zero errors.
Example Operation Result
11%4 3
-11%4 1
11%-4 3
-11%-4 -3
3%2.5 0.5
-3%2.5 2
3%-2.5 -2
-3%-2.5 2
&
Function Bit-by-bit "and"
Remarks The & sign implements the bit-by-bit logical “and” of the numerical value preceding it
and the numerical value following it. A given bit of the result is equal to 1 if the
matching bits of both operands are equal to 1. The operation is done both on integer
bits and fractional bits (if any).
Multiplication, division, modulo (remainder), and bit-by-bit “and” operations have
higher priority than addition, subtraction, bit-by-bit “or”, and bit-by-bit “exclusive-or”
operations. Operations of the same priority are implemented from left to right.
This bit-by-bit “and” operator that logically combines the bits of numerical values is
not to be confused with the AND command, which logically combines conditions.
Example Operation Result
3&1 1
3&2 2
3&3 3
3&4 0
3&-3 1
0.875&1.75 0.75
0.875&-1.75 0.25
|
Function Bit-by-bit "or"
Remarks The | sign implements the bit-by-bit logical “or” of the numerical value preceding it
and the numerical value following it. A given bit of the result is equal to 1 if the
matching bit of either operand is equal to 1. The operation is done both on integer bits
and fractional bits (if any).
Multiplication, division, modulo (remainder), and bit-by-bit “and” operations have
higher priority than addition, subtraction, bit-by-bit “or”, and bit-by-bit “exclusive-or”
operations. Operations of the same priority are implemented from left to right.
This bit-by-bit “or” operator that logically combines the bits of numerical values is not
to be confused with the OR command, which logically combines conditions.
Example Operation Result
4|3 7
3|2 3
3|3 3
$F0|$4 $F4
3|-3 -1
0.5|0.375 0.875
0.875|-1.75 -0.375
^
Function "Bit-by-bit “exclusive or”
Remarks The ^ sign implements the bit-by-bit logical “exclusive or” (xor) of the numerical value
preceding it and the numerical value following it. A given bit of the result is equal to 1
if the matching bits of the two operands are different from each other. The operation is
done both on integer bits and fractional bits (if any).
Multiplication, division, modulo (remainder), and bit-by-bit “and” operations have
higher priority than addition, subtraction, bit-by-bit “or”, and bit-by-bit “exclusive-or”
operations. Operations of the same priority are implemented from left to right.
Example Operation Result
2^1 3
2^2 0
5^7 2
$AA^$55 $FF
3^-3 -2
0.5^0.875 0.375
Mathematical Functions
ABS
Function Absolute value
Syntax ABS({expression})
Domain All real numbers
Domain units User-determined
Range Non-negative real numbers
Range units User-determined
Remarks ABS implements the absolute-value, or magnitude function of the mathematical
expression contained inside the following parentheses.
Example P8=ABS(P7) ; Computes magnitude of P7
IF(Q200!=0) ; Divide by 0 check
Q240=ABS(Q200)/Q200 ; Computes sign (-1 or 1) of Q200
ELSE
Q240=0 ; Sign value is 0
ENDIF
ACOS
Function Trigonometric arc-cosine
Syntax ACOS({expression})
Domain -1.0 to +1.0
Domain units none
Range 0 to Pi radians (0 to 180 degrees)
Range units Radians/degrees
Remarks ACOS implements the inverse cosine, or arc-cosine function of the mathematical
expression contained inside the following parentheses.
This function returns values in degrees if I15 is set to the default value of 0; it returns
values in radians if I15 is set to 1.
If the argument inside the parentheses is outside of the legal domain of –1.0 to +1.0, an
arbitrary value will be returned. No error will be reported, and the program will not
stop. It is the programmer’s responsibility to check for possible domain errors.
Example P50=ACOS(P48/P49) ; Computes angle whose cos is P48/P49
C(ACOS(Q70/10)) ; Move C axis to specified angle
ASIN
Function Trigonometric arc-sine
Syntax ASIN({expression})
Domain -1.0 to +1.0
Domain units none
Range 0 to Pi radians (0 to 180 degrees)
Range units Radians/degrees
Remarks ASIN implements the inverse sine, or arc-sine function of the mathematical expression
contained inside the following parentheses.
This function returns values in degrees if I15 is set to the default value of 0; it returns
values in radians if I15 is set to 1.
If the argument inside the parentheses is outside of the legal domain of –1.0 to +1.0, an
arbitrary value will be returned. No error will be reported, and the program will not
stop. It is the programmer’s responsibility to check for possible domain errors.
Example P50=ASIN(P48/P49) ; Computes angle whose sin is P48/P49
C(ASIN(Q70/10)) ; Move C axis to specified angle
ATAN
Function Trigonometric arc-tangent
Syntax ATAN({expression})
Domain All real numbers
Domain units none
Range -Pi/2 to +Pi/2 radians (-90 to +90 degrees)
Range units Radians/degrees
Remarks ATAN implements the standard inverse tangent, or arc-tangent function of the
mathematical expression contained inside the following parentheses. This standard
arc-tangent function returns values only in the +/-90-degree range; if a full +/-180-
degree range is desired, the ATAN2 function should be used instead.
This function returns values in degrees if I15 is set to the default value of 0; it returns
values in radians if I15 is set to 1.
Example P50=ATAN(P48/P49) ; Computes angle whose tan is P48/P49
C(ATAN(Q70/10)) ; Move C axis to specified angle
ATAN2
Function Two-argument trigonometric arc-tangent
Syntax ATAN2({expression})
Domain All real numbers in both arguments
Domain units none
Range -Pi to +Pi radians (-180 to +180 degrees)
Range units Radians/degrees
Remarks ATAN2 implements the expanded (two-argument) inverse tangent, or arc-tangent
function of the mathematical expression contained inside the following parentheses,
and the value of variable Q0 for the coordinate system used. (If this function is used
inside a PLC program, make sure the desired coordinate system has been selected with
the ADDRESS command.)
This expanded arc-tangent function returns values in the full +/-180-degree range; if
only the +/-90-degree range is desired, the standard ATAN function should be used
instead. The ATAN2 function makes use of the signs of both arguments, as well as the
ratio of their magnitudes, to extend the range to a full 360 degrees. The value in the
parentheses following ATAN2 is the “sine” argument; the value in Q0 is the “cosine”
argument.
This function returns values in degrees if I15 is set to the default value of 0; it returns
values in radians if I15 is set to 1.
If both arguments for the ATAN2 function are equal to exactly 0.0, an internal
division-by-zero error will result, and an arbitrary value will be returned. No error will
be reported, and the program will not stop. It is the programmer’s responsibility to
check for these possible domain errors.
Example Q30=-0.707 ; “Cosine” argument
Q31=-0.707 ; “Sine” argument
Q32=ATAN(Q31/Q30) ; Single-argument arctangent
Q32 ; Query resulting value
45 ; Returns value in +/-90 range
Q0=Q30 ; Prepare “cosine” for ATAN2
Q33=ATAN2(Q31) ; Two-argument arctangent
Q33 ; Query resulting value
-135 ; Note different result
Q0=M163-M161 ; X target – X present position
Q1=M263-M261 ; Y target – Y present position
IF (ABS(Q0)>0.001 OR ABS(Q1)>0.001) ; Div by 0 check
Q2=ATAN2(Q1) ; Calculate directed angle
ENDIF
COS
Function Trigonometric cosine
Syntax COS({expression})
Domain All real numbers
Domain units Radians/degrees
Range -1.0 to +1.0
Range units none
Remarks COS implements the trigonometric cosine function of the mathematical expression
contained inside the following parentheses.
This function interprets its argument in degrees if I15 is set to the default value of 0; it
interprets its argument in radians if I15 is set to 1.
Example P60=COS(30) ; Computes cosine of 30
X(Q80*COS(Q81)) ; Move X axis to calculated value
EXP
Function Exponentiation (ex)
Syntax EXP({expression})
Domain All real numbers
Domain units User-determined
Range Positive real numbers
Range units User-determined
Remarks EXP implements the standard exponentiation function of the mathematical expression
contained inside the following parentheses, raising “e” to the power of this expression.
To implement the yx function, use ex ln(y) instead.
Example P20=EXP(P19) ; Raises e to the power of P19
P3=EXP(P2*LN(P1)) ; Raises P1 to the power of P2
INT
Function Truncation to integer
Syntax INT({expression})
Domain All real numbers
Domain units User-determined
Range All integers
Range units User-determined
Remarks INT implements the truncation to integer function of the mathematical expression
contained inside the following parentheses. The truncation is always done in the
negative direction.
Note that while the result is an integer number, it is still represented as a floating-point
value.
Example P50=2.5 ;
P51=INT(P50) ; Take INT of positive value
P51 ; Query resulting value
2 ; Next lower integer value
P52=INT(-P50) ; Take INT of negative value
P52 ; Query resulting value
-3 ; Next lower integer value
LN
Function Natural logarithm
Syntax EXP({expression})
Domain Positive real numbers
Domain units User-determined
Range All real numbers
Range units User-determined
Remarks LN implements the natural logarithm (logarithm base “e”) function of the mathematical
expression contained inside the following parentheses.
To implement the logarithm using another base, divide the natural logarithm of the
value by the natural logarithm of the base (logyx = ln x / ln y). The natural logarithm
of 10 is equal to 2.302585.
If the argument inside the parentheses is outside of the legal domain of positive
numbers, a 0 value will be returned. No error will be reported, and the program will
not stop. It is the programmer’s responsibility to check for possible domain errors.
Example P19=LN(P20) ; Takes the natural log of P20
P6=LN(P5)/LN(10) ; Takes the log base 10 of P5
SIN
Function Trigonometric sine
Syntax SIN({expression})
Domain All real numbers
Domain units Radians/degrees
Range -1.0 to +1.0
Range units none
Remarks SIN implements the trigonometric sine function of the mathematical expression
contained inside the following parentheses.
This function interprets its argument in degrees if I15 is set to the default value of 0; it
interprets its argument in radians if I15 is set to 1.
Example P60=SIN(30) ; Computes cosine of 30
Y(Q80*SIN(Q81)) ; Move Y axis to calculated value
SQRT
Function Square root
Syntax SQRT({expression})
Domain Non-negative real numbers
Domain units User-determined
Range Non-negative real numbers
Range units User-determined
Remarks SQRT implements the positive square-root function of the mathematical expression
contained inside the following parentheses.
If the argument inside the parentheses is outside of the legal domain of non-negative
numbers, an arbitrary value will be returned. No error will be reported, and the
program will not stop. It is the programmer’s responsibility to check for possible
domain errors.
Example P19=SQRT(P20) ; Takes the square root of P20
P50=SQRT(P8*P8+P9*P9) ; Pythagorean theorem calculation
TAN
Function Trigonometric tangent
Syntax TAN({expression})
Domain All real numbers except +/-(2N-1)*90 degrees
Domain units Radians/degrees
Range All real numbers
Range units none
Remarks TAN implements the trigonometric tangent function of the mathematical expression
contained inside the following parentheses.
This function interprets its argument in degrees if I15 is set to the default value of 0; it
interprets its argument in radians if I15 is set to 1.
If the argument inside the parentheses approaches +/-(2N-1)*90 degrees (+/-90, 270,
450, etc.), the TAN function will “blow up” and a very large value will be returned. If
the argument inside the parentheses is exactly equal to one of these quantities, an
internal division-by-zero error will occur and the resulting value will saturate at +/-247.
No error will be reported, and the program will not stop. It is the programmer’s
responsibility to check for possible domain errors.
Example P60=TAN(30) ; Computes cosine of 30
Y(Q80*TAN(Q81)) ; Move Y axis to calculated value
A value of 8-15 in CONFIG_W1 tells PMAC2 to read ANAI00-07, respectively, as a -2.5 to +2.5V input,
resulting in a signed value.
A value of 0-7 in CONFIG_W2 tells PMAC2 to read channel ANAI08-15, respectively, as a 0 to+5V
input, resulting in an unsigned value.
A value of 8-15 in CONFIG_W1 tells PMAC2 to read ANAI08-15, respectively, as a -2.5 to +2.5V input,
resulting in a signed value.
Each phase update (9 kHz default), PMAC2 increments through one line of the table. It copies the ADC
reading(s) selected in the previous cycle into RAM, then writes the next configuration words to the
ADC(s). Typically, this will be used to cycle through all 8 ADCs or pairs of ADCs. To cycle through all
8 pairs of ADCs in unsigned mode, the table should look like this:
PMAC X Word X Word Y Word Y Word
Address Upper 12 Bits Lower 12 Bits Upper 12 Bits Lower 12 Bits
$0708 0 0 ANAI08 ANAI00
$0709 1 1 ANAI09 ANAI01
$070A 2 2 ANAI10 ANAI02
$070B 3 3 ANAI11 ANAI03
$070C 4 4 ANAI12 ANAI04
$070D 5 5 ANAI13 ANAI05
$070E 6 6 ANAI14 ANAI06
$070F 7 7 ANAI15 ANAI07
Suggested M-variable definitions for the configuration words are:
M990->X:$0708,0,24,U ; 1st CONFIG_W1 and CONFIG_W2
M991->X:$0709,0,24,U ; 2nd CONFIG_W1 and CONFIG_W2
M992->X:$070A,0,24,U ; 3rd CONFIG_W1 and CONFIG_W2
M993->X:$070B,0,24,U ; 4th CONFIG_W1 and CONFIG_W2
M994->X:$070C,0,24,U ; 5th CONFIG_W1 and CONFIG_W2
M995->X:$070D,0,24,U ; 6th CONFIG_W1 and CONFIG_W2
M996->X:$070E,0,24,U ; 7th CONFIG_W1 and CONFIG_W2
M997->X:$070F,0,24,U ; 8th CONFIG_W1 and CONFIG_W2
If you wanted to set up all ADCs for a unipolar (unsigned) conversion, the following commands could be
issued
M990=$000000 ; Select ANAI00 and ANAI08 (if present) unipolar
M991=$001001 ; Select ANAI01 and ANAI09 (if present) unipolar
M992=$002002 ; Select ANAI02 and ANAI10 (if present) unipolar
M993=$003003 ; Select ANAI03 and ANAI11 (if present) unipolar
M994=$004004 ; Select ANAI04 and ANAI12 (if present) unipolar
M995=$005005 ; Select ANAI05 and ANAI13 (if present) unipolar
M996=$006006 ; Select ANAI06 and ANAI14 (if present) unipolar
M997=$007007 ; Select ANAI07 and ANAI15 (if present) unipolar
To set up the configuration words for bipolar analog inputs, the commands could look like this:
M990=$008008 ; Select ANAI00 and ANAI08 (if present) bipolar
M991=$009009 ; Select ANAI01 and ANAI09 (if present) bipolar
M992=$00A00A ; Select ANAI02 and ANAI10 (if present) bipolar
M993=$00B00B ; Select ANAI03 and ANAI08 (if present) bipolar
M994=$00C00C ; Select ANAI04 and ANAI08 (if present) bipolar
M995=$00D00D ; Select ANAI05 and ANAI08 (if present) bipolar
M996=$00E00E ; Select ANAI06 and ANAI08 (if present) bipolar
M997=$00F00F ; Select ANAI07 and ANAI08 (if present) bipolar
Once this setup has been made, PMAC2 will automatically cycle through the analog inputs, copying the
converted digital values into RAM. These image registers can then be read as if they were the actual A/D
converters. For user program use, the image registers would be accessed with M-variables. Suggested
definitions for unipolar (unsigned) values are:
M1000->Y:$0708,0,12,U ; ANAI00 image register; from J1 pin 1
M1001->Y:$0709,0,12,U ; ANAI01 image register; from J1 pin 2
M1002->Y:$070A,0,12,U ; ANAI02 image register; from J1 pin 3
M1003->Y:$070B,0,12,U ; ANAI03 image register; from J1 pin 4
M1004->Y:$070C,0,12,U ; ANAI04 image register; from J1 pin 5
M1005->Y:$070D,0,12,U ; ANAI05 image register; from J1 pin 6
M1006->Y:$070E,0,12,U ; ANAI06 image register; from J1 pin 7
M1007->Y:$070F,0,12,U ; ANAI07 image register; from J1 pin 8
M1008->Y:$0708,12,12,U ; ANAI08 image register; from J1 pin 9
M1009->Y:$0709,12,12,U ; ANAI09 image register; from J1 pin 10
M1010->Y:$070A,12,12,U ; ANAI10 image register; from J1 pin 11
M1011->Y:$070B,12,12,U ; ANAI11 image register; from J1 pin 12
M1012->Y:$070C,12,12,U ; ANAI12 image register; from J1 pin 13
M1013->Y:$070D,12,12,U ; ANAI13 image register; from J1 pin 14
M1014->Y:$070E,12,12,U ; ANAI14 image register; from J1 pin 15
M1015->Y:$070F,12,12,U ; ANAI15 image register; from J1 pin 16
For bipolar (signed), just change the U in each definition to S.
Y:$0720 to Y:$073F form the 32 setup lines of the PMAC’s Encoder Conversion Table (ECT). The main
purpose of the ECT is to provide a pre-processing of feedback and master data to prepare it for use by the
servo loop. It can also be used to execute certain simple calculations at the servo update frequency.
Each setup line occupies a fixed register in the PMAC’s memory map. The register addresses are
important, because the results of the ECT are accessed by address.
The ECT has two halves: setup and results. The setup half resides in PMAC’s Y-memory, and can be
accessed through these 32 setup registers. The result half resides in PMAC’s X-memory. Each of the 32
setup lines has a matching result X-register at the same numerical address. If the entry consists of more
than one line, the last line has the final result; any previous lines contain intermediate results.
Table Structure: The ECT consists of a series of entries, with each entry creating one processed
(converted) feedback value. An entry in the ECT can have 1, 2, or 3 lines, with each line containing a 24-
bit setup word in Y-memory, and a 24-bit result register in X-memory. Therefore, each entry contains 1,
2, or 3 of these 24-bit setup lines, each usually represented as a hexadecimal value with six digits. The
final result is always in the X-memory register matching the last setup line in the entry.
The variables that commonly contain the address of the last line of the entry are Ix03 Motor x Position-
Loop Feedback Address, Ix04 Motor x Velocity-Loop Feedback Address, Ix05 Motor x Master Position
Address and Ix93 Coordinate System x Time-Base Address.
Entry First Line: The first line’s setup register in each entry consists of a source address in the low 16
bits (bits 0 – 15, the last four hex digits), which contains the PMAC address of the raw data to be
processed, a digit (the second hex digit, bits 16 - 19) that specifies how the source data is to be shifted and
whether the result is to be summed with the result of the above entry, and a method value in the high 4
bits (first hex digit), which specifies how this data is to be processed. If the first line in the entry is
$000000, this signifies the end of the active table, regardless of what subsequent entries in the table
(higher addressed registers) contain.
Entry Additional Lines: Depending on the method, 1 or 2 additional lines may be required in the entry
to provide further instructions on processing.
The following table summarizes the content of entries in the Encoder Conversion Table:
Incremental Encoder Entries ($0, $8, $C): These three conversion table methods utilize the incremental
encoder registers in the Servo ICs. Each method provides a processed result with the units of (1/32) count
– the low 5 bits of the result are fractional data.
1/T Extension: With the $0 method, the fractional data is computed by dividing the Time Since Last
Count register by the Time Between Last 2 Counts register. This technique is known as 1/T extension,
and is the default and most commonly used method. It can be used with a digital incremental encoder
connected directly to the PMAC, either on PMAC(1) or PMAC2.
Parallel Extension: With the $8 method, the fractional data is computed by reading the five inputs at bits
19-2,3 either of the specified address (USERn, Wn, Vn, Un, and Tn flag inputs, respectively) in the case
of a PMAC2, or of the specified address plus 4 (CHC[n+1], HMFL[n+1], +LIM[n+1], -LIM[n+1],
FAULT[n+1]) in the case of a PMAC(1). This technique is known as parallel extension, and can be used
with an analog incremental encoder processed through an ACC-8D Opt 8 Analog Encoder Interpolator
board or its equivalent.
No Extension: In the $C method, the fractional data is always set to zero, which means there is no
extension of the incremental encoder count. This setting is used mainly to verify the effect of one of the
two extension methods. It is also recommended when feeding back the pulse-and-direction outputs for
stepper drives.
With any of these three conversion methods, the source address in the low 16 bits (bits 0 – 15) is that of
the starting register of the machine interface channel.
The first table below shows the entries for PMAC(1) encoder channels. The “m” in the first hex digit
(bits 20 – 23) represents the conversion method ($0, $8, or $C). The “x” in the second hex digit
represents a 0 (not summed) or 1 (summed with above entry).
Channel Entry Channel Entry Channel Entry Channel Entry
1 $mxC000 5 $mxC010 9 $mxC020 13 $mxC030
2 $mxC004 6 $mxC014 10 $mxC024 14 $mxC034
3 $mxC008 7 $mxC018 11 $mxC028 15 $mxC038
4 $mxC00C 8 $mxC01C 12 $mxC02C 16 $mxC03C
The next table below shows the entries for PMAC2 encoder channels. The “m” in the first hex digit (bits
20 – 23) represents the conversion method ($0, $8, or $C). The “x” in the second hex digit represents a 0
(not summed) or 1 (summed with above entry).
Channel Entry Channel Entry Channel Entry Channel Entry
1 $mxC000 5 $mxC020 9 $mxC040 13 $mxC060
2 $mxC008 6 $mxC028 10 $mxC048 14 $mxC068
3 $mxC010 7 $mxC030 11 $mxC050 15 $mxC070
4 $mxC018 8 $mxC038 12 $mxC058 16 $mxC078
ACC-28 Style A/D Entries ($1, $5): The “A/D” feedback entries read from the high 16 bits of the
specified address and shift the data right three bits so that the least significant bit of the processed result in
bit 5. Unlike the “parallel feedback” methods, this method will not “roll over” and extend the result.
The $1 method processes the information directly, essentially a copying with shift. The $5 integrates the
input value as it copies and shifts it. That is, it reads the input value, shifts it right three bits, adds the bias
term in the second line, and adds this value to the previous processed result.
If the bit 19 of the entry is ‘0’ (making the second hex digit $0), the 16-bit source value is treated as a
signed quantity; this should be used for the ACC-28A. If bit 19 of the entry is ‘1’ (making the second hex
digit $8), the 16-bit value is treated as an unsigned quantity; this should be used for the ACC-28B.
The first table shows the entry values that should be used for ACC-28 boards interfaced to PMAC(1)
Servo ICs. The “m” in the first hex digit refers to the method digit – $1 for un-integrated; $5 for
integrated. The “x” in the second digit is set to $0 for an ACC-28A signed A/D converter, or $8 for an
ACC-28B unsigned A/D converter.
Channel Entry Channel Entry Channel Entry Channel Entry
1 $mxC006 5 $mxC016 9 $mxC026 13 $mx$C036
2 $mxC007 6 $mxC017 10 $mxC027 14 $mx$C037
3 $mxC00E 7 $mxC01E 11 $mxC02E 15 $mx$C03E
4 $mxC00F 8 $mxC01F 12 $mxC02F 16 $mx$C03F
The next table shows the entry values that should be used for ACC-28B boards interfaced to PMAC2
Servo ICs. . The “m” in the first hex digit refers to the method digit – $1 for un-integrated; $5 for
integrated.
Channel Entry Channel Entry Channel Entry Channel Entry
1A $m8C005 5A $m8C025 9A $m8C045 13A $m8C065
1B $m8C006 5B $m8C026 9B $m8C046 13B $m8C066
2A $m8C00D 6A $m8C02D 10A $m8C04D 14A $m8C06D
2B $m8C00E 6B $m8C02E 10B $m8C04E 14B $m8C06E
3A $m8C015 7A $m8C035 11A $m8C055 15A $m8C075
3B $m8C016 7B $m8C036 11B $m8C050 15B $m8C076
4A $m8C01D 8A $m8C03D 12A $m8C05D 16A $m8C07D
4B $m8C01E 8B $m8C03E 12B $m8C05E 16B $m8C07E
Integration Bias: The $5 integrated format requires a second line to specify the bias of the A/D converter.
This bias term is a signed quantity (even for an unsigned A/D converter), with units of 1/256 of the LSB
of the 16-bit A/D converter. This value is subtracted from the reading of the ADC before the integration
occurs.
For example, if there were an offset in a 16-bit ADC of +5 LSBs, this term would be set to 1280. If no
bias is desired, a zero value should be entered here. If the conversion is unsigned, the result after the bias
is not permitted to be less than zero. This term permits reasonable integration, even with an analog offset.
Parallel Feedback Entries ($2, $3, $6, $7) [Modified]: The “parallel feedback” entries read a word from
the address specified in the low 16 bits (bits 0 – 15) of the first line, either a whole word from the single
address specified, or three bytes from three consecutive Y-word addresses starting at the specified
address. The four methods in this class, specified by the first hex digit (bits 20 – 23) are:
• $2: Y-word parallel, no filtering (2-line entry)
• $3: Y-word parallel, with filtering (3-line entry)
• $6: X-word parallel, no filtering (2-line entry)
• $7: X-word parallel, with filtering (3-line entry)
The second hex digit (bits 16 – 19) contains four mode-control bits that govern how the conversion is
done. The four mode-control bits are:
• Bit 16 (digit value 1): Summing control (0 = no summing; 1 = sum with above result) for word-
wide reads only; byte-select bit 0 for byte-wide reads only (depending on bit 18)
• Bit 17 (digit value 2): Reserved for word-wide reads, byte-select bit 1 for byte-wide reads
• Bit 18 (digit value 4): Shift-right/byte-wide-read control (depending on bits 16 and 17)
• Bit 19 (digit value 8): Shift-left control (0 = normal 5-bit left shift; 1 = no or right shift)
These four bits provide multiple combinations for the second hex digit, shown in the following table:
$3 (Reserved) $B (Reserved)
Shift control: With the “normal shift”, the LSB of the source register is shifted to bit 5 of the
result register, providing the standard 5 bits of (non-existent here) fractional position data. In this case,
PMAC software regards the LSB as one “count” of position. With the “3-bit right shift”, bit 8 of the
source register is shifted to bit 5 of the result register. This is appropriate for 16-bit data found in the high
16 bits of the source register, such as the old MACRO Type 0 feedback.
With “no shift”, the LSB of the source register ends up in bit 0 of the result register. This mode is used
for one of three reasons:
• The data already comes with 5 bits of fraction, as from a MACRO Station.
• The normal shift limits the maximum velocity too much (Vmax<218 LSBs per servo cycle)
• The normal shift limits the position range too much (Range<+247/Ix08/32 LSBs)
Unless this is done because the data already contains fractional information, the “unshifted” conversion
will mean that the motor position loop will consider 1 LSB of the source to be 1/32 of a count, instead of
1 count.
Word-Wide vs. Byte-Wide: Most types of position data read with the parallel conversion will be
present in a single data word of up to 24 bits. This is “word-wide” data, read with the control bit in bit 18
set to 0, or bit 18 set to 1 and bits 16 and 17 both set to 0.
However, on some interface boards, such as the ACC-14P, the bus interface is only byte wide, so position
data of more than 8 bits is read in bytes of consecutive registers. For this format, the control bit in bit 18
should be set to 1, and the combined value of bits 16 and 17 set to 1, 2, or 3.
If bits 16 and 17 set a combined value of 1, the low bytes (bits 0 – 7) of the selected registers are read. If
bits 16 and 17 set a combined value of 2, the middle bytes (bits 8 – 15) of the selected registers are read.
If bits 16 and 17 set a combined value of 3, the high bytes (bits 16 – 23) of the selected registers are read.
With the byte-wide read, right shifting of the result data is not supported, and summing of the result with
the previous result is not supported. Only Y-registers can be read in byte-wide format, so byte-wide reads
are supported only in methods $2 and $3, not $6 and $7.
In the byte-wide read, the low 16 bits (last 4 hex digits) of the first setup line specify the address of the
first of the three Y-registers to be read. The Y-registers at the next two higher-numbered addresses will
also be read. The selected bytes of these three registers are combined into a single 24-bit value, with the
selected byte of the first register forming the least significant byte of this value. The mask word of the
second setup line (see below) then operates on this combined value as if it had come from a single 24-bit
word.
Examples of this byte-wide conversion with the ACC-14P are shown below.
Mask Word: The second setup line is a 24-bit mask word that indicates which bits of the 24-bit word-wide
source register, or of the 24-bit value combined from 3 byte-wide reads, are to be used. Each bit that is to
be used takes a 1 in the mask word; each bit that is not to be used takes a 0 in the mask word. The mask
word is combined with the contents of the source register or combined value with a bit-by-bit AND
operation before the data is processed further. A correct mask word is necessary to ensure that all bits of
the source to be used are used, that no bits that are not to be used are used, and to handle rollover of the
source data properly.
For example, a mask word of $000FFF causes the low 12 bits of the source register to be used, $07FFFF
causes the low 19 bits to be used, and $FFFFFF causes all 24 bits to be used.
Maximum Change Word: If the method character for a parallel read is $3 or $7, specifying “filtered”
parallel read, there is a third setup line for the entry. This third line contains the maximum change in the
source data in a single cycle that will be reflected in the processed result, expressed in LSBs per servo
cycle. The filtering that this creates provides an important protection against noise and misreading of
data. This number is effectively a velocity value, and should be set slightly greater than the maximum
true velocity ever expected.
Common Parallel Data Sources: Any register can be read as a parallel data source, but the most common
sources are MACRO feedback registers, MLDT timer registers, ACC-14D/V latched input registers, and
ACC-14P byte-wide latched input registers. Each of these is covered below.
MACRO Feedback: When receiving position data over the MACRO ring with the “Type 1” protocol used
in Delta Tau and most other MACRO devices, the position feedback appears in the 24-bit Register 0 for
the “servo node”. Servo nodes are mapped into Y-registers in PMAC2, and the MACRO protocol has its
own error detection, so typically method $2 is used (Y-register, no filtering). This position data has
usually already been processed in the encoder conversion table of the remote MACRO Station and comes
back with five bits of fractional information, so it does not need to be shifted in the conversion table,
making the second digit $8.
MACRO Type 1 Position Feedback
st
Node 1 Setup Node 1st Setup Node 1st Setup Node 1st Setup
Line Line Line Line
0 $28C0A0 4 $28C0A8 8 $28C0B0 12 $28C0B8
1 $28C0A4 5 $28C0AC 9 $28C0B4 13 $28C0BC
Sometimes a MACRO I/O node is used to bring back additional position data. I/O nodes are mapped into
X-registers in PMAC2, so typically method $6 is used (X-register, no filtering). This position data also
has typically been processed in the remote MACRO Station, so the second digit is $8 for no shifting here.
MACRO I/O Node Register 0 as Alternate Position Feedback
st
Node 1 Setup Node 1st Setup Node 1st Setup Node 1st Setup
Line Line Line Line
2 $68C0A0 6 $68C0A8 10 $68C0B0 14 $68C0B8
3 $68C0A4 7 $68C0AC 11 $68C0B4 15 $68C0BC
MLDT Feedback: PMAC2 Servo ICs have the ability to interface directly to magnetostrictive linear
displacement transducers (MLDTs), outputting the excitation pulse, receiving the echo pulse, and
measuring the time between the two. This time is directly proportional to the distance. For this feedback
the “time between last two counts” register is used like an absolute encoder. The following table shows
the first line of the parallel feedback entry for each channel’s timer register:
MLDT Timer Entries
Channel Entry Channel Entry Channel Entry Channel Entry
1 $30C000 5 $30C020 9 $30C040 13 $30C060
2 $30C008 6 $30C028 10 $30C048 14 $30C068
3 $30C010 7 $30C030 11 $30C050 15 $30C070
4 $30C018 8 $30C038 12 $30C058 16 $30C078
The second line in an MLDT entry should be $07FFFFF to specify the use of the low 19 bits.
The third line in an MLDT entry should contain a number slightly greater than the maximum velocity
ever expected, expressed as timer increments per servo cycle. An increment of the 120 MHz timer
represents about 0.024mm (0.0009 in) on a typical MLDT device. This value represents the maximum
change in position reading that will be passed through the conversion table in a single servo cycle, and it
provides an important protection against missing or spurious echo pulses.
Word-Wide Parallel Feedback: The ACC-14D and 14V boards are often used to connect parallel data
from an absolute encoder or interferometer. The following table shows the entry first lines for the
registers on these boards. The latched input registers on ACC-14D/V boards are mapped into Y-registers
and filtering is usually desired, so a $3 method digit is used. In most cases, the normal shift is applied,
making the second digit $0, but if the feedback has very high resolution, as can happen with an
interferometer, the second digit should be set to $8 to disable shifting.
ACC-14D/V Port Entries
ACC 14 # Port Entry ACC 14 # Port Entry
1 A $3xFFD0 4 A $3xFFE8
1 B $3xFFD1 4 B $3xFFE9
2 A $3xFFD8 5 A $3xFFF0
2 B $3xFFD9 5 B $3xFFF1
3 A $3xFFE0 6 A $3xFFF8
3 B $3xFFE1 6 B $3xFFF9
x = 0: normal shift; x = 8: no shift
Byte-Wide Parallel Feedback: The ACC-14P is a PCI-format board that can be used to connect parallel
data from an absolute encoder or interferometer. The following table shows the entry first lines for the
registers on these boards. The latched input registers on ACC-14D/V boards are mapped into Y-registers
and filtering is usually desired, so a $3 method digit is used.
The data is byte-wide, so bit 18 (value of 4 in the second digit) is set to 1. Ports A and B occupy the low
bytes of each word, so bits 16 and 17 get a combined value of 1, making the second hex digit $5. Ports C
and D occupy the middle bytes of each word, so bits 16 and 17 get a combined value of 2, making the
second hex digit $6. If no shifting of the result data is desired, bit 19 (value of 8 in this digit) is also set to
1, making the second hex digit $D or $E
Ports A and C on these boards start in the board’s base address; Ports B and D start in {Base+3}.
In the armed state, the ECT checks every servo cycle for the channel’s trigger bit to be set. When the
ECT sees the trigger (the capture trigger for the machine interface channel as defined by Encoder I-
variable 2 and 3 for the channel used (e.g. I917 and I918 for a PMAC(1) channel 4 or I942 and I943 for a
PMAC2 channel 4), it automatically sets the method digit to $A for “running” time base. It uses the
position captured by the trigger as the starting position (“time zero”) for the running time base.
The following tables show the possible first-line entries for triggered time base (running mode):
Triggered Time-Base Entries for PMAC(1)-Style Servo ICs (Running State)
Channel Entry Channel Entry Channel Entry Channel Entry
1 $A0C000 5 $A0C010 9 $A0C020 13 $A0C030
2 $A0C004 6 $A0C014 10 $A0C024 14 $A0C034
3 $A0C008 7 $A0C018 11 $A0C028 15 $A0C038
4 $A0C00C 8 $A0C01C 12 $A0C02C 16 $A0C03C
The more complex tracking filter, which is a five-line entry in the table, is suitable for smoothing either
master data or feedback data, because its integrator eliminates steady-state errors. Still, its filtering can
introduce delays in responding to dynamic changes (e.g. accelerations), so it needs to be set up carefully.
This software tracking filter is dynamically equivalent to the hardware tracking filters common in
resolver-to-digital converter ICs. It is commonly used to smooth the results of direct conversion of
sinusoidal encoders and resolvers.
Exponential Filter ($D0xxxx)
The equation of the exponential filter executed every servo cycle n is:
If [In(n) - In(n-1)] > Max_change, In(n) = In(n-1) + Max_change
If [In(n) - In(n-1)] < -Max_change, In(n) = In(n-1) - Max_change
Out(n) = Out(n-1) + (K/223)*[In(n)-Out(n-1)]
In, Out, and K are all signed 24-bit numbers (range -8,388,608 to 8,388,607). The difference [In(n)-
Out(n-1)] is truncated to 24 bits to handle rollover properly.
The time constant of the filter, in servo cycles, is (223/K)-1. The lower the value of K, the longer the time
constant.
No shifting action is performed. Any operations such as 1/T interpolation should have been done on the
data already, so the source register for this filter is typically the result register of the previous operation.
Method/Address Word: The first setup line of an exponential filter entry contains a ‘D’ in the first hex
digit (bits 20 – 23), a ‘0’ in the second hex digit, and the address of the source X-register in the third
through sixth hex digits (bits 0 – 15). If it is desired to execute an exponential filter on the contents of a
Y-register, the contents of the Y-register must first be copied to an X-register in the conversion table with
a “parallel” entry ($2) higher in the table. The source addresses for exponential filter entries are almost
always from the conversion table itself (X:$0720 – X:$073C). For example, to perform an exponential
filter on the result of the fourth line of the table, the first setup line of the filter entry would be $D00723.
Maximum Change Word: The second setup line of an exponential filter entry contains the value “max
change” that limits how much the entry can change in one servo cycle. The units of this entry are
whatever the units of the input register are, typically 1/32 of a count. For example, to limit the change in
one servo cycle to 64 counts with an input register in units of 1/32 count, this third line would be 64*32 =
2048.
Filter Gain Word: The third setup line of an exponential filter entry contains the filter gain value K,
which sets a filter time constant Tf of (223/K)-1 servo cycles. Therefore, the gain value K can be set as
223/(Tf+1). For example, to set a filter time constant of 7 servo cycles, the filter gain word would be
8,388,608/(7+1) = 1,048,576.
Result Word: The output value of the exponential filter is placed in the X register of the third line of the
conversion table entry. An operation that uses this value should address this third register; for example
Ix05 for position following, or the source address for a time-base conversion-table entry (to keep position
lock in time base, this filter must be executed before the time-base differentiation, not afterward).
Resolver Conversion Entries ($E) [Geo PMAC only]: The $E entry converts the sine and cosine
resolver feedback values processed through the Geo PMAC’s A/D converter (ADC) registers to a 14-bit
resolver angle value.
Method/Address Word: The first setup line of a resolver conversion entry contains $E in the first hex digit
and the Y-address of the first ADC register to be read in the low 16 bits (the third through sixth hex
digits). The next ADC register is read at the next higher Y-address. If bit 19 of the line is set to 0
(making the second hex digit $0) the conversion creates a “clockwise” rotation sense. If bit 19 of the line
is set to 1 (making the second hex digit $8), the conversion creates a “counter-clockwise” rotation sense.
The two base ADC addresses presently supported by the Geo PMAC for resolver conversion are Y:$FF00
for Channel 1 and Y:$FF20 for Channel 2. Therefore, the possible first-setup-line values are:
First Setup Line Conversion
$E0FF00 Channel 1 CW
$E8FF00 Channel 1 CCW
$E0FF20 Channel 2 CW
$E8FF20 Channel 2 CCW
Excitation Address Setup Word: The second setup line in a resolver conversion entry contains the address
of the excitation value register in the low 16 bits (the third through sixth hex digits), used to correlate the
excitation and the feedback values. The excitation register is presently at a fixed address of $FF5C in the
Geo PMAC, so this line should be $00FF5C.
Sine/Cosine Bias Setup Word: The third setup line in a resolver conversion entry contains bias-correction
terms for the sine and cosine ADC values. The high twelve bits (the first three hex digits) contain the
bias-correction term for the sine input; the low twelve bits (the last three hex digits) contain the bias-
correction term for the cosine input. Each 12-bit section should be treated as a signed 12-bit value (so if
the most significant of the 12 bits is a 1, the bias value is negative).
Each 12-bit bias-correction term should contain the value opposite that which the high 12 bits of the
matching A/D converter report when they should ideally report zero. In action, the bias term will be
added to the high 12 bits of the corresponding ADC reading before subsequent calculations are done.
For example, if the bias-correction word were set to $004FFA, the sine bias correction would be +4 LSBs
of a 12-bit ADC, and the cosine bias correction would be -6 LSBs ($FFA = -6) of a 12-bit ADC. In use, 4
12-bit LSBs would be added to the sine reading, and 6 12-bit LSBs would be subtracted from the cosine
reading each cycle before further processing.
In most cases, the bias-correction word will be determined automatically by an analog “diagnostic” entry
in the conversion table. The result of that diagnostic entry, containing both bias corrections, can simply
be copied into this setup word.
The resolver conversion can only be used if the Geo PMAC’s Feedback Option 1 for analog position
feedback is ordered.
Result Word: The output value of the resolver conversion is placed in the 24-bit X-register of the third
line of the conversion table entry. The values in bits 5 – 16 of the result word contain the high 12 bits of
the calculated arctangent of the bias-corrected sine and cosine values from the resolver. Because PMAC
software considers the value in bit 5 to be a “count” for its scaling purposes, this conversion returns
resolver position values of a 12-bit conversion (4096 “counts” per cycle of the resolver).
However, because the conversion uses dual 14-bit converters and the arctangent calculations compute
more than 12 bits, the result contains additional resolution in bits 0 – 4 that PMAC software considers to
have “fractional”, but still real, count resolution. If the electromagnetic noise levels are low, and the
signals use near the full scale of the ADCs, a repeatable 14-bit resolution (16,384 states per cycle of the
resolver) can be achieved.
Bits 17 – 23 of the result contain cycle data from software extension of the result to multiple resolver
cycles. If the result is then used for feedback or master data, it will be further extended in the motor
algorithms.
This resolver conversion is a direct, and not a tracking, conversion. As such, it is more dynamically
responsive, but also more susceptible to measurement noise. If a more noise-immune result is desired, at
the cost of some dynamic responsiveness (but still no steady-state tracking errors), a digital tracking filter
can be implemented on this result with another conversion table entry (format $D8). The result of that
filter entry can then be used as the feedback or master data.
High-Resolution Interpolator Entries ($F): An ECT entry in which the first hex digit of the first line is
$F processes the result of a high-resolution interpolator for analog “sine-wave” encoders, such as the
ACC-51. This entry, when used with a high-resolution interpolator, produces a value with 4096 states per
line. The entry must read both an encoder channel for the whole number of lines of the encoder, and a
pair of A/D converters to determine the location within the line, mathematically combining the values to
produce a single position value.
Encoder Channel Address: The first line of the two-line entry contains $F in the first hex digit and the
base address of the encoder channel to be read in the low 16 bits (bits 0 to 15). If bit 19 of the line is set
to 0 (making the second hex digit $0), PMAC expects a PMAC(1)-style Servo IC on the interpolator, as
in the ACC-51P. If bit 19 is set to 1 (making the second hex digit $8), PMAC expects a PMAC2-style
Servo IC for the interpolator, as in the ACC-51S for the PMAC2A-PC/104.
The following table shows the possible entries when PMAC(1)-style Servo ICs are used, as in the ACC-
51P.
High-Res Interpolator Entry First Lines for ACC-51P
Channel Entry Channel Entry Channel Entry Channel Entry
9 $F0C020 11 $F0C028 13 $F0C030 15 $F0C038
10 $F0C024 12 $F0C02C 14 $F0C034 16 $F0C03C
The next table shows the possible entries for the ACC-51S, which uses the Servo ICs of the PMAC2A-
PC/104 main board and the ACC-1P Axis 5-8 board:
High-Res Interpolator Entry First Lines for ACC-51S
Channel Entry Channel Entry Channel Entry Channel Entry
1 $F8C000 3 $F8C010 5 $F8C020 7 $F8C030
2 $F8C008 4 $F8C018 6 $F8C028 8 $F8C038
A/D Converter Address: The second line of the entry contains $00 in the first two hex digits and the base
address of the first of two A/D converters to be read in the low 16 bits (bits 0 to 15, the last four hex
digits). The second A/D converter will be read at the next higher address. The following table shows the
possible entries when the ACC-51P is used:
High-Res Interpolator Entry Second Lines for ACC-51P
Channel Entry Channel Entry Channel Entry Channel Entry
9 $00C022 11 $00C02A 13 $00C032 15 $00C03A
10 $00C026 12 $00C02E 14 $00C036 16 $0FC03E
The next table shows the possible entries when the ACC-51S is used:
High-Res Interpolator Entry Second Lines for ACC-51S
Channel Entry Channel Entry Channel Entry Channel Entry
1 $00FFC0 3 $00FFC4 5 $00FFC8 7 $00FFCC
2 $00FFC2 4 $00FFC6 6 $00FFCA 8 $00FFCE
ResultWord: The output value of the high-resolution sinusoidal encoder conversion is placed in the 24-bit
X-register of the second line of the conversion table entry. Bit 0 of the result contains the LSB of the
conversion representing 1/4096 of a line of the encoder. Since PMAC software considers Bit 5 to be a
“count” for scaling purposes when used for servo feedback or master data, Bit 0 will be considered 1/32
of a count. This means that PMAC software will scale the data as 128 “software counts” per line of the
encoder.
High-Resolution Encoder Interpolation Entries ($F) [New 3-line or 5-line entry for Geo PMAC
only]: The $F entry in the Geo PMAC is used to process the feedback from sinusoidal incremental
encoders through the Geo PMAC’s high-resolution interpolation circuitry in one of two ways. The two
methods are distinguished by bit 19 of the first setup line of the entry. If bit 19 is 0, making the second
hex digit $0, it is a 3-line entry that simply produces a position result with 4096 states per line of the
encoder, suitable for direct use as feedback or master data. If bit 19 is 1, making the second hex digit $8,
it is a 5-line entry that produces several data results useful for setup and diagnostics of the feedback. Note
that this conversion type operates differently from the interpolation entries on other types of PMACs.
High-Resolution Interpolation Position Entry ($F0xxxx) [Geo PMAC only]
If bit 19 of the first setup line of a Geo PMAC interpolation entry is 0, to specify an entry that produces a
usable position result, this is a three-line entry (as opposed to two lines on other PMACs). The entry
combines whole-line information from the encoder counter whose address is specified in the first line
with fractional-line information from the arctangent of the A/D converters whose address is specified in
the second line. Note that the direction sense of both parts must agree. On power-up/reset, PMAC
checks the direction sense of the counter and matches the direction sense of the fractional information to
this. However, if the direction sense of the counter is then changed with the encoder-decode I-variable,
the new settings must be saved and the PMAC reset to restore proper direction mapping.
Method/Address Setup Word: The first setup line of the three-line entry contains $F in the first hex digit,
$0 in the second hex digit, and the base address of the encoder channel to be read in the low 16 bits (the
third through sixth hex digits). In the Geo PMAC, the first encoder channel is at address $C000 and the
second encoder channel is at address $C008, so the first setup line is set to $F0C000 or $F0C008.
A/D-Converter Address Setup Word: The second line of the entry contains $00 in the first two hex digits
and the address of the first of the two A/D converters in the low 16 bits (the last four hex digits). The
second A/D converter will be read at the next higher address. In the Geo PMAC, the first A/D converter
for Channel 1 is at address $FF00, and the first A/D converter for Channel 2 is at address $FF20, so the
second setup line is set to $00FF00 or $00FF20.
Sine/Cosine Bias Setup Word: The third setup line in a high-resolution sinusoidal-encoder conversion
entry contains bias-correction terms for the sine and cosine ADC values. The high twelve bits (the first
three hex digits) contain the bias-correction term for the sine input; the low twelve bits (the last three hex
digits) contain the bias-correction term for the cosine input. Each 12-bit section should be treated as a
signed 12-bit value (so if the most significant of the 12 bits is a 1, the bias value is negative).
Each 12-bit bias-correction term should contain the value opposite that which the high 12 bits of the
matching A/D converter report when they should ideally report zero. In action, the bias term will be
added to the high 12 bits of the corresponding ADC reading before subsequent calculations are done.
For example, if the bias-correction word were set to $004FFA, the sine bias correction would be +4 LSBs
of a 12-bit ADC, and the cosine bias correction would be -6 LSBs ($FFA = -6) of a 12-bit ADC. In use, 4
12-bit LSBs would be added to the sine reading, and 6 12-bit LSBs would be subtracted from the cosine
reading each cycle before further processing.
In most cases, the bias-correction word will be determined automatically by an analog “diagnostic” entry
in the conversion table. The result of that diagnostic entry, containing both bias corrections, can simply
be copied into this setup word.
Result Word: The output value of the high-resolution sinusoidal-encoder conversion in the Geo PMAC is
placed in the 24-bit X-register of the third line of the conversion table entry. Bit 0 of the result contains
the LSB of the conversion, representing 1/4096 of a line of the encoder. Since PMAC software considers
the contents of Bit 5 to be a “count” for scaling purposes when used for servo feedback or master data, bit
0 will be considered 1/32 of a count. This means that PMAC software will scale the data as 128
“software counts” per line of the encoder.
High-Resolution Interpolation Diagnostic Entry ($Fxxxxx, bit 19 = 1) [Geo PMAC only]
If bit 19 of the first setup line of a Geo PMAC “interpolation” entry is 1, to specify an entry that produces
either vector magnitude or analog-input bias terms for the sine and cosine inputs of a sinusoidal encoder
or resolver, this is a five-line entry. These result values can be used to verify proper setup and interface of
the encoder or resolver and to optimize the accuracy of the conversion during initial setup, and/or to
check for loss of the encoder or resolver during the actual application. Bit 16 of the first setup line
determines whether the result produced is the sum of the squares of the two analog inputs (bit 16 = 0) or
the bias terms for the analog inputs (bit 16 = 1).
Method/Address Setup Word: The first setup line of the five-line entry contains $F in the first hex digit,
$8 in the second hex digit (bit 19 = 1) to produce a sum-of-squares result or $9 in the second digit (bit 19
= 1, bit 16 =1) to produce a bias correction term, and the address of the first of the two A/D converters in
the low 16 bits (the last four hex digits). The second A/D converter will be read at the next higher
address. In the Geo PMAC, the first A/D converter for Channel 1 is at address $FF00, and the first A/D
converter for Channel 2 is at address $FF20, so the first setup line is set to $F8FF00 or $F8FF20 to
produce a sum-of-squares result, or to $F9FF00 or $F9FF20 to produce a bias-correction result.
When set up to determine the bias term, if bit 17 is set to 0, making the second hex digit $9 (as the above
instructions say), the minimum and maximum values for the sine and cosine readings that are used to
determine the appropriate bias values are set to 0. As soon as the Geo PMAC starts accumulating
minimum and maximum values (the next servo cycle), it will set bit 17 to 1, making the second hex digit
to $B. If you want to start a new test, for example after a circuit adjustment, you must set bit 17 to 0
again by making the second hex digit $9.
Reserved Setup Word: The second setup line of this entry type is reserved for future use, and should be
left at 0.
Active Bias Correction Setup Word: The third setup line of the five-line entry contains the sine and cosine
bias terms that are used in the sum-of-squares calculations. Two signed 12-bit bias terms are combined in
a 24-bit word. The sine bias-correction term is in the high 12 bits (bits 12 – 23); the cosine bias-
correction term is in the low 12 bits (bits 0 – 11). These terms match the high 12 bits from the
corresponding A/D converters. This word does not necessarily match the bias “result” term derived from
using this entry to determine a suggested bias correction, or the bias correction used in the “feedback”
table entry for the encoder or resolver.
Reserved Setup Words: The fourth and fifth setup lines of this entry type are reserved for future use, and
should be left at 0.
Result Word (Sum of Squares): When bit 16 of the first setup line is 0, the final (fifth) result word
contains the sum of squares of the biased sine and cosine measurements for the most recent servo cycle.
Result = (SineADC + SineBias)2 + (Cosine ADC + CosineBias)2
The values SineADC and CosineADC are read from the A/D converters at the address specified in the first
setup line. The values SineBias and CosineBias are read from the third setup line.
To understand the scaling of the result word, it is best to think of all four of the values as being
normalized, that is, as having a valid range of -1.0 to +1.0. With small bias terms, the sum of squares
result would have a possible normalized value of 0.0 to +2.0. When read as an unsigned integer, this
register has a range of 0 to 16,777,215 ($FFFFFFF), corresponding to a normalized range of 0.0 to 2.0.
When the encoder and interpolator circuitry, or the resolver and excitation circuitry, are working properly,
the sum of squares should have a normalized value of +0.25 to +0.9999 (2,097,152 to 8,388,607, or
$200000 to $7FFFFF). If the resulting normalized value is greater than or equal to +1.0 (8,388,608, or
$800000), meaning that the most significant bit (bit 23) is set to 1, at any point in the cycle, this indicates
that saturation has occurred in at least one of the readings due to either too large a signal or a significant
bias. This should be corrected before using this sensor in actual operation.
If the result has a normalized value of less than +0.25 (2,097,152, or $200000), meaning that bits 23, 22,
and 21 are all 0, at low sensor frequencies, the signals are too small to get full resolution from the result,
and this should be corrected before using this sensor in actual operation. Many sinusoidal encoders do
have a reduction in signal magnitude of up to one-half at their highest frequencies, reducing the
magnitude of this square term by three-quarters, and this is acceptable.
It is possible to monitor this term in the actual application to check for loss of the encoder. If the inputs
are no longer driven externally, for example because the cable has come undone, the positive and negative
input pair to the ADC will pull to substantially the same voltage, and the output of the ADC will be a very
small number, resulting in a small magnitude of the sum of squares in at least part of the cycle. (If both
signals cease to be driven externally, the sum of squares will be small over the entire cycle). The high
four bits (bits 20 – 23) of the sum-of-squares result can be monitored, and if the four-bit value goes to 0, it
can be concluded that the encoder has been “lost”, and the motor should be “killed”.
Ideally, the magnitude of the sum-of-squares result should be constant throughout the sine/cosine cycle, at
least at constant frequency. If there is significant variation, this is an indication of signal imperfection. In
most cases, the most important imperfection is a DC bias on the sine and/or cosine signals. This entry can
be used in its alternate format to determine the optimal bias correction. Once that bias correction has
been determined (the result word in that format), it can be copied into the active correction setup word for
the diagnostic entry, and the entry put back into sum-of-squares mode, as an important verification that a
good bias correction has been determined.
A/D Bias Result Word: When bit 16 of the first setup line is 1, the final (fifth) result word contains the
suggested bias correction word containing the bias correction terms for the sine and cosine terms. This
24-bit value, containing two signed 12-bit correction terms, can be copied into the third setup word for the
interpolator diagnostic entry for confirmation of its effect, and to the third line of the interpolator
feedback entry, or the resolver feedback entry, for actual use. The sine bias-correction term is in the high
12 bits (bits 12 – 23); the cosine bias-correction term is in the low 12 bits (bits 0 – 11).
In this mode, the encoder should be moved for several seconds (motion by hand is OK) to ensure good
sampling of maximums and minimums of both waveforms and accurate bias-correction terms. It is
probably best to do this test with the amplifier disabled to prevent the possibility of noise distorting the
maximum and minimum readings.
on/reset is X:$E00A bits 0 – 7. It is permissible to write to this register directly (suggested M-variable
M94) to change the active setup without a SAVE and reset.
X:$0788 VME Interrupt Level
Range: $01 - $07
Units: None
Default: $02
X:$0788 controls which interrupt level (1 to 7) PMAC will assert on the VME bus. Multiple boards on
the same VME bus may assert the same interrupt level if each one has a unique set of interrupt vectors as
set by X:$0789.
X:$0788 is actually used at power-on/reset only, so to set or change the VME interrupt level, change the
value of X:$0788, store this new value to non-volatile flash memory with the SAVE command, and reset
the card with the $$$ command. The active register into which the value of X:$0788 is copied at power-
on/reset is X:$E00B bits 0 – 7. It is permissible to write to this register directly (suggested M-variable
M95) to change the active setup without a SAVE and reset.
X:$0789 VME Interrupt Vector
Range: $00 - $FF
Units: None
Default: $A1
X:$0789 controls which interrupt vectors will be provided when PMAC asserts a VME bus interrupt. If
PMAC asserts the interrupt to signify that it has read a set of mailbox registers and is ready to accept
another set, the interrupt vector value will be equal to (X:$0789-1). If PMAC asserts the interrupt to
signify that it has written to a set of mailbox registers and is ready for the host computer to read these, the
interrupt vector value will be equal to X:$0789. If PMAC asserts the interrupt to signify that it has put a
line of text in the DPRAM ASCII response buffer and is ready for the host computer to read this, the
interrupt vector value will be equal to (X:$0789+1).
If there are multiple PMAC boards asserting the same interrupt level in the VME bus as set by X:$0788,
they each must assert a unique, non-overlapping set of interrupt vectors.
X:$0789 is actually used at power-on/reset only, so to set or change the VME interrupt vector, change the
value of X:$0789, store this new value to non-volatile flash memory with the SAVE command, and reset
the card with the $$$ command. The active register into which the value of X:$0789 is copied at power-
on/reset is X:$E00C bits 0 – 7.
It is permissible to write to this register directly (suggested M-variable M96) to change the active setup
without a SAVE and reset.
X:$078A VME DPRAM Base Address Bits A23-A20
Range: $00 - $FF
Units: None
Default: $00
X:$078A controls bits A23 through A20 of the VME bus base address of the dual-ported RAM of PMAC.
Bit 3 of X:$0786 corresponds to A20 of the base address, and bit 0 of X:$0786 corresponds to A16.
X:$078A is only used if 24-bit or 32-bit addressing has been selected with X:$0783 and X:$078C.
Bits A19 through A14 of the DPRAM VME base address must be set by the host computer after every
power-on/reset by writing a byte over the bus to the “page select” register in the PMAC’s VME mailbox
IC at the mailbox base address + $0121. This must be done even with the single-page 8k x 16 standard
DPRAM option. With the extended DPRAM option, the host computer must write to the page select
register every time a new page is accessed.
X:$078A is actually used at power-on/reset only, so to set or change bits 8 to 15 of the VME bus DPRAM
base address, change the value of X:$078A, store this new value to non-volatile flash memory with the
SAVE command, and reset the card with the $$$ command. The active register into which the value of
X:$078A is copied at power-on/reset is X:$E00D bits 0 – 7. It is permissible to write to this register
directly (suggested M-variable M97) to change the active setup without a SAVE and reset.
X:$078B VME DPRAM Enable
Range: $00 - $FF
Units: None
Default: $60
X:$078B controls whether VME access to the DPRAM IC on the PMAC is enabled or not. It should be
set to $60 if DPRAM is not present to disable access; it should be set to $E0 if DPRAM is present to
enable access.
X:$078B is actually used at power-on/reset only, so to set or change the DPRAM enabling, change the
value of X:$078B, store this new value to non-volatile flash memory with the SAVE command, and reset
the card with the $$$ command. The active register into which the value of X:$078B is copied at power-
on/reset is X:$E00E bits 0 – 7. It is permissible to write to this register directly (suggested M-variable
M98) to change the active setup without a SAVE and reset.
X:$078C VME Address Width Control
Range: $00 - $FF
Units: None
Default: $10
X:$078C controls the VME bus address width, with or without DPRAM. It should take one of six values
in normal use:
• X:$078C = $00: 32-bit addressing, no DPRAM
• X:$078C = $10: 24-bit addressing, no DPRAM
• X:$078C = $30: 16-bit addressing, no DPRAM
• X:$078C = $80: 32-bit addressing, with DPRAM
• X:$078C = $90: 24-bit addressing, with DPRAM
• X:$078C = $B0: 16-bit addressing, with DPRAM
X:$078C is actually used at power-on/reset only, so to set or change the VME bus address width, change
the value of X:$078C, store this new value to non-volatile flash memory with the SAVE command, and
reset the card with the $$$ command. The active register into which the value of X:$078C is copied at
power-on/reset is X:$E00F bits 0 – 7. It is permissible to write to this register directly (suggested M-
variable M99) to change the active setup without a SAVE and reset.
Bit 18 of a hardware channel’s control word permits the enabling of a special hardware 1/T sub-count
estimation for the channel in the PMAC2 DSPGATE1 Servo ASIC. (This requires revision “D” or newer
of the DSPGATE1 IC, which started shipping in 2002.)
If bit 18 is set to 1, the ASIC will automatically compute 12 bits of timer-based estimated sub-count data
every SCLK encoder sample clock cycle (default 9.83 MHz). This sub-count position data is then
available to enhance the resolution of the hardware capture and compare functions.
When bit 18 is set to the default value of 0, the hardware 1/T functionality is disabled.
The addresses for the control word of each channel are:
Channel Control Channel Control Channel Control Channel Control
Word Word Word Word
Address Address Address Address
1 X:$C005 3 X:$C015 5 X:$C025 7 X:$C035
2 X:$C00D 4 X:$C01D 6 X:$C02D 8 X:$C03D
When the hardware 1/T functionality is enabled by setting bit 18 to 1, the registers needed for the
traditional software 1/T in the encoder conversion table are no longer accessible. At these addresses (the
first two Y-registers for the channel in the ASIC) are instead four 12-bit sub-registers for sub-count
capture and compare data.
The hardware 1/T functionality is mainly intended for use with the ACC-51x high-resolution interpolator
boards for sinusoidal encoders. That board produces 10 bits of fractional count resolution for servo
feedback with its A/D converters, but that fractional data cannot be used for hardware capture or compare
functions between servo cycles.
X:$C014, X:$C034 Servo IC m ADC Strobe Word {PMAC2 only}
Range: $000000 - $FFFFFF
Units: Serial Data Stream (MSB first, starting on rising edge of phase clock)
Default: $FFFFFE
X:$C014 and X:$C034 control the ADC strobe signal for Servo IC machine interface channels 1 – 4 and
5 – 8, respectively. The 24-bit word set by these registers is shifted out serially on the ADC_STROB
lines, MSB first, one bit per ADC_CLK cycle starting on the rising edge of the phase clock.
In revisions “D” and newer of the DSPGATE1 Servo IC (beginning shipments in 2002), bit 0 (the LSB)
of X:$C014 and X:$C034 is a control bit that determines whether the Servo IC will expect “header”
information on the return data streams that precedes the numerical data from the ADCs. If bit 0 is 0, no
header information is expected, and the low output from this bit is held until the next rising edge of the
phase clock. This setting must be used on all earlier revisions of the DSPGATE1 Servo IC.
In revisions “D” and newer, if bit 0 of X:$C014 or X:$C034 is 1, up to 4 bits of header information can
be accepted on the returned serial data streams from the ADCs (as with the ADCs in Delta Tau’s Geo
power block amplifiers). These bits are “rolled over” and end up in bits 0 – 3 of the ADC register in the
Servo IC, and the numerical data ends up with its MSB in bit 23 of the ADC register. If fewer than 4
header bits are expected, the beginning of the strobe word should be delayed by setting the first bit(s) of
the register to 0. Specifically, if (4 – n) header bits are expected, the first n bits of the register should be
set to 0. In this setting, the ADC_STROB output is taken low and held low after bit 0 is shifted out.
The first bit that is a 1 creates a rising edge on the ADC_STROB output that is used typically as a start-
convert signal. Some A/D converters just need this rising edge for the conversion; others need the signal
to stay high all of the way through the conversion. Intermediate bits of the ADC_STROB output can be
used to transmit other information in some applications.
The default value of $FFFFFE is suitable for use with Delta Tau Quad Amps, most third-party direct-
PWM amplifiers, and with ACC-28B A/D converters. A value of $3FFFFF is usually appropriate for
Delta Tau GEO power-block amplifiers. Refer to the specific amplifier manual for details. A valve of
$1FFFFF should be used for the Option 12 serial ADCs on PMAC2a-PC/104.
$17FF
$1800
External
Static
User Buffer Storage Space RAM
(Battery
Backed)
$BBFF
$BC00 User-Written Servo Storage M-Variable Definitions
$BFFF
$C000
DSP-Gate
$C03F Registers
$D000
Dual-Ported
RAM
$DFFF
$E000
VME Setup Registers Mailbox Registers
VME bus
registers
$F000
I/O
Registers
$FFFF
Motor # 1 2 3 4 5 6 7 8
Hex [$0030] [$006C] [$00A8] [$00E4] [$0120] [$015C] [$0198] [$01D4]
Decimal 48 108 168 228 288 348 408 468
Motor # 1 2 3 4 5 6 7 8
Hex [$0040] [$007C] [$00B8] [$00F4] [$0130] [$016C] [$01A8] [$01E4]
Decimal 64 124 184 244 304 364 424 484
Motor # 1 2 3 4 5 6 7 8
Hex [$0030] [$006C] [$00A8] [$00E4] [$0120] [$015C] [$0198] [$01D4]
Decimal 48 108 168 228 288 348 408 468
Motor # 1 2 3 4 5 6 7 8
Hex [$0040] [$007C] [$00B8] [$00F4] [$0130] [$016C] [$01A8] [$01E4]
Decimal 64 124 184 244 304 364 424 484
Motor # 1 2 3 4 5 6 7 8
Hex [$0050] [$008C] [$00C8] [$0104] [$0140] [$017C] [$01B8] [$01F4]
Decimal 80 140 200 260 320 380 440 500
X:$0050 (80)
0-7 Phase offset (Ix72)
8-23 2nd phase bias (Ix79)
Y:$0050
0-7 # of commutation cycles per rev (Ix70)
8-23 Filter output/1st phase bias (Ix29)
X:$0051 (81) Magnetization current (Ix77)
Y:$0051 Previous phase position
X:$0052 (82) Slip frequency
Y:$0052 Counts per Ix70 commutation cycles (Ix71)
D:$0053 (83) Present phase position (X register units: counts*Ix70,
range -Ix71/2 - Ix71/2-1)
X:$0054 (84) Phase advance
Y:$0054 Phase advance gain (Ix76)
X:$0055 (85) Slip Gain (Ix78)
Y:$0055 Phased DAC amplitude
X:$0056 (86) Command output address (Ix02)
Y:$0056 Velocity Phase Advance Gain (Ix76)
X:$0057 (87) Servo command value
Y:$0057 Command internal offset
X:$0058 (88) Velocity node internal offset
$0059-$005B (Reserved for future use)
$005C-$0097 Motor #2 registers (as above) (92-151)
$0098-$00D3 Motor #3 registers (as above) (152-211)
$00D4-$010F Motor #4 registers (as above) (212-271)
$0110-$014B Motor #5 registers (as above) (272-331)
$014C-$0187 Motor #6 registers (as above) (332-391)
$0188-$01C3 Motor #7 registers (as above) (392-451)
$01C4-$01FF Motor #8 registers (as above) (452-511)
Motor # 1 2 3 4 5 6 7 8
Hex [$0030] [$006C] [$00A8] [$00E4] [$0120] [$015C] [$0198] [$01D4]
Decimal 48 108 168 228 288 348 408 468
Motor # 1 2 3 4 5 6 7 8
Hex [$0040] [$007C] [$00B8] [$00F4] [$0130] [$016C] [$01A8] [$01E4]
Decimal 64 124 184 244 304 364 424 484
Motor # 1 2 3 4 5 6 7 8
Hex [$0030] [$006C] [$00A8] [$00E4] [$0120] [$015C] [$0198] [$01D4]
Decimal 48 108 168 228 288 348 408 468
Motor # 1 2 3 4 5 6 7 8
Hex [$0040] [$007C] [$00B8] [$00F4] [$0130] [$016C] [$01A8] [$01E4]
Decimal 64 124 184 244 304 364 424 484
Motor # 1 2 3 4 5 6 7 8
Hex [$0050] [$008C] [$00C8] [$0104] [$0140] [$017C] [$01B8] [$01F4]
Decimal 80 140 200 260 320 380 440 500
Buffers
X:$0400-$04FF Commutation sine table [223*SIN((address- (1024-1279)
$400)*360°/256)]
X:$0600-$06FF Command character queue (512-767)
Y:$0600-$06FF Response character queue
X:$0700-$0701 User count-down timer registers (servo cycles) (1792-1793)
Y:$0700-$0701 User count-down timer registers (servo cycles)
X:$0708-$070F Auto-converted ACC-36 ADC registers 9-16 (1800-1807)
Y:$0708-$070F Auto-converted ACC-36 ADC registers 1-8
Mot/CS 1 2 3 4 5 6 7 8
Hex [$0810] [$08D0] [$0990] [$0A50] [$0B10] [$0BD0] [$0C90] [$0D50]
Decimal 2064 2256 2448 2640 2832 3024 3216 3408
2 Cutter compensation on
3 Cutter compensation left
4 PVT/SPLINE move mode
5 Segmented move stop request
6 Segmented move acceleration in progress
7 Segmented move in progress
8 Pre Jog move flag
9 Cutter compensation move buffered
10 Cutter compensation move stop request
11 Cutter compensation outside corner
12 Dwell move buffered
13 Synchronous M-variable one-shot
14 End-of-block (/) stop in progress
15 Delayed calculation flag
16 Rotary buffer full
17 In-position true (logical AND of motor bits)
18 Warning following error (logical OR of motor bits)
19 Fatal following error (logical OR of motor bits)
20 Amplifier fault error (logical OR of motor bits)
21 Circle radius error
22 Run time error
23 Program hold (\) in progress
X:$0818 (2072) Coordinate System 1 Status/Control Bits
(First word returned on ?? command. See Y:$0817 for first word.)
(Refer to ?? specification in On-Line Commands for detailed bit meanings.)
0 Program running
1 Single step mode
2 Continuous motion mode
3 Move-specified-by-time mode (not speed)
4 Continuous motion request
5 Radius vector incremental mode
6 A-axis incremental mode
7 A-axis used in feedrate calculations
8 B-axis incremental mode
9 B-axis used in feedrate calculations
10 C-axis incremental mode
11 C-axis used in feedrate calculations
12 U-axis incremental mode
13 U-axis used in feedrate calculations
14 V-axis incremental mode
15 V-axis used in feedrate calculations
16 W-axis incremental mode
17 W-axis used in feedrate calculations
18 X-axis incremental mode
19 X-axis used in feedrate calculations
20 Y-axis incremental mode
21 Y-axis used in feedrate calculations
22 Z-axis incremental mode
23 Z-axis used in feedrate calculations
Y:$0818 (2072) C.S. 1 Motor Definition word
The Motor Definition word is divided into 8 groups of 3 bits. Each bit group reports a motor’s
assignment as shown below.
Bits
0-2 Motor 1 assignment
3-5 Motor 2 assignment
6-8 Motor 3 assignment
9-11 Motor 4 assignment
12-14 Motor 5 assignment
15-17 Motor 6 assignment
18-20 Motor 7 assignment
21-23 Motor 8 assignment
Where the motor’s assignment is determined by the value of its bit group (3 bits can have a
value from 0 to 7).
Value
0 Not Assigned
1 Assigned to A-axis
2 Assigned to B-axis
3 Assigned to C-axis
4 Assigned to UVW-axes
5 Reserved
6 Reserved
7 Assigned to XYZ-axes
L:$0819 (2073) C.S. 1 A-Axis desired move position (f.p.)
L:$081A (2074) C.S. 1 B-Axis desired move position (f.p.)
L:$081B (2075) C.S. 1 C-Axis desired move position (f.p.)
L:$081C (2076) C.S. 1 U-Axis desired move position (f.p.)
L:$081D (2077) C.S. 1 V-Axis desired move position (f.p.)
L:$081E (2078) C.S. 1 W-Axis desired move position (f.p.)
L:$081F (2079) C.S. 1 X-Axis desired move position (f.p.)
Mot/CS 1 2 3 4 5 6 7 8
Hex [$0820] [$08E0] [$09A0] [$0A60] [$0B20] [$0BE0] [$0CA0] [$0D60]
Decimal 2080 2272 2462 2656 2848 3040 3232 3424
Mot/CS 1 2 3 4 5 6 7 8
Hex [$0830] [$08F0] [$09B0] [$0A70] [$0B30] [$0BF0] [$0CB0] [$0D70]
Decimal 2096 2288 2480 2672 2864 3056 3248 3440
Mot/CS 1 2 3 4 5 6 7 8
Hex [$0840] [$0900] [$09C0] [$0A80] [$0B40] [$0C00] [$0CC0] [$0D80]
Decimal 2112 2304 2496 2688 2880 3072 3264 3456
Mot/CS 1 2 3 4 5 6 7 8
Hex [$08B0] [$0970] [$0A30] [$0AF0] [$0BB0] [$0C70] [$0D30] [$0DF0]
Decimal 2224 2416 2608 2800 2992 3184 3376 3568
DAC # 2 4 6 8 10 12 14 16
Hex [$C002] [$C00A] [$C012] [$C01A] [$C022] [$C02A] [$C032] [$C03A]
Decimal 49154 49162 49170 49178 49186 49194 49202 49210
Y:$Cxxx DAC output value (high 16 bits)
ADC # 1 3 5 7 9 11 13 15
Hex [$C006] [$C00E] [$C016] [$C01E] [$C026] [$C02E] [$C036] [$C03E]
Decimal 49158 49166 49174 49182 49190 49198 49206 49214
Y:$Cxxx ADC input value (high 16 bits)
Enc # 1 2 3 4 5 6 7 8
Hex [$C002] [$C006] [$C00A] [$C00E] [$C012] [$C016] [$C01A] [$C01E]
Decimal 49154 49158 49162 49166 49170 49174 49178 49182
Enc # 9 10 11 12 13 14 15 16
Hex [$C022] [$C026] [$C02A] [$C02E] [$C032] [$C036] [$C03A] [$C03E]
Decimal 49186 49190 49194 49198 49202 49206 49210 49214
X:$Cxxx Encoder servo position (2*counts; LSB is direction)
DAC # 1 3 5 7 9 11 13 15
Hex [$C003] [$C00B] [$C013] [$C01B] [$C023] [$C02B] [$C033] [$C03B]
Decimal 49155 49163 49171 49179 49187 49195 49203 49211
Y:$Cxxx DAC output value (high 16 bits)
ADC # 2 4 6 8 10 12 14 16
Hex [$C007] [$C00F] [$C017] [$C01F] [$C027] [$C02F] [$C037] [$C03F]
Decimal 49159 49167 49175 49183 49191 49199 49207 49215
Y:$Cxxx ADC input value (high 16 bits)
Enc # 1 2 3 4 5 6 7 8
Hex [$C003] [$C007] [$C00B] [$C00F] [$C013] [$C017] [$C01B] [$C01F]
Decimal 49155 49159 49163 49167 49171 49175 49179 49183
Enc # 9 10 11 12 13 14 15 16
Hex [$C023] [$C027] [$C02B] [$C02F] [$C033] [$C037] [$C03B] [$C03F]
Decimal 49187 49191 49195 49199 49203 49207 49211 49215
X:$Cxxx Encoder Capture/Compare position (Capture register is read-only;
compare register is write-only.)
(When channel’s “count-write enable” control bit is set to 1,
values written to compare register are copied to active counter.)
Chan # 1 2 3 4 5 6 7 8
Hex [$C001] [$C009] [$C011] [$C019] [$C021] [$C029] [$C031] [$C039]
Decimal 49153 49161 49169 49177 49185 49193 49201 49209
Chan # 9 10 11 12 13 14 15 16
Hex [$C041] [$C049] [$C051] [$C059] [$C061] [$C069] [$C071] [$C079]
Decimal 49217 49225 49233 49241 49249 49257 49265 49273
Chan # 1 2 3 4 5 6 7 8
Hex [$C002] [$C00A] [$C012] [$C01A] [$C022] [$C02A] [$C032] [$C03A]
Decimal 49154 49162 49170 49178 49186 49194 49202 49210
Chan # 9 10 11 12 13 14 15 16
Hex [$C042] [$C04A] [$C052] [$C05A] [$C062] [$C06A] [$C072] [$C07A]
Decimal 49218 49226 49234 49242 49250 49258 49266 49274
Chan # 1 2 3 4 5 6 7 8
Hex [$C003] [$C00B] [$C013] [$C01B] [$C023] [$C02B] [$C033] [$C03B]
Decimal 49155 49163 49171 49179 49187 49195 49203 49211
Chan # 9 10 11 12 13 14 15 16
Hex [$C043] [$C04B] [$C053] [$C05B] [$C063] [$C06B] [$C073] [$C07B]
Decimal 49219 49227 49235 49243 49251 49259 49267 49275
Chan # 1 2 3 4 5 6 7 8
Hex [$C004] [$C00C] [$C014] [$C01C] [$C024] [$C02C] [$C034] [$C03C]
Decimal 49156 49164 49172 49180 49188 49196 49204 49212
Chan # 9 10 11 12 13 14 15 16
Hex [$C044] [$C04C] [$C054] [$C05C] [$C064] [$C06C] [$C074] [$C07C]
Decimal 49220 49228 49236 49244 49252 49260 49268 49276
Chan # 1 2 3 4 5 6 7 8
Hex [$C005] [$C00D] [$C015] [$C01D] [$C025] [$C02D] [$C035] [$C03D]
Decimal 49157 49165 49173 49181 49189 49197 49205 49213
Chan # 9 10 11 12 13 14 15 16
Hex [$C045] [$C04D] [$C055] [$C05D] [$C065] [$C06D] [$C075] [$C07D]
Decimal 49221 49229 49237 49245 49253 49261 49269 49277
Chan # 1 2 3 4 5 6 7 8
Hex [$C006] [$C00E] [$C016] [$C01E] [$C026] [$C02E] [$C036] [$C03E]
Decimal 49158 49166 49174 49182 49190 49198 49206 49214
Chan # 9 10 11 12 13 14 15 16
Hex [$C046] [$C04E] [$C056] [$C05E] [$C066] [$C06E] [$C076] [$C07E]
Decimal 49222 49230 49238 49246 49254 49262 49270 49278
only)
X:$Cxxx Channel n Encoder Compare Auto-increment value (24
bits, units of counts)
Chan # 1 2 3 4 5 6 7 8
Hex [$C007] [$C00F] [$C017] [$C01F] [$C027] [$C02F] [$C037] [$C03F]
Decimal 49159 49167 49175 49183 49191 49199 49207 49215
Chan # 9 10 11 12 13 14 15 16
Hex [$C047] [$C04F] [$C057] [$C05F] [$C067] [$C06F] [$C077] [$C07F]
Decimal 49223 49231 49239 49247 49255 49263 49271 49279
Chan # 1* 2*
Hex [$C090] [$C098]
Decimal 49296 49304
Chan # 1* 2*
Hex [$C091] [$C099]
Decimal 49297 49305
Chan # 1* 2*
Hex [$C092] [$C09A]
Decimal 49298 49306
Chan # 1* 2*
Hex [$C093] [$C09B]
Decimal 49299 49307
Chan # 1* 2*
Hex [$C094] [$C09C]
Decimal 49300 49308
Chan # 1* 2*
Hex [$C095] [$C09D]
Decimal 49301 49309
Chan # 1* 2*
Hex [$C096] [$C09E]
Decimal 49302 49310
Chan # 1* 2*
Hex [$C097] [$C09F]
Decimal 49303 49311
Motor # 1 2 3 4 5 6 7 8
Host Address 0x0050- 0x008C- 0x00C8- 0x0104- 0x0140- 0x017C- 0x01B8- 0x01F4-
0x0056 0x0092 0x00CE 0x010A 0x0146 0x0182 0x01BE 0x01FA
PMAC Addr. $D014- $D023- $D032- $D041- $D050- $D05F- $D06E- $D07D-
$D015 $D024 $D033 $D042 $D051 $D060 $D06F $D07E
Source Addr $002B $0067 $00A3 $00DF $011B $0157 $0193 $01CF
Motor Actual Position (64 bits; 1/(Ix08*32) counts)
Motor # 1 2 3 4 5 6 7 8
Host Address 0x0058- 0x0094- 0x00D0- 0x010C- 0x0148- 0x0184- 0x01C0- 0x01FC-
0x005E 0x009A 0x00D6 0x0112 0x014E 0x018A 0x01C6 0x0202
PMAC Addr. $D016- $D025- $D034- $D043- $D052- $D061- $D070- $D07F-
$D017 $D026 $D035 $D044 $D053 $D062 $D071 $D080
Source Addr. $002D $0069 $00A5 $00E1 $011D $0159 $0195 $01D1
Motor Master Position (64 bits; 1/(Ix07*32) counts of the master; 1/(Ix08*32) motor counts)
Motor # 1 2 3 4 5 6 7 8
Host Address 0x0060- 0x009C- 0x00D8- 0x0114- 0x0150- 0x018C- 0x01C8- 0x0204-
0x0066 0x00A2 0x00DE 0x011A 0x0156 0x0192 0x01CE 0x020A
PMAC Addr. $D018- $D027- $D036- $D045- $D054- $D063- $D072- $D081-
$D019 $D028 $D037 $D046 $D055 $D064 $D073 $D082
Source Addr. $0046 $0082 $00BE $00FA $0136 $0172 $01AE $01EA
Motor Compensation Position (64 bits; 1/(Ix08*32) counts)
Motor # 1 2 3 4 5 6 7 8
Host Address 0x0068- 0x00A4- 0x00E0- 0x011C- 0x0158- 0x0194- 0x01D0- 0x020C-
0x006A 0x00A6 0x00E2 0x011E 0x015A 0x0196 0x01D2 0x020E
PMAC Addr. $D01A $D029 $D038 $D047 $D056 $D065 $D074 $D083
Source Addr. X:$003A X:$0076 X:$00B2 X:$00EE X:$012A X:$0166 X:$01A2 X:$01DE
Motor Previous DAC (32 bits; 1/256 DAC bits)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x006C- 0x00A8- 0x00E4- 0x0120- 0x015C- 0x0198- 0x01D4- 0x0210-
0x006E 0x00AA 0x00E6 0x0122 0x015E 0x019A 0x01D6 0x0212
PMAC Addr. $D01B $D02A $D039 $D048 $D057 $D066 $D075 $D084
Source Addr. X:$003D X:$0079 X:$00B5 X:$00F1 X:$012D X:$0169 X:$01A5 X:$01E1
Motor Servo Status (32 bits; low 24 bits used) 1st word returned on ? command
Motor # 1 2 3 4 5 6 7 8
Host Address 0x0070 0x00AC- 0x00E8- 0x0124- 0x0160- 0x019C- 0x01D8- 0x0214-
0x0072 0x00AE 0x00EA 0x0126 0x0162 0x019E 0x01DA 0x0216
PMAC Addr. $D01C $D02B $D03A $D049 $D058 $D067 $D076 $D085
Source Addr. X:$0033 X:$006F X:$00AB X:$00E7 X:$0123 X:$015F X:$019B X:$01D7
Motor Actual Velocity (1/(Ix09*32) counts per servo cycle)
Motor # 1 2 3 4 5 6 7 8
Host Address 0x0074- 0x00B0- 0x00EC- 0x0128- 0x0164- 0x01A0- 0x01DC 0x0218-
0x0076 0x00B2 0x00EE 0x012A 0x0166 0x01A2 0x01DE 0x021A
PMAC Addr. $D01D $D02C $D03B $D04A $D059 $D068 $D077 $D086
Source Addr. X:$0020 X:$005C X:$0098 X:$00D4 X:$0110 X:$014C X:$0188 X:$01C4
Time Left in Move Segment (2*msec)
Motor # 1 2 3 4 5 6 7 8
Host Address 0x0078- 0x00B4- 0x00F0- 0x012C- 0x0168- 0x01A4- 0x01E0 0x021C-
0x007A 0x00B6 0x00F2 0x012E 0x016A 0x01A6 0x01E2 0x021E
PMAC Addr. $D01E $D02D $D03C $D04B $D05A $D069 $D078 $D087
Source Addr. X:$0029 X:$0065 X:$00A1 X:$00DD X:$0119 X:$0155 X:$0191 X:$01CD
Handwheel Pointer
Motor # 1 2 3 4 5 6 7 8
Host Address 0x007C- 0x00B8- 0x00F4- 0x0130- 0x016C- 0x01A8- 0x01E4- 0x0220-
0x0082 0x00BE 0x00FA 0x0136 0x0172 0x01AE 0x01EA 0x0226
PMAC Addr. $D01F- $D02E- $D03D- $D04C- $D05B- $D06A- $D079- $D088-
$D020 $D02F $D03E $D04D $D05C $D06B $D07A $D089
Spare Registers
Background Fixed Data Reporting Buffer
Global Registers for Background Fixed Data Buffer:
Address Description
0x0228 Buffer Status to Host and PMAC
(Y:$D08A) Bit 0: Data-Ready Flag
=1 means PMAC done updating buffer
=0 means host ready for another update from PMAC
Bits 1-15: (Reserved for future use)
0x022A PMAC Servo Timer: Updated at Data Ready Time (from X:$0000)
(X:$D08A)
0x022C,E Control Panel Hardware Port (from Y:$FFC0)
($D08B)
0x0230,2 Thumbwheel Hardware Port (from Y:$FFC1)
($D08C)
0x0234,6 Machine I/O (OPTO) Hardware Port (from Y:$FFC2)
($D08D)
0x0238-4A Spare Global Variable.
($D08E-92)
Motor/Coordinate System Specific Registers for Background Fixed Data
Buffer
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x024C- 0x02C8- 0x0344- 0x03C0- 0x043C- 0x04B8- 0x0534- 0x05B0-
0x0252 0x02CE 0x034A 0x03C6 0x0442 0x04BE 0x053A 0x05B6
PMAC Addr. $D093- $D0B2- $D0D1- $D0F0- $D10F- $D12E- $D14D- $D16C-
$D094 $D0B3 $D0D2 $D0F1 $D110 $D12F $D14E $D16D
Source Addr. $080B $08CB $098B $0A4B $0B0B $0BCB $0C8B $0D4B
Motor Target Position (64 bits; 1/(Ix08*32) counts)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0254- 0x02D0- 0x034C- 0x03C8- 0x0444- 0x04C0- 0x053C- 0x05B8-
0x025A 0x02D6 0x0352 0x03CE 0x044A 0x04C6 0x0542 0x05BE
PMAC Addr. $D095- $D0B4- $D0D3- $D0F2- $D111- $D130- $D14F- $D16E-
$D096 $D0B5 $D0D4 $D0F3 $D112 $D131 $D150 $D16F
Source Addr. $0813 $08D3 $0993 $0A53 $0B13 $0BD3 $0C93 $0D53
Motor Position Bias (64 bits; 1/(Ix08*32) counts)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x025C- 0x02D8- 0x0354- 0x03D0- 0x044C- 0x04C8- 0x0544- 0x05C0
0x025E 0x02DA 0x0356 0x03D2 0x044E 0x04CA 0x0546 0x05C2
PMAC Addr. $D097 $D0B6 $D0D5 $D0F4 $D113 $D132 $D151 $D170
Source Addr. Y:$0814 Y:$08D4 Y:$0994 Y:$0A54 Y:$0BD4
Y:$0B14 Y:$0C94 Y:$0D54
Motor Status Word (32 bits; low 24 bits used) 2nd word returned on ? command
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0260- 0x02DC- 0x0358- 0x03D4- 0x0450- 0x04CC- 0x0548- 0x05C4-
0x0266 0x02E2 0x035E 0x03DA 0x0456 0x04D2 0x054E 0x05CA
PMAC Addr. $D098- $D0B7- $D0D6- $D0F5- $D114- $D133- $D152- $D171-
$D099 $D0B8 $D0D7 $D0F6 $D115 $D134 $D153 $D172
Source Addr $0818 $08D8 $0998 $0A58 $0B18 $0BD8 $0C98 $0D58
Coordinate System Status/Definition Word (low 32 bits contains Motor Definition Word; high 32
bits contain 1st word returned on ?? command)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0268- 0x02E4- 0x0360- 0x03DC- 0x0458- 0x04D4- 0x0550- 0x05CC-
0x026E 0x02EA 0x0366 0x03E2 0x045E 0x04DA 0x0556 0x05D2
PMAC Addr. $D09A- $D0B9- $D0D8- $D0F7- $D116- $D135- $D154- $D173-
$D09B $D0BA $D0D9 $D0F8 $D117 $D136 $D155 $D174
Source A $0876 $0936 $09F6 $0AB6 $0B76 $0C36 $0CF6 $0DB6
Source B $0896 $0956 $0A16 $0AD6 $0B96 $0C56 $0D16 $0DD6
Source C $0819 $08D9 $0999 $0A59 $0B19 $0BD9 $0C99 $0D59
Coordinate System A-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0270- 0x02EC- 0x0368- 0x03E4- 0x0460- 0x04DC- 0x0558- 0x05D4-
0x0276 0x02F2 0x036E 0x03EA 0x0466 0x04E2 0x055E 0x05DA
PMAC Addr. $D09C- $D0BB- $D0DA- $D0F9- $D118- $D137- $D156- $D175-
$D09D $D0BC $D0DB $D0FA $D119 $D138 $D157 $D176
Source A $0877 $0937 $09F7 $0AB7 $0B77 $0C37 $0CF7 $0DB7
Source B $0897 $0957 $0A17 $0AD7 $0B97 $0C57 $0D17 $0DD7
Source C $081A $08DA $099A $0A5A $0B1A $0BDA $0C9A $0D5A
Coordinate System B-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0278- 0x02F4- 0x0370- 0x03EC- 0x0468- 0x04E4- 0x0560- 0x05DC-
0x027E 0x02FA 0x0376 0x03F2 0x046E 0x04EA 0x0566 0x05E2
PMAC Addr. $D09E- $D0BD- $D0DC- $D0FB- $D11A- $D139- $D158- $D177-
$D09F $D0BE $D0DD $D0FC $D11B $D13A $D159 $D178
Source A $0878 $0938 $09F8 $0AB8 $0B78 $0C38 $0CF8 $0DB8
Source B $0898 $0958 $0A18 $0AD8 $0B98 $0C58 $0D18 $0DD8
Source C $081B $08DB $099B $0A5B $0B1B $0BDB $0C9B $0D5B
Coordinate System C-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0280- 0x02FC- 0x0378- 0x03F4- 0x0470- 0x04EC- 0x0568- 0x05E4-
0x0286 0x0302 0x037E 0x03FA 0x0476 0x04F2 0x056E 0x05EA
PMAC Addr. $D0A0- $D0BF- $D0DE- $D0FD- $D11C- $D13B- $D15A- $D179-
$D0A1 $D0C0 $D0DF $D0FE $D11D $D13C $D15B $D17A
Source A $0879 $0939 $09F9 $0AB9 $0B79 $0C39 $0CF9 $0DB9
Source B $0899 $0959 $0A19 $0AD9 $0B99 $0C59 $0D19 $0DD9
Source C $081C $08DC $099C $0A5C $0B1C $0BDC $0C9C $0D5C
Coordinate System U-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0288- 0x0304- 0x0380- 0x03FC- 0x0478- 0x04F4- 0x0570- 0x05EC-
0x028E 0x030A 0x0386 0x0402 0x047E 0x04FA 0x0576 0x05F2
PMAC Addr. $D0A2- $D0C1- $D0E0- $D0FF- $D11E- $D13D- $D15C- $D17B-
$D0A3 $D0C2 $D0E1 $D100 $D11F $D13E $D15D $D17C
Source A $087A $093A $09FA $0ABA $0B7A $0C3A $0CFA $0DBA
Source B $089A $095A $0A1A $0ADA $0B9A $0C5A $0D1A $0DDA
Source C $081D $08DD $099D $0A5D $0B1D $0BDD $0C9D $0D5D
Coordinate System V-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0290- 0x030C- 0x0388- 0x0404- 0x0480- 0x04FC- 0x0578- 0x05F4-
0x0296 0x0312 0x038E 0x040A 0x0486 0x0502 0x057E 0x05FA
PMAC Addr. $D0A4- $D0C3- $D0E2- $D101- $D120- $D13F- $D15E- $D17D-
$D0A5 $D0C4 $D0E3 $D102 $D121 $D140 $D15F $D17E
Source A $087B $093B $09FB $0ABB $0B7B $0C3B $0CFB $0DBB
Source B $089B $095B $0A1B $0ADB $0B9B $0C5B $0D1B $0DDB
Source C $081E $08DE $099E $0A5E $0B1E $0BDE $0C9E $0D5E
Coordinate System W-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x0298- 0x0314- 0x0390- 0x040C- 0x0488- 0x0504- 0x0580- 0x05FC-
0x029E 0x031A 0x0396 0x0412 0x048E 0x050A 0x0586 0x0602
PMAC Addr. $D0A6- $D0C5- $D0E4- $D103- $D122- $D141- $D160- $D17F-
$D0A7 $D0C6 $D0E5 $D104 $D123 $D142 $D161 $D180
Source A $087C $093C $09FC $0ABC $0B7C $0C3C $0CFC $0DBC
Source B $089C $095C $0A1C $0ADC $0B9C $0C5C $0D1C $0DDC
Source C $081F $08DF $099F $0A5F $0B1F $0BDF $0C9F $0D5F
Coordinate System X-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02A0- 0x031C- 0x0398- 0x0414- 0x0490- 0x050C- 0x0588- 0x0604-
0x02A6 0x0322 0x039E 0x041A 0x0496 0x0512 0x058E 0x060A
PMAC Addr. $D0A8- $D0C7- $D0E6- $D105- $D124- $D143- $D162- $D181-
$D0A9 $D0C8 $D0E7 $D106 $D125 $D144 $D163 $D182
Source A $087D $093D $09FD $0ABD $0B7D $0C3D $0CFD $0DBD
Source B $089D $095D $0A1D $0ADD $0B9D $0C5D $0D1D $0DDD
Source C $0820 $08E0 $09A0 $0A60 $0B20 $0BE0 $0CA0 $0D60
Coordinate System Y-Axis Target Position (User Units) ( * Note 1 )
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02A8- 0x0324- 0x03A0- 0x041C- 0x0498- 0x0514- 0x0590- 0x060C-
0x02AE 0x032A 0x03A6 0x0422 0x049E 0x051A 0x0596 0x0612
PMAC Addr. $D0AA- $D0C9- $D0E8- $D107- $D126- $D145- $D164- $D183-
$D0AB $D0CA $D0E9 $D108 $D127 $D146 $D165 $D184
Source A $087E $093E $09FE $0ABE $0B7E $0C3E $0CFE $0DBE
Source B $089E $095E $0A1E $0ADE $0B9E $0C5E $0D1E $0DDE
Source C $0821 $08E1 $09A1 $0A61 $0B21 $0BE1 $0CA1 $0D61
Coordinate System Z-Axis Target Position (User Units) ( * Note 1 )
Note 1:
The following is the logic used in the PMAC to determine which variable will be
put in this slot. It is controlled by bits of the coordinate system program execution
status word (PSTATUS):
If (PSTATUS.7 == 1 && PSTATUS.5 == 0)
Use Source A
Else
......If (PSTATUS.9 == 1)
...... Use Source B
......Else
...... Use Source C
......Endif
Endif
PSTATUS.7 is the Segmented move flag ( I13 != 0 ).
PSTATUS.5 is the Segmented move stop flag.
PSTATUS.9 is the Tool Compensation flag.
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02B0- 0x032C- 0x03A8- 0x0424- 0x04A0- 0x051C- 0x0598- 0x0614-
0x02B2 0x032E 0x03AA 0x0426 0x04A2 0x051E 0x059A 0x0616
PMAC Addr. $D0AC $D0CB $D0EA $D109 $D128 $D147 $D166 $D185
Source Addr. Y:$0817 Y:$08D7 Y:$0997 Y:$0A57 Y:$0BD7
Y:$0B17 Y:$0C97 Y:$0D57
Coordinate System Program Execution Status (32 bits; low 24 bits used) (Second word returned
on ?? command)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02B4- 0x0330- 0x03AC- 0x0428- 0x04A4- 0x0520- 0x059C- 0x0618-
0x02B6 0x0332 0x03AE 0x042A 0x04A6 0x0522 0x059E 0x061A
PMAC Addr. $D0AD $D0CC $D0EB $D10A $D129 $D148 $D167 $D186
Source Addr. Y:$08AE Y:$096E Y:$0A2E Y$0AEE Y$0BAE Y:$0C6E Y:$0D2E Y$0DEE
Coordinate System Program Lines Remaining (32 bits) (Same value as PR command returns)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02B8- 0x0334- 0x03B0- 0x042C- 0x04A8- 0x0524- 0x05A0- 0x061C-
0x02BA 0x0336 0x03B2 0x042E 0x04AA 0x0526 0x05A2 0x061E
PMAC Addr. $D0AE $D0CD $D0EC $D10B $D12A $D149 $D168 $D187
Source Addr. X:$0020 X:$005C X:$0098 X:$00D4 X:$0110 X:$014C X:$0188 X:$01C4
Coordinate System Time Remaining in move when I13 > 0 (2*msec)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02BC- 0x0338- 0x03B4- 0x0430- 0x04AC- 0x0528- 0x05A4- 0x0620-
0x02BE 0x033A 0x03B6 0x0432 0x04AE 0x052A 0x05A6 0x0622
PMAC Addr. $D0AF $D0CE $D0ED $D10C $D12B $D14A $D169 $D188
Coordinate System Time Remaining in accel/decel when I13 > 0 (2*msec)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02C0- 0x033C- 0x03B8- 0x0434- 0x04B0- 0x052C- 0x05A8- 0x0624-
0x02C2 0x033E 0x03BA 0x0436 0x04B2 0x052E 0x05AA 0x0626
PMAC Addr. $D0B0 $D0CF $D0EE $D10D $D12C $D14B $D16A $D189
Coordinate System Program Execution Address Offset (Same value as PE command returns)
Motor/C.S. # 1 2 3 4 5 6 7 8
Host Address 0x02C4- 0x0340 0x03BC- 0x0438- 0x04B4- 0x0530- 0x05AC- 0x0628-
0x02C6 0x0342 0x03BE 0x043A 0x04B6 0x0532 0x05AE 0x062A
PMAC Addr. $D0B1 $D0D0 $D0EF $D10E $D12D $D14C $D16B $D18A
Source Addr. Y:$082A Y:$08EA Y$09AA Y$0A6A Y$0B2A Y$0BEA Y$0CAA Y$0D6
Buffer. # 1 2 3 4 5 6 7 8
Host Address 0x07E2 0x07F6 0x0802 0x080E 0x081A 0x0826 0x0832 0x083E
PMAC Addr. X:$D1F7 X:$D1FD X:$D200 X:$D203 X:$D206 X:$D209 X:$D20C X:$D20F
(Y:$FFE5)
6 Reserved Control (do not use)
7 Reserved Control (do not use)
Note:
* All the I/O lines marked with an asterisk in the above table are used by PMAC’s
firmware for special functions. These lines should not be used for general-purpose
I/O.
PMAC2 Option 12/12A Analog-to-Digital Converters
Y:$FFC0 Option 12 Analog-to-Digital Converters (low 12 bits)
Write operation: channel select (Channels 0-7) and
mode; Read operation: converted value of selected
channel.
Option 12A Analog-to-Digital Converters (high 12 bits)
Write operation: channel select (Channels 8-15) and
mode; Read operation: converted value of selected
channel.
PMAC(1)-PCI, PMAC(1)-PCI Lite Option 12/12A Analog-to-Digital
Converters
Y:$FFC8 Option 12 Analog-to-Digital Converters (low 12 bits)
Write operation: channel select (Channels 0-7) and
mode; Read operation: converted value of selected
channel.
Option 12A Analog-to-Digital Converters (high 12 bits)
Write operation: channel select (Channels 8-15) and
mode; Read operation: converted value of selected
channel.
Expansion Port (JEXP) I/O
Y:$FFD0 (65488) 1st Accessory-14 Port A
Y:$FFD1 (65489) 1st Accessory-14 Port B
Y:$FFD2 (65490) 1st Accessory-14 Multimodule
Y:$FFD3 (65491) 1st Accessory-14 Control Word
Y:$FFD8 (65496) 2nd Accessory-14 Port A
Y:$FFD9 (65497) 2nd Accessory-14 Port B
Y:$FFDA (65498) 2nd Accessory-14 Multimodule
Y:$FFDB (65499) 2nd Accessory-14 Control Word
Y:$FFE0 (65504) 3rd Accessory-14 Port A
Y:$FFE1 (65505) 3rd Accessory-14 Port B
Y:$FFE2 (65506) 3rd Accessory-14 Multimodule
Y:$FFE3 (65507) 3rd Accessory-14 Control Word
Y:$FFE8 (65512) 4th Accessory-14 Port A
Y:$FFE9 (65513) 4th Accessory-14 Port B
Y:$FFEA (65514) 4th Accessory-14 Multimodule
Y:$FFEB (65515) 4th Accessory-14 Control Word
Y:$FFF0 (65520) 5th Accessory-14 Port A
Y:$FFF1 (65521) 5th Accessory-14 Port B
Y:$FFF2 (65522) 5th Accessory-14 Multimodule
Y:$FFF3 (65523) 5th Accessory-14 Control Word
Y:$FFF8 (65528) 6th Accessory-14 Port A
M923->Y:$FFD0,23,1 ; MI/O23
M924->Y:$FFD1,0,1 ; MI/O24
M925->Y:$FFD1,1,1 ; MI/O25
M926->Y:$FFD1,2,1 ; MI/O26
M927->Y:$FFD1,3,1 ; MI/O27
M928->Y:$FFD1,4,1 ; MI/O28
M929->Y:$FFD1,5,1 ; MI/O29
M930->Y:$FFD1,6,1 ; MI/O30
M931->Y:$FFD1,7,1 ; MI/O31
M932->Y:$FFD1,8,1 ; MI/O32
M933->Y:$FFD1,9,1 ; MI/O33
M934->Y:$FFD1,10,1 ; MI/O34
M935->Y:$FFD1,11,1 ; MI/O35
M936->Y:$FFD1,12,1 ; MI/O36
M937->Y:$FFD1,13,1 ; MI/O37
M938->Y:$FFD1,14,1 ; MI/O38
M939->Y:$FFD1,15,1 ; MI/O39
M940->Y:$FFD1,16,1 ; MI/O40
M941->Y:$FFD1,17,1 ; MI/O41
M942->Y:$FFD1,18,1 ; MI/O42
M943->Y:$FFD1,19,1 ; MI/O43
M944->Y:$FFD1,20,1 ; MI/O44
M945->Y:$FFD1,21,1 ; MI/O45
M946->Y:$FFD1,22,1 ; MI/O46
M947->Y:$FFD1,23,1 ; MI/O47
M913->Y:$FFD0,13,1 ; MI/O13
M914->Y:$FFD0,14,1 ; MI/O14
M915->Y:$FFD0,15,1 ; MI/O15
M916->Y:$FFD0,16,1 ; MI/O16
M917->Y:$FFD0,17,1 ; MI/O17
M918->Y:$FFD0,18,1 ; MI/O18
M919->Y:$FFD0,19,1 ; MI/O19
M920->Y:$FFD0,20,1 ; MI/O20
M921->Y:$FFD0,21,1 ; MI/O21
M922->Y:$FFD0,22,1 ; MI/O22
M923->Y:$FFD0,23,1 ; MI/O23
M924->Y:$FFD1,0,1 ; MI/O24
M925->Y:$FFD1,1,1 ; MI/O25
M926->Y:$FFD1,2,1 ; MI/O26
M927->Y:$FFD1,3,1 ; MI/O27
M928->Y:$FFD1,4,1 ; MI/O28
M929->Y:$FFD1,5,1 ; MI/O29
M930->Y:$FFD1,6,1 ; MI/O30
M931->Y:$FFD1,7,1 ; MI/O31
M932->Y:$FFD1,8,1 ; MI/O32
M933->Y:$FFD1,9,1 ; MI/O33
M934->Y:$FFD1,10,1 ; MI/O34
M935->Y:$FFD1,11,1 ; MI/O35
M936->Y:$FFD1,12,1 ; MI/O36
M937->Y:$FFD1,13,1 ; MI/O37
M938->Y:$FFD1,14,1 ; MI/O38
M939->Y:$FFD1,15,1 ; MI/O39
M940->Y:$FFD1,16,1 ; MI/O40
M941->Y:$FFD1,17,1 ; MI/O41
M942->Y:$FFD1,18,1 ; MI/O42
M943->Y:$FFD1,19,1 ; MI/O43
M944->Y:$FFD1,20,1 ; MI/O44
M945->Y:$FFD1,21,1 ; MI/O45
M946->Y:$FFD1,22,1 ; MI/O46
M947->Y:$FFD1,23,1 ; MI/O47
; JANA Analog Input Port M-Variables
M990->X:$0708,0,24,U ; 1st CONFIG_W1 and CONFIG_W2
M991->X:$0709,0,24,U ; 2nd CONFIG_W1 and CONFIG_W2
M992->X:$070A,0,24,U ; 3rd CONFIG_W1 and CONFIG_W2
M993->X:$070B,0,24,U ; 4th CONFIG_W1 and CONFIG_W2
M994->X:$070C,0,24,U ; 5th CONFIG_W1 and CONFIG_W2
M995->X:$070D,0,24,U ; 6th CONFIG_W1 and CONFIG_W2
M996->X:$070E,0,24,U ; 7th CONFIG_W1 and CONFIG_W2
M997->X:$070F,0,24,U ; 8th CONFIG_W1 and CONFIG_W2
M1000->Y:$0708,0,12,{f} ; ANAI00 image register; from J1 pin 1
M1001->Y:$0709,0,12,{f} ; ANAI01 image register; from J1 pin 2
M1002->Y:$070A,0,12,{f} ; ANAI02 image register; from J1 pin 3
11. Ix63 -- Range extended; negative values permit integrated following error fault.
12. Ix80 -- Range extended to support “stepper” power-on phasing search.
13. Ix81 -- Range extended to support hall-effect phase read.
14. Ix83 -- Range extended: bit 19=1 specifies Y-register feedback.
15. I1000 -- MACRO node auxiliary register enable.
16. I1001 -- MACRO Ring Check Time Period.
17. TWS-format M-variables -- Extended to add parity bits in backward-compatible format; bit 6 of
global status word X:$0003 is set to 1 if the most recent TWS read or write operation resulted in a
parity error.
Conversion Table Entries
1. $2C, $3C, $6C, $7C -- parallel feedback shifted right 3 bits (meant for feedback appearing in high
16 bits); supports rollover.
2. $18, $58 -- unsigned 16-bit A/D feedback, no rollover of source; to support ACC-28B.
On-Line Commands
1. DEFINE BLCOMP -- Establishes backlash table for addressed motor.
2. DEFINE TCOMP -- Establishes torque compensation table for addressed Motor.
3. DELETE BLCOMP -- Erases backlash table for addressed motor.
4. DELETE TCOMP -- Erases torque compensation table for addressed motor.
5. J=* -- Variable jog-to-position; destination in L:$082B, etc. (V1.15E).
6. J:* -- Variable incremental jog; distance in L:$082B, etc. (V1.15E).
7. J^* -- Variable incremental jog, distance in L:$082B, etc. (V1.15E).
8. J=={constant} -- Jog to specified position, make that “pre-jog” position.
9. {jog command}^{constant} -- Jog until trigger, final value specifies distance from trigger
position to stop.
10. LEARN -- Reads present commanded positions for all motors in coordinate system, converts to axis
positions, adds axis commands to open motion program.
11. MFLUSH -- Clears synchronous M-variable stack without executing.
12. LIST LDS -- PMAC reports addresses of special compiled PLC ladder-logic routines for cross-
compiler (special firmware required).
13. TYPE -- PMAC reports hardware and software configuration.
Motion Program Commands
1. {axis}{data}^{data} -- Move-until-trigger for RAPID mode moves.
2. SPLINE2 -- Puts program in non-uniform B-spline mode.
3. G, M, T, D codes -- Extended to support range of 0-999.99999; formerly 0-99.99999.
4. PRELUDE1{command} -- Adds {command} before subsequent move commands.
5. PRELUDE0 -- turns off prelude function.
DPRAM Structures
Second binary rotary program download buffer added (V1.15G).
Refinements
1. Full circle moves always executed after starting position recalculated due to PMATCH or axis matrix
transformation (more tolerance between start and end positions permitted; see Changes, above).
2. DISPLAY of I-variables fixed.
3. Fast versions of PMAC can interface to ACC-8D Opt 9.
4. Fast versions of PMAC can interface to NC control panel and ACC-34C.
5. O-commands now saturate at +/-100% of Ix69.
6. I52 default set to 37137 for default 1 second stop on ‘\’ program hold command.
7. I11 default set to 0 so move sequences start as soon as calculations are finished.
8. Ix77, Ix86 reported as signed values.
9. RAPID declaration alone on a motion program line no longer causes zero-distance move taking 2*TA
time.
10. Ix10 absolute servo-position read copies axis definition offset into position bias register.
11. Maximum commanded speed increased by factor of 3 to 768M/Ix08 cts/sec (8M cts/sec at default Ix08
value).
12. Cutter comp lead-in move destination, lead-out move origin, changed slightly.
13. Ix30 now can take negative values, permitting output polarity reversal.
14. (PMAC2) ADC1A,B to ADC8A,B registers in DSPGATE1 copied into RAM registers $0710 - $0717
one pair per phase cycle for reliable servo & program access.
15. $$$*** command kills all motors before re-initialization.
10. Corrected rotary program buffer operation so that rollover of buffer does not count as “jump back” for
purposes of “double jump back” blending stop.
11. Corrected intermittent background MACRO Type 1 data read problem.
12. Improved efficiency of background MACRO Type 0 data read/write.
13. Corrected intermittent problem in resolver absolute read.
14. Corrected intermittent problem in MACRO Yaskawa absolute encoder read.
15. Corrected power-on loop closing (Ix80=1) problem on MACRO systems.
16. Corrected PRELUDE operation when full program line is subroutine call.
17. Changed default I-variables on Ultralite PMAC2s so default setup is for MACRO system.
18. PMAC2 I9n6 default value set to 0 so PWM outputs are the default -- for protection of direct PWM
amplifiers.
19. Corrected I2T operation for PMAC(1) and non-commutated PMAC2 systems.
Update Summary: From V1.16C to V1.16D (Nov 1997)
1. Added geared resolver power-up position thru MACRO in Ix10 (=$73xxxx).
2. Fixed timing of VME DPRAM ASCII interrupt; held off until last interrupt acknowledged
3. Fixed binary rotary buffer transfer for high-speed host computers
4. Added run-time error codes in X:$0799: 1=insufficient calculation time; 2=program counter before start
of program; 3=program counter past end of program; 4=unlinked conditional; 5=subroutine stack
overflow; 6=label not found
5. Added parallel power-up position thru MACRO in Ix10 (=$74xxxx).
6. Added Yaskawa abs. enc. power-up phase position thru MACRO in Ix81 (=$72xxxx)
7. Added resolver power-up phase position thru MACRO in Ix81 (=$73xxxx)
8. Added parallel data power-up phase position thru MACRO in Ix81 (=$74xxxx).
9. Repeated clearing on software reset of general-purpose outputs on PMAC(1)
10. Fixed sign extension of Ix10 read 24-bit parallel feedback when negative
11. Added Sanyo absolute encoder power-up position in Ix10 (=$32xxxx).
12. Delayed testing for amp fault after enable thru MACRO (flags transferred every 2 cycles).
13. Computed post-trigger axis target positions on move-until trigger.
14. Permitted MACRO Station I-variables to be called “MIx”, MACRO Station commands to be called
“MCx” to better distinguish from PMAC variables.
15. Standardized Mini-PMAC(1) firmware
16. Added ‘$’ to hex data returned from MACRO Station if I9=2 or 3, in reporting to host
17. Added more time to get power-up phase position from MACRO Station
18. Fixed direct microstepping operation on PMAC2.
19. Cleared MACRO output registers on reset to support new DSPGATE2B IC.
20. Fixed SIZE command response with buffer open
21. DELETE GATHER does not clear DPRAM gather pointers unless DPRAM gathering set
22. GATHER clears DPRAM gather index if DPRAM gathering set.
23. Made only Card 0 addressed at power-up/reset in daisychain mode (problem from V1.16A).
24. I51=1 does not automatically clear motor torque offsets each servo cycle.
25. If vector distance of feedrate axes in a feedrate-specified move is 0, the programmed feedrate is used to
control the speed of the non-feedrate axes in the move. The axis with the longest distance is moved at
the programmed feedrate; other axes move with the same move time.
26. When in feed hold mode and no program running (also no motor jogging), a Run or Step command now
starts program in addition to clearing from feed hold mode.
27. Implemented Ix98 maximum feedrate value; F commands in program compared to this value; if greater
than Ix98, Ix98 is used instead.
28. Fixed operation of synchronous M-variable assignments when move times or acceleration times smaller
than I13 time.
29. Added I64 variable; when set to 1, PMAC leads unsolicited responses (from program SEND or CMD
statements) with <CTRL-B>. To support this feature from compiled PLCs, PCOMM32 version 2.21 or
newer (March 1999 or later) is required.
30. When I58 is set to 1 to enable DPRAM ASCII communications, PMAC no longer forces values for I3,
I4, and I6. DPRAM formatting unchanged, except that if I6=2 when I58=1, PMAC no longer reports
errors into DPRAM for illegal internal commands.
31. Run-time error always triggers abort, regardless of setting of Ix97.
32. Implemented variable full-circle threshold value with I90 to permit user to define minimum arc length.
33. Cutter compensation refinements:
- If cutter compensation is active and PMAC cannot find the next move in the compensation plane,
PMAC no longer removes the compensation at the end of the move; instead it ends the move at the
proper point to start an outside corner.
– If cutter compensation direction is changed with compensation active, offset to new direction occurs
at move boundary, not over the course of the next move (unless there is no intersection of compensated
paths, in which case the change still occurs over the next move).
– 180o reversal with arc(s) now treated as inside corner, not outside corner
– DELAY move timing while in compensation corrected.
34. PRELUDE operation refined so that <CR> always starts new subroutine call.
35. READ operation now stops on repeated character.
Update Summary: From V1.17 to V1.17A (Jan 2002, FLEX CPU only)
1. New variable I66 permits disabling of autocopy of servo-channel ADC registers to RAM each phase
cycle. This autocopying is no longer necessary for robust background reads of these registers, so
disabling saves time and permits proper interface of ACC-51P interpolator ADCs.
2. Permitted PMAC to accept comments after M-variable definition statements without returning an error.
Update Summary: From V1.17A to V1.17B (Sep 2002, FLEX CPU only)
1. Corrected interrupt-blocking for Flex CPUs, fixing problem in transition between LINEAR and SPLINE
modes
2. Refined timing on JTHW multiplexer port for use of ACC-34 boards with fastest Flex CPUs.
3. Added purge of host port during power-up/reset to ensure serial port comes up as the default response
port.
4. On Ultralite boards with Flex CPUs, force any additional (unused) MACRO CPUs to input clock signals
to prevent possible contention if these are installed.
5. Improved power-on dual-ported RAM detection test for new interface buses.
Update Summary: From V1.17B to V1.17C (Sept. 2005, FLEX CPU only)
1. Added support for new controller configurations Mini-PMAC-PCI and Geo PMAC integrated amplifier.
2. (Lookahead firmware only) Corrected problem in jogging motors during stop in lookahead where
motors could be de-activated.
3. Corrected minimum move size for rotary axis with Ix27 < 0.
4. Corrected position following function with Ix08 <0.
5. Corrected high-resolution interpolation (conversion method $F) with PMAC2-style ASIC.
6. Corrected handling of comment after M-variable definition on USB port.
7. Corrected auto-detection of SST-type flash IC.
8. Corrected data corruption problems on interrupt.
9. Corrected power-on DPRAM detection problem.
10. Made timing for I/O ports on PMAC(1) more robust with 160 MHz CPU (Opt 5EF).
11. Corrected operation of program homing search move after move-until-trigger that did not find trigger.
12. Embedded checksum into firmware file, so $$$*** command is not required after firmware download
to establish proper checksum match.
13. Added “do-nothing” variable I65 to give user easy way to confirm if application configuration has been
downloaded and saved, and/or to serialize controllers.
14. Assigned “hardware 1/T enable” control bit to new I-variable I9n9 for Channel n (PMAC2 only).
15. Assigned “third-channel demux enable” control bit to new second bit (bit 1) of existing I-variable I9n5
for Channel n (PMAC2 only).
16. Assigned ADC data table setup in X:$0708 – X:$070F to new I-variables I70 – I77, respectively.
17. Added support for byte-wide parallel data reads to support ACC-14P boards in encoder conversion table
methods $2 and $3.
18. Modified action of “MaxChange” filter in conversion table methods $3 and $7. If MaxChange is
exceeded, result is now changed by “LastChange”, not “MaxChange”, if previous cycle’s result was
good.
19. Added I-variables I1010 – I1012 to support resolver excitation (Geo PMAC only).
20. Added I-variable I1013 to support motor temperature check (Geo PMAC only).
21. Added I-variables I1015 – I1019 to support SSI absolute encoder interface (Geo PMAC only).
22. Added five-line tracking-filter variant of exponential-filter conversion method ($D) enabled by setting
bit 19 of first setup line to 1, permitting low-pass filter without steady-state error – suitable for
processing feedback data.
23. Added resolver conversion method ($E) to encoder conversion table (Geo PMAC only).
24. Added three-line interpolated sinusoidal encoder conversion method ($F) with sine/cosine bias word
(Geo PMAC only – this method is a two line entry without a bias word on other PMACs).
25. Added five-line diagnostic method entry for highly interpolated sinusoidal encoders ($F) enabled by
setting bit 19 of first setup line to 1, to calculate sum-of-squares magnitude or sine/cosine bias word
(Geo PMAC only).
26. Added amplifier status/fault code for seven-segment display (Geo PMAC only), including
CLEARFAULT command to reset display.
27. Added support for hardware position capture with highly interpolated sinusoidal encoders and capture of
estimated sub-count position data in triggered moves with bits 18 and 19 of Ix03.
28. Removed obsolete LIST LDS, <CTRL-E> and <CTRL-W> on-line commands and I47 variable.
29. Corrected action of true deadband (Ix64=-16) with pulse-and-direction output to eliminate potential for
dithering.