Sunteți pe pagina 1din 1

Lab 20 - Using ActiveEvent

Modify the Mixer Template


For $Mixer the Trigger Script in the Declarations section, write the following s
cript (step #10):
dim HistEvent as AAHACTIVEEVENTLib.aahEventClass; 'Instance of the ActiveEvent C
ontrol
Select Startup for Execution Type.
Add the following to the scripts area (step #12):
HistEvent = new AAHACTIVEEVENTLib.aahEventClass;
HistEvent.InitializeEx( "localhost" ); 'Connects to Wonderware Historian
HistEvent.AddEventTag( "ExternalEvent" ); 'Registers Event Tag
For the Execution Type script, add the following to the scripts area (step #16):
If HistEvent.IsConnected() then
HistEvent.InvokeEventEx( "ExternalEvent" );
Endif;
Me.Trigger = false;

S-ar putea să vă placă și