Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

FieldPoint Software Basics

35 ratings | 3.20 out of 5
Print

Overview

This document explains how FieldPoint software communicates with FieldPoint hardware and how the FieldPoint Read and Write VIs work in each of the three FieldPoint communication modes (serial, Ethernet, and embedded).

FieldPoint Server Initialization

FieldPoint 3.x (FieldPoint Explorer) and FieldPoint 4.x (installed with Measurement & Automation Explorer 3.0 and later) install the FieldPoint Server, the FieldPoint OPC Server, the FieldPoint Manager, and the FieldPoint GUI. The FieldPoint Server is launched when you launch FieldPoint Explorer, access FieldPoint through MAX, call OPCFieldPoint, or use FP Open. The FieldPoint Server communicates with FieldPoint hardware through the network module. The server uses Optomux to communicate with serial network modules (FP-1000/1001) and the National Instruments Ethernet protocol to communicate with Ethernet network modules (FP-160x and [c]FP-20xx). The FieldPoint Server uses the configuration (.iak) file to determine which comm resources to communicate with.


[+] Enlarge Image
Figure 1


Ethernet Communication
The FieldPoint Server subscribes to all of the items listed in the .iak file by sending subscription messages to the Ethernet network module. The network module responds by granting subscriptions and sending current data for all channels to the FieldPoint Server.

Communication Between Applications and the FieldPoint Server


The FP communication path varies slightly depending on the application software. LabVIEW and CVI communicate with the FP Server through the FP Manager .dll. The FP Manager contains LabVIEW/CVI specific .dlls that form the communication bridge between LabVIEW/CVI and the FieldPoint Server. Other applications, such as Visual Basic and Visual C++, can use DataSocket or another OPC client to communicate with the OPC Server, which communicates with the FieldPoint Server.

FieldPoint Configuration


FieldPoint hardware is configured using either FieldPoint Explorer (FieldPoint 3.0.2 and earlier) or MAX (FieldPoint 4.x). When you do Find Devices on a serial comm resource, the FieldPoint Server uses Optomux commands to poll the serial port and retrieve information about connected devices (network and I/O modules). When you do Find Devices on an Ethernet comm resource, the FieldPoint server uses TCP/IP to retrieve information about devices connected to that comm resource. If you apply changes to a module configuration, FieldPoint Explorer or MAX also saves configuration information on the network module. If the network module is a FieldPoint RT controller ([c]FP-20xx), channel name information is also saved in a .ini format on the controller. This provides channel name identification for embedded applications.

FieldPoint Communication


The basic FieldPoint communication question is how FP Read and FP Write work. The communication varies based on the network module type.

FieldPoint Serial Communication
The FP-1000/1001 uses a synchronous communications architecture called poll-driven communication. Poll-driven communication can be thought of as a master/slave relationship in which the slave responds only when directly queried by the master. In a FieldPoint application, the FP-1000/1001 is the slave device and the computer to which it is connected is the master device. Polled I/O requires repetitious polling, or scanning of the serial device to query for an occurrence of an event.

[+] Enlarge Image
Figure 2

The above figure demonstrates the basic functionality of read and write commands in FieldPoint serial communication. The FieldPoint application sends a write request to the FieldPoint Server, which in turn sends the write command to the network module to write to the I/O module. Similarly, the FieldPoint Server passes a read command on to the network module to read a channel or channels on an I/O module. The network module gets the value and sends it to the server at the set baud rate. The application thus reads the current value from the device. In poll-driven communication, writing to a FieldPoint output module and reading the data back always returns the value just written.

FieldPoint Ethernet Communication

[+] Enlarge Image
Figure 3

FieldPoint Ethernet network modules use an asynchronous communications architecture called event-driven communication. The network module automatically sends updates to a client (the FieldPoint Server) when data changes. The server then caches (stores) the data from I/O modules and uses it to respond to read requests. The network module scans all I/O channels with subscriptions to determine if a value has changed, comparing the current value to the cached value for each channel. If a change has occurred, the network module puts the difference between the two values in the transmit queue. The FieldPoint Server receives this information and sends an acknowledgement to the network module. If the network module does not receive an acknowledgement for its transmitted messages after a set period of time, it unsubscribes the FieldPoint Server and goes into watchdog mode (assuming that the watchdog has been configured and there are no other clients subscribed to it).

The network module periodically sends and receives a time-synchronization signal so that it can adjust its clock and provide proper timestamping. When signals do not change over long periods of time, the client (the FieldPoint Server) sends periodic resubscribe messages to verify that the system is still online.

Event-driven communication can considerably reduce the amount of network traffic because it sends data only when changes in value are detected. It is a good programming practice to delete unused channels from the configuration (.iak) file when using Ethernet communication. This prevents the server from subscribing to those channels and reduces the amount of data communication.

FieldPoint Embedded Communication
Embedded applications have the advantage of a stand-alone unit using a real-time operating system and flash memory. This gives the [c]FP-20xx autonomy in operation and independence from reliability issues involving the host PC.

FieldPoint embedded communication is poll driven. I/O modules return data only when directly queried by the RT controller. Unlike nonembedded applications, applications embedded on controllers communicate directly with I/O modules and do not use the FieldPoint Server.

[+] Enlarge Image
Figure 4


While an embedded application is running on the RT controller, another application on the PC can communicate with the same RT controller. The IA Control Environment on the controller handles this application and can cause variations in I/O module register values. Therefore, if the application on the PC writes a value to a channel after an embedded write, and then the embedded application reads the channel, the embedded read returns the value last written.

Communication Between the Controller and I/O Modules


Communication between network module and I/O modules is similar among different types of network modules. Each I/O module cycles through its internal routine of sampling all channels, digitizing the values and updating the values on the module channel registers (buffer). This cycle time is set for each module and is specified as the All Channel Update rate. This can be found in the National Instruments Catalog or the operating instructions for each module. This value may vary depending on module settings.
Related Links:
FieldPoint Support
Products and Services - FieldPoint Industrial Control and Measurement
35 ratings | 3.20 out of 5
Print

Reader Comments | Submit a comment »

Hmmmm
So, I spent 10 minute hooking the FP-1601 up and verifying it was done correctly and hmmmm, 3 days looking through pages and pages and pages and pages (you get my point) of useless technical jargon with "pretty" pictures and flowcharts, yet, I STILL cannot figure out what is needed to make it work and how to even do so. No wonder my instructor told me National Instruments and LabView were bloated Dinosaurs....
- Oct 4, 2007

lack of information
Is compactFieldpoint NI-DAQmx compatible? If so, why is it not in the simulated devices list in MAX? This information is hard to find!
- Frank Engelen, van, SEIN. fvengelen@sein.nl - Nov 30, 2006

It would be nice to know what version of what software works with what upperlevel language version, and how and where to download the current version. none of these topics are broached or referenced...how do i get there from here?
- Nov 10, 2003

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).