我每秒都在轮询 OPCDA 服务器以获取数据。我使用来自 OPC Foundation 的标准 .NET DLL 来实现这一点。
我的服务与 OPCDA 服务器位于同一台服务器上。但是,我的阅读时间通常在 900-1000 毫秒左右。这是正常的还是我的代码或服务器设置有问题?我调查了大约 20 个 OPCDA 标签。这种操作的“标准”响应时间是多少,或者说不可能?
我每秒都在轮询 OPCDA 服务器以获取数据。我使用来自 OPC Foundation 的标准 .NET DLL 来实现这一点。
我的服务与 OPCDA 服务器位于同一台服务器上。但是,我的阅读时间通常在 900-1000 毫秒左右。这是正常的还是我的代码或服务器设置有问题?我调查了大约 20 个 OPCDA 标签。这种操作的“标准”响应时间是多少,或者说不可能?
这听起来不太正常,但如果不知道数据的来源是什么,就无法肯定地说。
Check documentation of OPC DA interface you use to fetch data from the server and what parameters you pass to it.
If you use synchronous reads then problem definitely on server side or its backend (meaning that it takes too much time for server to read actual data).
If you use asynchronous reads (subscriptions) check parameter named like 'update rate'. It defines how often new data will be sent to client. E.g. if it is 1 second client will receive new data NOT faster than 1 second.
Subscriptions are supported by all OPC DA versions. If server doesn't implement this interface you will not be able to read asynchronously and will get error code like 'not implemented'.
您使用的是什么 OPC 服务器?可能存在保持更新速率固定或尊重客户端更新速率的设置。