Using FOUNDATION Fieldbus with OPC

Updated Nov 12, 2020

Environment

Driver

  • NI-FBUS

This paper discusses how to access the FOUNDATION Fieldbus network and devices with the open OPC (OLE for Process Control) interface.
 

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.

- NI-FBUS Communication Manager 2.3.6 and 3.0

  • Supports FOUNDATION Fieldbus H1 and HSE communication.
  • Supports OPC Data Access 2.0.

- NI-FBUS Communication Manager 3.1

  • 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.

OPC Server Configuration

NI-FBUS OPC Data Access Server is easy to configure.

For FOUNDATION Fieldbus H1 communication, you need:

  1. Setup the NI FOUNDATION Fieldbus interface card

  2. Install NI-FBUS Communications Manager (or NI-FBUS Configurator)

  3. Import the device description files of your devices

Refer to the AT-FBUS Getting Started Manual, the PCI-FBUS Getting Started Manual, or the PCMCIA-FBUS Getting Started Manual according to your interface card.

For FOUNDATION Fieldbus HSE communication, you need:

  1. Setup the FBUS-HSE/H1 linking device

  2. Install NI-FBUS Communications Manager (or NI-FBUS Configurator)

  3. Import the device description files of your devices

Refer to the HSE Linking Device Getting Started Manual.

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.

Table 1. OPC Data Type Mapping Rule

 

FOUNDATION Fieldbus Address Space

NI-FBUS OPC Data Access Server defines the address space according the FOUNDATION Fieldbus hierarchy:

  • 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.

Figure 1 shows a typical FOUNDATION Fieldbus address space.
 

Access FOUNDATION Fieldbus with a Simple OPC Client

Server Explorer, an OPC client, comes with the NI-FBUS software. The following steps show how to access FOUNDATION Fieldbus with the Server Explorer:
1. Launch Server Explorer
2. Connect the NI-FBUS OPC Data Access Server:

  1. Right click “NIFB_OPCDA.3” -> “Connect to server…” and a “OPC Connection” dialog pops up

  2. Click “Connect” to close the dialog and the server icon becomes green

3. Add an OPC group:

  1. Right click “NIFB_OPCDA.3” -> “Add/Edit Groups…” and a “OPC Server: NIFB_OPCDA.3” dialog pops up

  2. Click “Add >>” on the dialog

  3. Click “OK” to close the dialog and a group “Gr1” icon is added under the server icon

4. Add the OPC items:

  1. Right click “Gr1” -> “Add/Edit Items…” and a “OPC Group: Gr1” dialog pops up

  2. Select items in “Item Definition” area

  3. Click “Add >>” and add items to “Name (Device\Item)” area

  4. 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

5. Read an OPC item:

  1. Right click on the item you want to read -> “Properties…” and a “OPC Item” dialog pops up

  2. Switch to “Read & Write AsyncIO”

  3. Click “Read!” button

6. Write an OPC item:

  1. Right click the item you want to write -> “Properties…” and a “OPC Item” dialog pops up

  2. Switch to “Read & Write AsyncIO”

  3. Input the value and click “Write!” button.
     

Development Tips

Use these tips to help you develop a more efficient FOUNDATION Fieldbus OPC application.

  • 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:

    1. Connect the NI-FBUS OPC server by an OPC client, such as Server Explorer

    2. Add a group "G1"

    3. Add the items you want to monitor to the group

    4. Set the group update rate to a small value, such as 100ms, and the real update rate shown by the OPC client as the recommended update rate.

 

Conclusion

The NI-FBUS OPC Data Access Server provides FOUNDATION Fieldbus with the open OPC interface. With the server’s help, we can access the FOUNDATION Fieldbus network efficiently.