Reference Manual

PMAC 2 Software Reference
268 PMAC On-Line Command Specification
Example
MS0,MI910=7 ; Causes slave to set value of Node 0 variable MI910 to 7
MS1,MI997=6528 ; Causes slave to set value global variable MI997 to 6528
MS8,C2=0 ; Causes slave at node 8 to reset
MACROSLVREAD
Function
Read (copy) Type 1 MACRO auxiliary parameter value
Scope
Global
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.
If this command is issued to the PMAC while a PLC buffer is open, it will be stored in the
buffer as a PLC command, not executed as an on-line command.
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.
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
Scope
Global
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;