E
echo76
Guest
-> Hier kostenlos registrieren
Hello,
i am trying to write OPC Client in c#. I get connected to the server but when I try to add a OPCGroup i get always exeption error: Value does not fall within expected range. I have already tried to add existing group and also empty group but without any result. Has someone of You ever experienced such a problem? Any ideas how to solve it? Thanks in advance
Michal
System:
KepserverEX.V5.6
Windows XP sp3
Visual studio 2010 Express
i am trying to write OPC Client in c#. I get connected to the server but when I try to add a OPCGroup i get always exeption error: Value does not fall within expected range. I have already tried to add existing group and also empty group but without any result. Has someone of You ever experienced such a problem? Any ideas how to solve it? Thanks in advance
Michal
Code:
try
{
ConnectedOPCServer = new OPCAutomation.OPCServer();
ConnectedOPCServer.Connect(textBox1.Text,"");
ConnectedOPCServer.OPCGroups.DefaultGroupIsActive = true;
ConnectedOPCServer.OPCGroups.DefaultGroupDeadband = 1000;
ConnectedGroup = ConnectedOPCServer.OPCGroups.Add();
ConnectedGroup.UpdateRate = 500;
ConnectedGroup.IsSubscribed = true;
}
catch (Exception ex)
{
...
}
System:
KepserverEX.V5.6
Windows XP sp3
Visual studio 2010 Express