Implementing a Custom Device Hierarchy

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Configuring the Appearance and Components of a Custom Device

The hierarchy of a custom device is its appearance in the System Explorer window configuration tree. You can implement a flat custom device hierarchy, in which all channels appear under one section in the configuration tree, or you can implement a nested hierarchy, in which you group like channels in extra sections. The following topics show you how to implement each type of hierarchy.

Implementing a Flat Custom Device Hierarchy

A flat hierarchy is a hierarchy in which all of the channels appear under one section in the configuration tree. Flat hierarchies are best suited for custom devices with low numbers of channels. The following block diagram shows an Initialization VI customized to create a flat custom device hierarchy. In this example, all channels will appear under the main custom device section when an operators adds the custom device to the system definition file.

The following list describes important details about the previous block diagram:

  1. The Device Item Ref control is the reference to the custom device, and specifies that each of the Add Custom Device Channel VIs will place the channels they create under the main section of the custom device.
  2. The Add Custom Device Channel VI creates an input channel named SMBTrig under the main section of the custom device.
  3. The Add Custom Device Channel VIs create eight input channels named ADEnCh<1...8> and eight output channels named ADDataFromCh<1...8> under the main section of the custom device.

This code results in the following flat hierarchy.

Implementing a Nested Custom Device Hierarchy

A nested hierarchy includes additional sections under the main section, allowing you to organize your channels. If your custom device has many channels, a nested hierarchy makes the device easier to understand and operate for users.

The following example shows the block diagram of an Initialization VI customized to create a nested custom device hierarchy.

The following list describes important details about the previous block diagram:

  1. Add Custom Device Section VIs create two sections, Hardware Enables and Hardware Inputs, under the main section.
  2. The Section Ptr reference to the Hardware Enables section specifies the Add Custom Device Channel VI will place the channels it creates under that section. This will create eight channels, ADEnCh <1...8>, under Hardware Enables.
  3. The Section Ptr reference to the Hardware Enables section specifies the Add Custom Device Channel VI will place the channels it creates under that section. This will create eight channels, AddDataFromCh <1...8>, under Hardware Inputs.
  4. The Add Custom Device Channel VI that creates SMBTrig uses Device Item Ref in. Therefore, SMBTrig will appear under the main custom device section.

This code results in the following nested hierarchy.

WAS THIS ARTICLE HELPFUL?

Not Helpful