Remote Connection, Monitoringand Control Using LabVIEW.ppt

MiguelSosa435963 18 views 28 slides Jun 11, 2024
Slide 1
Slide 1 of 28
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28

About This Presentation

Labview


Slide Content

Remote Connection, Monitoring,
and Control Using LabVIEW
Jim Filla
NIST-OCIO, Boulder, Colo.
Bldg 1, room 4541, 303-497-5592
[email protected]

Objectives
•Present methods for remotely viewing
and/or controlling a LabVIEW application
•Build vi’s that illustrate the various options,
including the setup required to make those
options work.
•Cover the setup procedure to logon to the
NIST network through the firewall.

Connection and Data Transfer
Methods
•Data Socket
•VI Server
•Web Tools
•“Connect to Remote Panel”
•ActiveX
•File I/O

Who can talk to Whom?
•Host (w/LV) to Client (w/LV)
•Host (w/LV) to Client (w/o LV), or vice versa
–Compiled code (exe) on Client
–Web Browser on Client
•Host (w/o LV) to Client (w/o LV)
–exe on host and client
–exe on host and web browser on client

DataSocket
•DataSocket is a data “publishing” tool.
•Uses TCP/IP Protocol
•Can be a “Front Panel” or Block diagram method.
•FP Controls and Indicators can be individually
connected to a DataSocket server. This method
can be used with any LV program without
modifying the BD.
•If the data needs to be modified before being
displayed or saved on the client computer, BD
DataSocket vi’s can be used.
•FP’s on clients can be uniquely designed.

DataSocket Capabilities
•Up to 1000 clients can be allowed access to the
host computer (default is 50)
•Up to 1000 data items can be monitored (default is
200)
•Default data buffer size is 25 Mb, limited only by
physical memory
•Data transfer rates are greater using BD methods
than with FP methods (~500 Hz vs ~20 Hz)

DataSocket FP Connection
Procedure
•Use Pop-up menu on a FP control or indicator to
access “Data Operation”-”DataSocket Connection”.
•A host is defined (local or remote) using dstp
(DataSocket Transmission Protocol). An example of
the format would be: dstp:\\localhost\data
•3 Types of Connection:
–Publish :write data to the server
–Subscribe :read data from the server
–Publish & Subscribe:write or read data
•Enable or Disable the Connection

DataSocket Server
•DataSocket Server MUST be running to use
DataSocket connections.
•The server is part of LV and the LV-RTE.
•Can be started from the Windows Start
Menu or programmatically within a vi.
•A diagnostic utility is available that
monitors the number of packets transmitted
to and received from each data item.

DataSocket Server Manager
•DSSM configures the DataSocket Server.
•Use to Define Max Connections, Items, Buffers
•Use to create “Permission groups” that define the
read or write access to data items.
•Use to define “Data Items”
–Dynamic, buffer byte and packet size limits
–Predefined, static items with defined names, read and
write access, default value & type, and buffer size

Build a Matched Pair of FP
DataSocket Applications
•PART ONE
–Build DSWriter.vi
–Define DataSocket connections to FP objects to make it a
“publisher” of data.
–Start DS Server and run the vi
•PART TWO
–Next, build DSReader.vi to subscribe to the data created by
DSWriter.vi
–Run the two vi’s simultaneously, varying the delay time to observe
when the server starts “dropping” data.
•PART THREE
–Monitor the Server using the diagnostics

Three things are certain:
Death, taxes, and lost data.
Guess which has occurred.
-Computer Haiku
But One Small Problem …

The Trade Off
•FP DataSocket programming is fast and
easy, but speed is limited.
•Data can be dropped at higher data rates,
with no indication that data in the buffer is
being overwritten.
•BD DataSocket programming can overcome
this. The price? A little more coding.

Build a Matched Pair of BD
DataSocket Applications
•Part 1:
–Build “DSWriter with attribute.vi”, using the
DataSocket BD vi’s
•Part 2:
–Build “DSReader with attribute.vi”
–As with the FP examples, run the two vi’s with varying
delay times to observe when data transfer loss begins.

VI Server
•Uses TCP/IP Protocol
•ActiveX (Win only)
•“Block Diagram” method.
•Functions (invoke and property nodes) are
used to build VI Server apps.
•Designed to control vi execution
•Flexible, powerful, but can involve more
extensive programming

VI Server Uses
•Application Control
–Run vi’s programmatically on local or remote
computers
–Dynamically load and run and close vi’s
–Uses Invoke nodes to execute vi, object, or
application methods
–Uses Property nodes to set or display vi, object,
or application properties

