Reference Manual
PMAC 2 Software Reference
PMAC Program Command Specification 347
Note:
If there is no host on the port to which the message is sent, or the host is
not ready to read the message, the message is left in the queue. If several
messages back up in the queue this way, the program issuing the
messages will halt execution until the messages are read. This is a
common mistake when the SEND command is used outside of an Edge-
Triggered condition in a PLC program. See Writing A PLC Program in
Chapter 3 for more details.
On the serial port, it is possible to send messages to a non-existent host
by disabling the port handshaking with I1=1.
SEND transmits over the active communications response port, whether serial, parallel
host port (PC-Bus or STD-Bus), VME-Bus port, or ASCII DPRAM buffer.
SENDS always transmits over the serial port regardless of which port is the current active
response port.
SENDP always transmits over the parallel host port (PC-Bus or STD-Bus), regardless of
which port is the current active response port.
There is no SENDV command for the VME bus exclusively. The SEND command must
be used with the VME port as the active response port.
When PMAC powers up or resets, the active response port is the serial port. When any
command is received over a bus port, the active response port becomes the bus port.
PMAC must then receive a <CONTROL-Z> command to cause the response port to
revert back to the serial port.
Note:
If a program, particularly a PLC, sends messages immediately on power-
up/reset, it can confuse a host-computer program (such as the PMAC
Executive Program) that is trying to “find” PMAC by querying it and
looking for a particular response.
It is possible, particularly in PLC programs, to order the sending of messages faster than
the port can handle them. Usually this will happen if the same SEND command is
executed through every scan in the PLC. For this reason, it is good practice to have at
least one of the conditions that causes the SEND command to execute to be set false
immediately to prevent execution of this SEND command on subsequent scans of the
PLC.
Note:
To cause PMAC to send the value of a variable, use the COMMAND
statement instead, specifying the name of the variable in quotes (e.g.
CMD”P1”)
Example
SEND"Motion Program Started"
SENDS"DONE"
SENDP"Spindle Command Given"
IF (M188=1) ; C.S.1 Warning Following Error Bit set?
IF (P188=0) ; But not set last scan? (P188 follows M188)
SEND"Excessive Following Error" ; Notify operator