Quantcast
Channel: OPC Labs - OPC Labs - Recent Topics - OPC Labs Online Forums
Viewing all articles
Browse latest Browse all 1794

Subscription - by: alr1976

$
0
0
Hi!

I have some difficult to subscribe alarm and event with Kepware 6 in delphi.
I have created 1 event but it seem that i can't subscribe it.

const
UAObjectIds_Server = 'nsu=KEPServerEX;ns=2;s=FLOWSERVE.FLOWSERVE.Modbus_List_Overall.MOTOR RUNNING.HI';
var
Client: TEasyUAClient;
ClientEventHandlers: TClientEventHandlers18;
EndpointDescriptor: string;
begin
EndpointDescriptor := 'opc.tcp://127.0.0.1:49320';

// Instantiate the client object and hook events
Client := TEasyUAClient.Create(nil);
ClientEventHandlers := TClientEventHandlers18.Create;
Client.OnEventNotification := ClientEventHandlers.Client_EventNotification;

WriteLn('Subscribing...');
Client.SubscribeEvent(EndpointDescriptor, UAObjectIds_Server, 1000);

WriteLn('Processing event notifications for 30 seconds...');
PumpSleep(30*1000);

WriteLn('Unsubscribing...');
Client.UnsubscribeAllMonitoredItems;

WriteLn('Waiting for 5 seconds...');
Sleep(5*1000);

WriteLn('Finished.');
FreeAndNil(Client);
FreeAndNil(ClientEventHandlers);

but i got BadMonitoredItemFilterUnsupported.

i have attached my simple alarm and event(You can import it in Kepware alarm&event)

Br,Alessandro

File Attachment:

File Name: Area1.csv
File Size: 1 KB

Viewing all articles
Browse latest Browse all 1794

Trending Articles