Writing OPC DA variables to 800xA is slow
we are using the OPC DA Surrogate Process to write recipe data to the AC800M Controller through an 800xA application server. We noticed that writing OPC DA values through the OPC DA Surrogate Process can be very slow. For 20 variables (Int and Real) this can take up to 7 seconds. Are there any ways to tweak this? So we can write OPC DA variables on a quicker way? Or can the bottleneck be the OPC Client we are using?
Voted best answer
I have tested to simultaneously write to ten (10) AC 800M integers (dint) added to the same OPC group via the AfwOpcDaServer and the AdvDsOPCClient tool of 800xA.
Synchronous write = 200-600 ms
Asynchronous write = ~100 ms
This was with AuditEvent_OperatorAction enabled and from a non-admin user account of System 800xA.
The extreme longer times you experience is probably due to the OPC client's modus operandi, maybe creating a unique OPC group per item, write, removing the group and starting from scratch with the next item. OPC can be very slow if the client is not properly implemented.
DAServer vs DASurrogate
The DASurrogate is just slightly slower than the DAServer, hardly measurable at this low count of items. The reason the surrogate can be a bit slower (in larger configurations) is the added overhead and marshalling when speaking with an OPC server running out-of-process. The DAServer runs in-process, with the OPC server as a DLL. Only the DASurrogate may be remotely connected thru DCOM.
Speed & security
The fastest write is without audit and from a user member of the Administrators group of the 800xA system (that bypasses object/property permission checks).
Audit and object locking can also be bypassed by the DASurrogate using a registry key:
This is more favorable than elevating the user account set to run the DASurrogate. For obvious reasons, any application connecting to the OPC DA framework should run with the lowest possible permission level.
Do *NOT* use the 800xA Service Account, it bypasses audit and security!!
For example it makes significant difference whether SyncWrite is called separately for each single OPC item or AsyncWrite is called just once with an array of OPC items to be written.
If you can install your OPC client in Connectivity server, try to connect directly to AC800M OPC server.