Consultor Eletrônico



Kbase P156523: Can't see events in AppBuilder for opcGroups and opcGroup objects in SLIK DAC OPC control
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   07/12/2009
Status: Unverified

SYMPTOM(s):

Can't see events in AppBuilder for opcGroups and opcGroup objects in SLIK DAC OPC control

Problems receiving events from Northern Dynamic's OPC Data control

FACT(s) (Environment):

Events are all visible in COM Object Viewer
opcGroups and opcGroup objects are defined in VB code using WithEvents option
Manually defining event procedures in ABL doesn't work
Windows
Progress 9.x
OpenEdge 10.x

CAUSE:

This is expected behavior. The opcGroups and opcGroup objects are not available to the ABL until a connection to an opcServer is established. Once that's done the events can be enabled.

FIX:

- Define an internal procedure for the event starting with opcGroups or opcGroup respectively followed by .<eventname>
- After connecting to an opcServer, get the handle to the appropriate object; i.e. opcGroups or opcGroup and use the ENABLE-EVENTS method passing the object name as a character parameter:

eg.
objOPCGroups = ctrlFrame:opcServer:opcGroups.
objOPCGroups:ENABLE-EVENTS("opcGroups").
objOPCGroup = opcGroups:Add(....
objOPCGroup:ENABLE-EVENTS("opcGroup").