Reference Manual
PMAC 2 Software Reference
334 PMAC Program Command Specification
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 (2
18
-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.