0% found this document useful (0 votes)
204 views24 pages

LabVIEW OPC With NI OPC Servers

This document discusses using LabVIEW with NI OPC servers to read and write data. It contains the following key points: 1. The software needed includes LabVIEW and NI OPC servers, which can be downloaded from NI's website. NI OPC servers allow LabVIEW applications to act as OPC clients. 2. The OPC functions in the LabVIEW DataSocket palette allow opening and closing connections to OPC servers, and reading and writing data. 3. A demonstration shows how to create a write client LabVIEW application to write data to an OPC server tag, and a read client application to read data from the same tag simultaneously, demonstrating real-time data exchange.

Uploaded by

dorivolos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
204 views24 pages

LabVIEW OPC With NI OPC Servers

This document discusses using LabVIEW with NI OPC servers to read and write data. It contains the following key points: 1. The software needed includes LabVIEW and NI OPC servers, which can be downloaded from NI's website. NI OPC servers allow LabVIEW applications to act as OPC clients. 2. The OPC functions in the LabVIEW DataSocket palette allow opening and closing connections to OPC servers, and reading and writing data. 3. A demonstration shows how to create a write client LabVIEW application to write data to an OPC server tag, and a read client application to read data from the same tag simultaneously, demonstrating real-time data exchange.

Uploaded by

dorivolos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

LabVIEW

OPC with NI
OPC Servers
Hans-Petter Halvorsen, M.Sc.
Software
You need the following Software:
• LabVIEW (LabVIEW Professional Development
System 32-Bit: English)
• NI OPC Servers

You may use them in “Evaluation Mode” if you don't have a valid License key

All LabVIEW Software can be downloaded from: www.ni.com/download


NI OPC Servers

Read Data from OPC Server


Write Data to OPC Server

In this Example LabVIEW Application #1


and LabVIEW Application #2 are on the
same computer. Normally they are located
on 2 different computers in a Network.

LabVIEW Application #1 LabVIEW Application #2


NI OPC Servers

Hans-Petter Halvorsen, M.Sc.


NI OPC Servers
A Demo version should be included with LabVIEW
DSC Module or LabVIEW Real-Time Module

Use Search in Windows. Search for «OPC Servers»


And select «OPC Servers Configuration»
NI OPC Servers
NI OPC Servers will then start and you get access
from the Taskbar in Windows.

Select “Configuration”
NI OPC Servers Configuration

Here you may create New OPC Tags.


Just Right-click and select «New Tag»
NI OPC Servers – Create New Tag

Here I have create a


New OPC Tag called
«Temperature»
OPC in LabVIEW

Hans-Petter Halvorsen, M.Sc.


The OPC Functions in LabVIEW
You can use LabVIEW as an OPC client by connecting to an OPC server
through a DataSocket connection.

The DataSocket palette in LabVIEW:


Write Data to OPC

Read Data from OPC

Browse OPC Servers


and OPC Items
Open Connection
Close Connection
to OPC Server
to OPC Server
OPC Write in LabVIEW

Hans-Petter Halvorsen, M.Sc.


NI OPC Servers

Read Data from OPC Server


Write Data to OPC Server

In this Example LabVIEW Application #1


and LabVIEW Application #2 are on the
same computer. Normally they are located
on 2 different computers in a Network.

LabVIEW Application #1 LabVIEW Application #2


Write to OPC Server using LabVIEW
While Loop

1 2 3 4

Or specify URL directly: While Loop

Use the BucketBrigade Items – because they


can be used for both reading and writing
Connect to NI OPC Servers
Write Tag URL manually or
select Tag using the
«DataSocket Selct URL»
OPC Read in LabVIEW

Hans-Petter Halvorsen, M.Sc.


NI OPC Servers

Read Data from OPC Server


Write Data to OPC Server

In this Example LabVIEW Application #1


and LabVIEW Application #2 are on the
same computer. Normally they are located
on 2 different computers in a Network.

LabVIEW Application #1 LabVIEW Application #2


Read from OPC Server using LabVIEW
While Loop

1 2 4
3

Or specify URL directly: While Loop


Connect to NI OPC Servers
Write Tag URL manually or
select Tag using the
«DataSocket Selct URL»
Final Solution

Hans-Petter Halvorsen, M.Sc.


NI OPC Servers

Read Data from OPC Server


Write Data to OPC Server

In this Example LabVIEW Application #1


and LabVIEW Application #2 are on the
same computer. Normally they are located
on 2 different computers in a Network.

LabVIEW Application #1 LabVIEW Application #2


Running Write Client and Read Client
simultaneously

It Works!
Hans-Petter Halvorsen, M.Sc.

University College of Southeast Norway


www.usn.no

E-mail: hans.p.halvorsen@hit.no
Blog: http://home.hit.no/~hansha/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy