The best way to publish LabVIEW data to an OPC server is to use shared variables. Using OPC Quick Client is the most up to date method for this procedure. Steps can be found in Using the LabVIEW Network-Published Shared Variable and OPC with NI-DAQmx
If you have NI software that predates OPC Quick Client, you can use Server Explorer to verify that your data is getting published to the OPC server.
- In your LabVIEW project, create a double type shared variable called Variable1.
- Right-click the library and select Deploy All.
- Open Server Explorer (Start>>Programs>>National Instruments>>ServerExplorer).
- Expand My Computer, right-click Variable Engine and select Connect to Server...
- Click Connect at the Connect to Server dialog
- Right-click Variable Engine and select Add/Edit Groups...
- When the Add Groups dialog pops up, click the Add button then click OK, as shown in the following image. This will create the group Gr1, as seen in the following image.
- Right-click the group Gr1 under the Variable Engine, and then select Add/Edit Items...
- When the Add/Edit Items dialog appears, you will see the name of your shared variable library on the left (Untitled Library 1 in this case).
- Highlight Untitled Library 1 and you will see the names of all the variables in this library in the center pane, as seen in the following image.
- Highlight Variable 1, click Add, then click OK.
- You are now monitoring the value of the shared variable through the OPC Server. If the variable shows a value of ??? as shown in the following figure, you may not have written a value to the shared variable yet.
The shared variable engine contains an OPC server that hosts any currently deployed shared variables for other applications with an OPC client to access.