Run - method of object PmCommMsg

Command for transferring the message (only for Master messages).
Run([bPriority As Boolean]) As Boolean
oMsg.Run bPriority
bPriority[optional] (Boolean) flag how to fit it in the message queue
false (default) - the object is placed at the end of the queue
true - the object is placed at the beginning of the queue, it means that other waiting messages are skipped
Return Values:
true - The message transmission has been initiated successfully, the message has been included into the queue of unfinished transmissions of another PmCommMsg objects. As the queue passes the message will be transferred followed by the onEndOfTransfer event when the transfer is finished.
false - The message transmission has not been initiated. The onEndOfTransfer event will not be fired. The reason can be incorrect message configuration or very commonly the reason is that in this PmCommMsg object the transmission from previous Run method calling still continues.
This method is not necessarily called in the script, if the AutoRun transfer enabled configurator is set (if the AutoRunEnabled property is set).
The method must be called only for the Master message, for the Slave message it is called automatically. (Master/Slave setting - see the configurator "Message type").

The Run method only activates the message transfer. After termination of the Run method it is never assured that the data have already been transferred. The Run method only causes that the PmCommMsg object is "placed" in the queue of messages that have to be just transferred.

The PmCommMsg object waits in the queue until its turn (this functionality is the internal PROMOTIC property and the designer doesn't need to care about it). Then he starts to transmit its data and waits for the requested received data, reads the data and the whole process is finished by the call of the onEndOfTransfer event. The Run method doesn't wait for these actions any more.

The PmCommMsg object can find itself in two states - the state when the transfer doesn't proceed and the state when the transfer proceeds (i.e. state between calling the Run method and the onEndOfTransfer event). The Run method can be called only over the object in the state when the transfer in this object doesn't proceed. This state can be found out by the GetReady method.

This method can even be called from the INFO system by clicking the "Actions" button. See permission PmRoot > Permissions > InfoEdit.
See also:
If oMsg.GetReady() Then
End If
PROMOTIC 8.3.23 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice