Chapter 5
Accessing cFP-21xx Channels from PC Applications
cFP-21xx and cFP-BP-x User Manual
5-4
ni.com
DataSocket
DataSocket, a programming technology based on TCP/IP, simplifies live
data exchange between different applications on one computer or between
computers connected on a network. DataSocket was designed as an
easy-to-use, high-performance programming interface for sharing and
publishing live data in measurement and automation applications. You can
use DataSocket VIs to obtain data from other DataSocket servers, Lookout
or LabVIEW DSC module applications, and data published by the Publish
Data VIs.
DataSocket uses uniform resource locators (URLs) to specify absolute
paths to data items. A URL consists of three separate components:
protocol, network address, and locator. You are probably most familiar with
URLs from using a Web browser. For example,
http://www.ni.com/
support/fieldpoint
is a URL in which
http
is the protocol,
www.ni.com
is the network address, and
support/fieldpoint
is
the locator.
In LabVIEW, select
NI Measurements»FieldPoint»Advanced»
DataSocket»DataSocket Select URL
. Run the VI. Enter the IP address
of the FieldPoint network module in the
Browse host
field, then click
Refresh
. Browse to the data item. Copy the URL of the item and paste
it into a string control or a constant in your LabVIEW VI. Wire the control
or the constant to the DataSocket VI URL terminal.
DataSocket URLs for Compact FieldPoint I/O Modules
The following is an example of a DataSocket URL that points to a specific
channel of a Compact FieldPoint I/O module:
fieldpoint:\\130.164.44.8\FP\1AI\01
In this URL,
fieldpoint
is the protocol,
130.164.44.8
is the IP address
of the Compact FieldPoint controller, and
FP\1AI\01
is the locator. You
can use
fieldpoint
,
lookout
, or
logos
as the protocol.
The FieldPoint Process part of a URL provides the parent folder from
which you access all data items in a Compact FieldPoint system. The
FieldPoint Process part of a URL has the following format:
\\[
machine]\FP
where
[
machine]
is the IP address or hostname of the Compact FieldPoint
controller.