Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Program Command Specification 449
See Also:
How Turbo PMAC Executes a Motion Program, Synchronous Variable Assignment (Writing and
Executing Motion Programs)
Program Commands M{data}=, M{data}==, M{data}&=, M{data}|=
MACROAUXREAD
Function: Read (copy) variable value from Turbo PMAC MACRO slave
Type: Uncompiled PLC 1 31 only
Syntax: MACROAUXREAD{node #},M{slave var},{variable}
MXR{node #},M{slave var},{variable}
where:
{node #} is a constant in the range 0 to 63 representing the number of the node on the Turbo
PMAC matching the slave node to be accessed, where the node number specification is:
o {node #} = 0 15 specifies MACRO IC 0 nodes 0 15, which correspond to slave
nodes 0 15 of the same master number as MACRO IC 0;
o {node #} = 16 31 specifies MACRO IC 1 nodes 0 15, which correspond to slave
nodes 0 15 of the same master number as MACRO IC 1;
o {node #} = 32 47 specifies MACRO IC 2 nodes 0 15, which correspond to slave
nodes 0 15 of the same master number as MACRO IC 2;
o {node #} = 48 63 specifies MACRO IC 3 nodes 0 15, which correspond to slave
nodes 0 15 of the same master number as MACRO IC 3;
{slave var} is the name of the variable of the Turbo PMAC acting as a MACRO slave to this
Turbo PMAC. It can be an I, P, Q, or M-variable with a number from 0 to 8191.
{variable} is the name of the variable on this Turbo PMAC. . It can be an I, P, Q, or M-
variable with a number from 0 to 4095.
This command causes Turbo PMAC to copy the value of the specified variable of the Turbo PMAC
acting as a MACRO slave station matching the specified node number on the Turbo PMAC to the
specified variable on this Turbo PMAC.
If the slave node returns an error message or the slave node does not respond within the number of servo
cycles set by I78, Turbo PMAC will report ERR008. Bit 5 of global status register X:$000006 is set to
report such a MACRO auxiliary communications error. Register X:$00320E 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.
When Turbo PMAC executes this command in a PLC, it ends the present scan of that PLC. Execution of
the PLC resumes on the next line of the PLC in the next scan.
If this command is issued to a Turbo PMAC when no buffer is open, it will be executed as an on-line
command.
Examples:
MXR0,MP8191,P10 ; Copy slave P8191 into P10 here
MXR1,MM162,P4095 ; Copy slave MM161 into P4095 here