Reference Manual

PMAC 2 Software Reference
264 PMAC On-Line Command Specification
2000 ; PMAC reports value
See Also
On-line commands MACROAUXREAD, MACROAUXWRITE
PLC Program commands MACROAUXREAD, MACROAUXWRITE
MACROAUXREAD
Function
Read MACRO auxiliary parameter value
Scope
Global
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 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
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, MACROAUXWRITE
PLC Program commands MACROAUXREAD, MACROAUXWRITE