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