Build a vi to dynamically open,
run, and close a second vi
•PART ONE
–Build part of “VI Server –remote cmd.vi”
–Start with the “Open vi reference” node
–Verify its operation
•PART TWO
–Add an “Open Application reference” to control a vi on
another computer
–Test the vi (it is nice to warn the person whose
computer you are going to access, before doing so)

Challenge Exercise: Modify the
VI-Server Example vi
•Build “VI Server –remote cmd2.vi”
–Add a while loop to the program
–Add an Event structure with list items for:
•Opening a vi (standard, minimized, and hidden)
•Closing a vi
•Running the vi
•Aborting the run
–Run the vi and test its operation

Web Page Publishing
•Simple way to display a vi on the web
•Go to “Tools” menu and select “Web
Publishing Tools …”
•Three Types of Pages can be created:
–Snapshot (viewing only –one shot)
–Monitor (viewing only –updates in NS)
–Embedded(viewing and control)

LV Web Features & Limitations
•Exact Display of FP in a web browser, but no BD.
•Comment header and footer can be added to page.
•Monitor and Snapshot Types: can be viewed by
any number of clients.
•Embedded Type: web pages can only be viewed
(or controlled) by one client, unless more viewing
licenses are purchased.
•The correct version of the LV Runtime engine
must reside on client (free from NI).

Build Web Publishing vi
•Create a “monitor” type web page
•Configure Web server “Options”, under
“Tools” menu. View “Configuration” and
“Browser Access”
•Test the program with IE and NS browsers
•Create an “embedded” type web page and
test the control option of the webpage.
Right Click and ask for control.

“Connect to Remote Panel”
Method
•Allows a host vi to be monitored and controlled
from a client computer with NO programming!
•This will create a remote front panel that is
identical to the host FP.
•The Full Development version of LV allows only
one client at a time. You can buy more licenses
from NI. (LV-PD has 5 licenses)
•Compiled vi’s can be used at the host and/or the
client computer.

Remote Panel limitations
•Pop-up Panels for user input are not visible
on the remote panel.
•Client FP cannot be modified.
•Data cannot be manipulated or saved on the
client computer.
•No Block Diagram
•LabVIEW must be running and the vi must
be loaded in memory

Remote Panel Example 1
•Click on “options” –“Connect to remote panel”
–Connect to: 132.163.129.41
–Filename: LM35 Temperature3.vi
•Right Click inside the FP and “Request Control”
–Note that only one person at a time can access the vi.
–Release control and close the window when finished.
•Run the “Remote Panel Connection Manager”, found
in the “Tools” menu. This will allow you to monitor
the network traffic and transfer rates on your browser.

Remote Panel Example 2
•Have someone else connect to one of your
vi’s. If you right click, you will be given
several options, like “take control”. Try out
these options.
•Change the web configuration port #, or the
browser access options to enhance the
security of your LV web server.

What about outside the Firewall?
•To Access the NIST network, two methods have
been established:
1.Authentification Cards, this is a physical card that
generates a hex key, after you enter a PIN, that you
enter as a password.
2.CheckPoint Software’s “SecuRemote”. This a
password protected method that uses an encrypted
data stream, with encryption-decryption software on
both your computer and at the NIST firewall. This is
the preferred method.

To get a “SecuRemote” Account
•NIST and ITS
–Contact iTAC
–Robert Sorenson will provide iTAC with a Sealed
Envelope containing the account info. You show a
NIST id and sign for it.
–An email from NIST-G will confirm the account is
ready.
–Install (or have iTAC install) SecuRemote on your
computer.
•NOAA
–You might not have these security issues. Try
connecting from outside the network. If it doesn’t
work, contact your local system administrator.

Summary
•Use “Connect to Remote Panel”, when LV is
available, for quick, full FP connection, with
control
•Use the “Web Publishing Tool” to create a full FP
display that can be viewed anywhere, with or
without control capabilities
•Use Data Socket to display and/or capture data on
a remote computer in a custom LV front panel.
•Use VI Server when you need to control the
loading and operation of vi’s from a remote
location.

NIST-OCIO LabVIEW Information
and Assistance Resources
•NIST LV website:
www-i.boulder.nist.gov/labview(NIST) or
www.boulder.nist.gov/labview(non-
NIST)
•OCIO Consulting Support, programming help,
troubleshooting, and collaboration (short or long
term) are also available:
Contact Jim Filla at x5592 or
[email protected] details