Using FOUNDATION Fieldbus with OPC
Overview
This paper discusses how to access the FOUNDATION Fieldbus network and devices with the open OPC (OLE for Process Control) interface.
Table of Contents
Introduction
An OPC Data Access server is shipped with the NI-FBUS Communications Manager.(NI-FBUS Configurator includes NI-FBUS Communications Manager automatically.)
The following is the OPC related information for different versions of the NI-FBUS Communications Manager:
- NI-FBUS Communication Manager 2.3.5
- Supports FOUNDATION Fieldbus H1 communication.
- Supports OPC Data Access 1.0.
- Supports FOUNDATION Fieldbus H1 and HSE communication.
- Supports OPC Data Access 2.0.
- Supports FOUNDATION Fieldbus H1 and HSE communication.
- Supports OPC Data Access 2.05a.
- Passes OPC Data Access 2.05a Compliance Test. Please see the compliance test result on www.opcfoundation.org for details.
- A new address space is designed to support multiple links and multiple devices to access data efficiently.
- Improved data access performance by VIEW-based mechanism, especially for the ARRAY type data access greatly.
- Improved OPC server stability.
It is highly recommended to upgrade to NI-FBUS Communications Manager 3.1 for efficiency and stability.
See Also:
the compliance test result on www.opcfoundation.org
OPC Server Configuration
NI-FBUS OPC Data Access Server is easy to configure.
For FOUNDATION Fieldbus H1 communication, you need:
- Setup the NI FOUNDATION Fieldbus interface card
- Install NI-FBUS Communications Manager (or NI-FBUS Configurator)
- Import the device description files of your devices
For FOUNDATION Fieldbus HSE communication, you need:
- Setup the FBUS-HSE/H1 linking device
- Install NI-FBUS Communications Manager (or NI-FBUS Configurator)
- Import the device description files of your devices
After configuration, you can connect the devices to the interface card and the linking device. NI-FBUS OPC Data Access Server will detect the devices and their blocks automatically.
OPC Data Type Mapping Rule
There are three data types in FOUNDATION Fieldbus: SIMPLE, ARRAY, and RECORD.
The SIMPLE type and ARRAY type variables are regarded as leaf nodes in the OPC address space. The RECORD type variable is regarded as a branch node, which means that you cannot access the record type variable directly but access its fields one by one.
The following table shows the data type mapping rule.
- The top level is the link(s)
- The 2nd level is the device(s) connected to each link
- The 3rd level is VFD under each device
- The 4th level is the block(s) under each VFD
- The 5th and 6th levels are the parameters under each block. SIMPLE and ARRAY type parameters are leaf nodes and a RECORD type parameter is a branch node.

[+] Enlarge Image
Figure 1. FOUNDATION Fieldbus Address Space
Access FOUNDATION Fieldbus with a Simple OPC Client
1. Launch Server Explorer
2. Connect the NI-FBUS OPC Data Access Server:
- Right click “NIFB_OPCDA.3” -> “Connect to server…” and a “OPC Connection” dialog pops up
- Click “Connect” to close the dialog and the server icon becomes green
- Right click “NIFB_OPCDA.3” -> “Add/Edit Groups…” and a “OPC Server: NIFB_OPCDA.3” dialog pops up
- Click “Add >>” on the dialog
- Click “OK” to close the dialog and a group “Gr1” icon is added under the server icon
- Right click “Gr1” -> “Add/Edit Items…” and a “OPC Group: Gr1” dialog pops up
- Select items in “Item Definition” area
- Click “Add >>” and add items to “Name (Device\Item)” area
- Click “OK” to close the dialog and the item icons are added to the group icon and the items are listed in the right area of Server Explorer
- Right click on the item you want to read -> “Properties…” and a “OPC Item” dialog pops up
- Switch to “Read & Write AsyncIO”
- Click “Read!” button
- Right click the item you want to write -> “Properties…” and a “OPC Item” dialog pops up
- Switch to “Read & Write AsyncIO”
- Input the value and click “Write!” button.
Development Tips
- Read multiple items at a time instead of reading items one by one
Because the OPC server is optimized for multiple item operation, reading multiple items at a time is faster than reading items one by one. For the same reason, add multiple items at a time, and refresh multiple items at a time.
- Add several OPC groups instead of only one
For most applications, the items to read are much more than the items to write. Adding several OPC groups instead of only one can organize the OPC items efficiently.
For example, put the items that you want to monitor into a group and put the items that you want to write, into another group with a slow update rate, such as 10s. In this way, the write operation will not be delayed by the read operation. OPC clients normally support multiple server instances and/or multiple groups for one OPC server. The OPC clients only support multiple server instances and only one group for each server. You can create several server instances instead.
- Do not put too many static items into a monitoring group
Parameters in FOUNDATION Fieldbus can be divided into two groups: static items (in VIEW_2 and VIEW_4.x) and dynamic itemsĀ (in VIEW_1 and VIEW_3.x).
You can put the static items into a slow update rate OPC group because these items seldom change.
- Set a proper update rate for each OPC group
Because the FOUNDATION Fieldbus H1 rate is only 31.25Kb/s, the OPC group update rate cannot be too fast. Setting a proper update rate for each OPC group can save the communication bandwidth.
You can find the recommended fastest update rate for a specific OPC group by the following these steps:
Reader Comments | Submit a comment »
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/).
