EVENTREGISTER and EVENTSEND
Two PL/B statements have been modified to support programs running as a PL/B Automation Server components. These are EVENTREGISTER and EVENTSEND.
|
|
|
|
|
|
|
|
|
|
The EVENTREGISTER statement allows the keyword of *CLIENT in the {object} parameter. When this keyword is specified, the event is expected to arrive by the client programs use of the EventSend method of the PLB Automation Server program object. The EVENTREGISTERs ARG1 to ARG10 parameters receive the EventSend method’s arg1 to arg10 parameters.
For example, if the server program executed the line:
|
|
|
|
And the client program executed the line:
|
|
|
|
The MyRtn label will be called at an EVENTCHECK or EVENTWAIT instruction and the Dim20 variable will contain the string "Hi".
The {event} parameter of the EVENTREGISTER statement can be any value but it has to match the value passed in the EventSend method.
The EVENTSEND statement allows the keyword of *CLIENT in the {object} parameter. When this keyword is used, the event is sent to the client program that is receiving the events for the PLB Automation Server program object. The {event} parameter must be from 1 to 10 to match the UserEvent1 to UserEvent10 defined for the PLB Automation Server program object. The optional parameters ARG1 to ARG5 pass any data with the event.
For example if the client program executed the line:
|
|
|
|
And the server program executed the line:
|
|
|
|
The MyRtn label will be called at an EVENTCHECK or EVENTWAIT instruction and the Dim20 variable will contain the string "Hi".
See Also: Automation
![]() |