onEndOfTransfer - event of the PmaCommMsg object
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.
|pMe||(Object) Reference to the PmaCommMsg object where the event rises.|
|pEvent||(Object) Reference to object describing detailed information about the specific event.
) [for reading
] Success rate of the message transfer.
- 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
- Timeout from the input (sufficient number of characters wasn't accepted)
- Negative acknowledement
- Wrong transmitted data (e.g. the wrong configuration of the communication card)
- Wrong received data (e.g. the check sum error)
- Not possible to create the connection with the server (Ethernet) or the port is not ready for communication (serial link).
the following script in this event reads the received value from the communication and then saves it into the variable in the PmaData
var val = pMe.ReadVars(0).Value;
pMe.Pm("/Boiler1/Data/#vars/Temperature").Value = 100 + 10 * val;