onEndOfTransfer - event of the PmaCommMsg object
Description:
The event is triggered after the transfer of the whole message with any result. It can be used, for example, to find out if the message has been successfully transferred.
Parameters:
pMe | (Object) Reference to the PmaCommMsg object where the event rises. |
pEvent | (Object) Reference to an object describing detailed information about the specific event.
pEvent.Error - ( Long) [ for reading] The message transfer success value.
0 - Transmission passed successfully
4 - Transmission proceeded without errors but less data were received than expected
5 - Transmission proceeded without errors but more data were received than expected
24 - Timeout from the input (sufficient number of characters wasn't accepted)
62 - Negative confirmation
65 - Wrong transmitted data (e.g. the wrong configuration of the communication card)
66 - Wrong received data (e.g. the check sum error)
67 - It is not possible to create the connection with the server (Ethernet) or the port is not ready for communication (serial link). |
---|
Example:
the following script in this event reads the received value from the communication and then saves it into the variable in the
PmaData object.
JavaScriptVBScriptSelect and copy to clipboard
var val = pMe.ReadVars(0).Value;
pMe.Pm("/Boiler1/Data/#vars/Temperature").Value = 100 + 10 * val;
Dim val
val = pMe.ReadVars(0).Value
pMe.Pm("/Boiler1/Data/#vars/Temperature").Value = 100 + 10 * val