LabVIEW uses the NI Variable Engine OPC interface to display all numeric, Boolean, and string shared variables that you deploy to the SVE. The SVE functions as an OPC 2.x and OPC 3.0 compatible server. This communication is done by one of our Facebook Fan page Vijaysinh Rahevar and we are very thankful to him. The DSC Module also can function as an OPC server and as a data source for the NI Publish-Subscribe Protocol networking protocol. You can write a simple ON-OFF program for PLC. Now after making all the setting you can test your PLC and LabView, below is the video of same. We can also write using the specific URL directly like this: In order to write data to an OPC Item it must have the Write property set. You can use DataSocket Write in order to write data to a specific Item in the OPC server. We can also read by using URL directly like below. Use DataSocket Read in order to get data from a specific Item in the OPC server as below.
This VI opens a data connection we specify in the input URL as below. If you know URL in advance, then you can directly use that URL with DATASOCKET OPEN VI. Here in following we use 4 OPC Server and channel name is a device name is b and tag name is t0. OPC has some standard URL format which looks like opc://machine_name/server_name/item_name. Now lets start with communicating PLC and LabView through Kepware OPC server. LabView and PLC communication through OPC Server In this tutorial we are using Kepware OPC server for communication.īelow is the picture of DataSocket palette in LabView which shows you different buttons for performing different task as explained below.ĭataSocket Display URL: Displays a dialog box for the user to select a data source and returns the URL to that data.ĭataSocket Open: Opens a data connection you specify in URL.ĭataSocket Read: De queues the next available data value from the client-side buffer associated with the connection you specify in connection in and returns the data.ĭataSocket Write: Writes data to the connection you specify in connection in.ĭataSocket Close: Closes a data connection you specify in connection id. Let me tell you that we can use LabVIEW as an OPC client by connecting to an OPC server through a DataSocket connection and we done same and communicated OPC server and LabView through DataSocket VI. In this tutorial we will guide you how you can communicate LabView and PLC through an OPC server.
#Ni opc server lavbiew software#
In Automation industry we use different-different devices and software to implement or projects and OPC server ( OLE for Process Control) is one such very useful software or protocol which is widely used. LabView has found its use in many places and many of the engineers are making their design on LabView. As we all know that LabView is a software which is used for designing and development environment for a visual programming language and is from National Instruments.