Promotic
WikipediaLinkedInYoutubeTwitterFacebook

onBeginOfTransfer - event of object PmCommMsg

Description:
The event fires always before transmitting the Master message. It is called right after the Run method. The Run method can be called in the script or automatically if the AutoRunEnabled property is enabled.
Parameters:
pMe(Object) Reference to the Promotic object where the event rises.
pEvent(Object) A referrence to object describing detailed information about the specific event.

The pEvent parameter is not used here because this event does not need any additional information.

Note:
The event is called only for Master messages (i.e. if the Message type configurator is set to Master). In this event, it is possible for example to fill the transmitted data on the Data-sent page.
Example:
The transmitted data will be filled with 3 variables from the PmData type object in the boiler room.
Dim oData
Set oData = pMe.Pm("/BoilerPlant/Data")
pMe.WriteVars.Item("Temperature") = oData.Item("Temperature1)
pMe.WriteVars.Item("Power") = oData.Item("Power1)
pMe.WriteVars.Item("Pressure") = oData.Item("Pressure1)
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice