![ni opc server proface ni opc server proface](https://www.pro-face.com/otasuke/download/update/server_ex/opc/images/p_01.jpg)
A VI is used to create a user interface and executable graphical code. This creates a new virtual instrument or VI.
![ni opc server proface ni opc server proface](https://pbs.twimg.com/profile_images/1311102627044704257/SPt20UG9_400x400.png)
You now have access to PLC data natively in LabVIEW through the shared variables. This publishes the shared variables, making them available on the network to other computers, OPC clients, and the LabVIEW Real-Time PAC. Deploy the shared variables by right-clicking the OPCItems library and selecting Deploy.Save the new library as OPCItems.lvlib in the project explorer window by right-clicking the library and selecting Save As.Note: The LabVIEW DSC Module enhances shared variables by adding the ability to log data, alarms, and events directly to a database without ever writing a LabVIEW application. In the Multiple Variable Editor, select Done. This adds the new shared variables to the library that was created earlier.Select all the sine items and click Add and OK. This creates shared variables that are bound to the PLCs’ OPC tags and loads them into the Multiple Variable Editor.
![ni opc server proface ni opc server proface](https://www.proface.com/sites/default/files/slider/TOP_Slider_Pro-face_0329_0.jpg)
Select OPC Tags to Bind to Shared Variables In the Create Bound Variables window, select the OPC tags to bind the shared variables to by browsing down to the simulated sine data from the OPC server as shown in Figure 5.įigure 5.Right-click the newly created library and select Create Bound Variables….This creates a new library for the shared variables, which are used to connect to the PLCs’ OPC tags. In the LabVIEW Project window, right-click My Computer and select New»Library.Create new shared variables that are bound to the PLCs’ OPC tags.With the shared variable, you can share data across LabVIEW applications on a single computer or across the network. In this section, create shared variables, which are bound to the OPC tags, giving you native access in LabVIEW to PLC data. Save the project as OPCDemoProject and the library as OPCDemoLibrary by selecting File»Save All from the project explorer window.Ĭreate Shared Variables that Connect to the OPC Tags through the I/O Server.Select OK. A library is automatically created in your project explorer window to manage the I/O Server.Notice that all the Sine tags populate in the right-most window and are updating with simulated sine data as shown in Figure 2.įigure 4.Under the National 5 folder and select Simulation Examples.Funtions.In NI OPC Servers 2012, launch the Quick Client by selecting Tools>Launch OPC Quick Client, which you can use to view the OPC tag data.The tags populate in the right-most window. These tags, which are bound to registers on the PLCs, can be read by LabVIEW. View the Sine tags by expanding Simulation Examples and selecting Functions.NI OPC Servers 2012 Displaying Simulated PLCs Note: If this simulation project is not already loaded in NI OPC Servers 2012, select File»Open… and browse to C:\Program Files\National Instruments\Shared\NI OPC Servers\V5\Projects\simdemo.opf. The project should look like Figure 1.įigure 1. This project simulates PLCs that have already been created and configured in NI OPC Servers 2012. NI OPC Servers 2012 should launch with a PLC simulation project already loaded.With NI OPC Servers 2012, you can create, configure, and view tags that are associated with your PLCs. Launch NI OPC Servers 2012 by selecting Start✺ll Programs»National Instruments»NI OPC Servers 2012»NI OPC Servers Configuration.The steps in this section are written for NI OPC Servers 2012, but similar steps can be used for previous versions of NI OPC Servers. View Existing PLC Tags with NI OPC Servers 2012