Delta Tau GEO BRICK LV Reference Manual

Page of 760
Turbo PMAC/PMAC2 Software Reference
 
Turbo PMAC Program Command Specification 
 411 
This statement permits the user to mathematically determine which motor will be addressed.  The value of 
the floating-point P-variable is rounded to the nearest integer, and if this integer value is out of the range 1 
– 32, the remainder of the number when divided by 32 is used.  For example, if the P-variable had a value 
of 34.3, Motor 2 would be addressed (remainder of 34/32 is 2). 
This statement does not affect subsequent COMMAND statements in this PLC that explicitly address a 
motor.  It does not affect COMMAND statements in any other PLC program.  It does not affect any motor-
specific commands from a host computer issued over any of the communications ports 
Examples: 
P4=12 
; Set value of P4 to 12 
ADDRESS#P4 
; Address Motor 12 
COMMAND “J+” 
; Jog addressed motor (#12) in positive direction 
COMMAND “#11J-” 
; Jog motor 11 in negative direction 
COMMAND “J/” 
; Stop jogging addressed motor (#12 still).  Routine to home all odd-numbered motors 
P100=1 
WHILE (P100<32)
 
; Loop thru motors 
    ADDRESS#P100 
; Address motor using P100 value 
    COMMAND “HM” 
; Start homing addressed motor 
    P100=P100+2 
; Increment to next odd-numbered motor 
ENDWHILE 
ADDRESS&P{constant} 
Function: 
Select program’s addressed coordinate system 
Type: 
PLC programs 1 to 31 only 
Syntax: 
ADDRESS&P{constant} 
 
ADR&P{constant} 
where: 
 
{constant} is an integer from 0 to 8191 representing the P-variable number whose value 
determines the coordinate to be addressed 
This statement, when executed, selects the coordinate system that will be addressed by this particular PLC 
program when it issues coordinate-system-specific commands with subsequent COMMAND statements and 
Q-variable assignments.  The statement specifies the number of a P-variable whose value determines 
which coordinate system is addressed.  For example, if variable P4 had a value of 12, the statement 
ADDRESS&P4, when executed, would select Motor 12. 
This statement permits the user to mathematically determine which coordinate system will be addressed.  
The value of the floating-point P-variable is rounded to the nearest integer, and if this integer value is out of 
the range 1 – 16, the remainder of the number when divided by 16 is used.  For example, if the P-variable 
had a value of 19.2, Motor 3 would be addressed (remainder of 19/16 is 3). 
This statement does not affect subsequent COMMAND statements in this PLC that explicitly address a 
coordinate system.  It does not affect COMMAND statements in any other PLC program.  It does not affect 
any coordinate-system-specific commands from a host computer issued over any of the communications 
ports. 
Examples: 
P9=11 
; Set value of P9 to 11 
ADDRESS&P9 
; Address C.S. 11 
COMMAND “R” 
; Run program in addressed C.S. 
COMMAND “&2S” 
; Single-step program in C.S. 2 
Q10=3 
; Set value of Q10 in addressed C.S. (&11 still!)