I need subscribe to OPC UA Server ca. 3000 variables in cycle.
The Server allows max. 2000 items per one subscription.
When I use code in my program, see bellow, the Server returns only 2000 items on they change.
When I run my program twice (two instancies at the same time), the Server returns 2x2000 items (2000 in each program).
I need create two instancies of subscription for the server, but by another way than in the code below, probably.
Any idea?
procedure TForm1.SubscribeDataChange;
begin
ClientA := TEasyUAClient.Create(nil);
ClientEventHandlers1 := TClientEventHandlers.Create;
ClientA.OnDataChangeNotification := ClientEventHandlers1.OnDataChangeNotification;
ClientB := TEasyUAClient.Create(nil);
ClientEventHandlers2 := TClientEventHandlers.Create;
ClientB.OnDataChangeNotification := ClientEventHandlers2.OnDataChangeNotification;
ClientC := TEasyUAClient.Create(nil);
ClientEventHandlers3 := TClientEventHandlers.Create;
ClientC.OnDataChangeNotification := ClientEventHandlers3.OnDataChangeNotification;
ClientD := TEasyUAClient.Create(nil);
ClientEventHandlers4 := TClientEventHandlers.Create;
ClientD.OnDataChangeNotification := ClientEventHandlers4.OnDataChangeNotification;
Try
while (.....) do
begin
if (iRowNr1 <= 1000) then
begin
ClientA.SubscribeDataChange(...);
end
else if (iRowNr1 <= 2000) then
begin
ClientB.SubscribeDataChange(...);
end
else if (iRowNr1 <= 3000) then
begin
ClientC.SubscribeDataChange(...);
end
else if (iRowNr1 <= 4000) then
begin
ClientD.SubscribeDataChange(...);
end;
iRowNr1:= iRowNr1 + 1;
end;
Except
End;
end;
Thank you
BR
Olin