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.| pEvent.Error
) Success rate of the message transfer.
- The transfer passed successfully
4 - transfer proceeded without errors but less data were received than expected
5 - transfer proceeded without errors but more data were received than expected
- timeout from the input (sufficient number of characters wasn't accepted)
33 - Software error
62 - negative acknowledement
65 - 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;