LabVIEW DSC Module OPC Client Performance Considerations

Updated Dec 20, 2023

Reported In


  • OPC Servers
  • LabVIEW
  • LabVIEW Datalogging and Supervisory Control Module

Issue Details

How fast is the LabVIEW DSC Module OPC Client I/O Server? What is the most efficient way to configure an OPC connection from LabVIEW DSC to an OPC server?


Overview of OPC Technology:

OPC is a lossy industrial communications protocol based on Microsoft DCOM technology and formalized by the OPC specification.  Using LabVIEW DSC, you can use the OPC client I/O server (an OPC DA 2.x and 3.0 client) to interface shared variables with a third party OPC DA 2.x or 3.0 server.

How does a DSC OPC Client I/O Server receive updates from an OPC Server:

The DSC Module OPC client I/O server receives updates from an OPC server using a hybrid polling and exception based method defined in the OPC DA specification.  The update rate that you configure in the OPC client I/O server properties dialog box defines the maximum rate at which the OPC client will receive updates from the OPC server. 

For example, if you configure an update rate of 200 ms, then the OPC client will receive updates from the OPC server no faster than 200 ms.  If any OPC data items have updated in the OPC server during the 200 ms interval, those updates will be combined together in a single message and sent to the OPC client (in this case, the DSC OPC client I/O server). 

If no OPC data items have changed in the OPC server, then no updates will be sent to the OPC client until there is at least one update.  If a data item in the OPC server changes faster than the update rate specified by the client, then the most recent value will be sent to the OPC client on the next update cycle.

Improving DSC OPC Client I/O Server Performance by Categorizing Shared Variables by Update Rate:

In most applications you can categorize I/O items into different groups based on the update rate priority for each item.  To obtain maximum performance when connecting to an OPC server, you should limit the number of I/O items you read at a fast update rate.  This is simple to do in LabVIEW DSC by creating multiple OPC client I/O servers pointing to the same OPC server but with different update rates.

Consider the following situation:
You have an OPC server with 5000 data items. 1000 items are critical and need a fast update rate of up to 100 ms.  The other 4000 data items are not as critical and a 1000 ms update rate is sufficient.

The solution when using LabVIEW DSC is to create two OPC client I/O server instances pointing to the same OPC server.  In a LabVIEW project, create a library then configure two OPC client I/O servers, one named OPC 100 ms and another named OPC 1000 ms. Configure each I/O server to point to the same OPC server, but specify the two respective update rates.  

Use the Multiple Variable Editor to create the set of shared variables bound to the OPC client I/O server with the 100 ms update rate, then repeat the process for the set of shared variables bound to the OPC client I/O server with the 1000 ms update rate.

Even if the OPC data items in the 1000 ms group (internally to the OPC server) update faster than 1000 ms, updates will only be sent to the LabVIEW shared variables (via the OPC client I/O server) at a maximum of 1000 ms.  Data items in the 100 ms group will be sent at a maximum of 100 ms. This limits the load on the system and will provide better overall performance. 

If you need to connect to a large number of OPC data items at high speed, consider deploying a simple DSC Module application on a stand-alone PC that reads the OPC items.  You could remotely access the data using shared variables bound to the shared variables on this dedicated PC from another DSC Module application running on the network.

Overall Maximum Update Rate Performance:

Overall performance will depend greatly on system configuration and the OPC server you're connecting to.  In tests using the National Instruments Shared Variable Engine OPC server connected to the DSC Module OPC client I/O server, National Instruments engineers have achieved stable maintained updates at a rate of approximately 6500 updates per second with logging and alarming enabled.