Table Of Contents

Implementing a Custom Device Hierarchy

Last Modified: June 10, 2021

Implement a flat or nested hierarchy for your custom device.

Before you begin, you should understand custom device hierarchies. A flat hierarchy is a hierarchy in which all of the channels appear under one section in the configuration tree. A nested hierarchy includes additional sections under the main section, allowing you to organize your channels.
  1. Use the following table to determine the type of hierarchy you want in your custom device.
    Hierarchy type Use case
    Flat Best suited for custom devices with a low number of channels.
    Nested Best suited for custom devices with many channels. A nested hierarchy makes the device easier to understand and operate for users.
  2. Optional: Modify the following code to create a flat hierarchy.

    The Device Item Ref—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 in System Explorer.

    Add Custom Device Channel VI—Creates an input channel named SMBTrig under the main section of the custom device.

    Add Custom Device Channel VIs—Creates eight input channels named ADEnCh<1...8> and eight output channels named ADDataFromCh<1...8> under the main section of the custom device.

    All channels will appear under the main custom device section when an operators adds the custom device to the system definition file. The following image displays what this hierarchy will look like in System Explorer.
  3. Optional: Modify the following code to create a nested hierarchy.

    Add Custom Device Section VIs—Creates two sections, Hardware Enables and Hardware Inputs, under the main section in System Explorer.

    Add Custom Device Channel VI—Uses the Section Ptr reference to create eight channels, ADEnCh <1...8>, under the Hardware Enables section.

    Add Custom Device Channel VI—Uses the Section Ptr reference to create eight channels, AddDataFromCh <1...8>, under the Hardware Inputs section.

    Add Custom Device Channel VI—Creates SMBTrig to use Device Item Ref in. Therefore, SMBTrig will appear under the main custom device section.

    All channels will appear under the main custom device section when an operators adds the custom device to the system definition file. The following image displays what this hierarchy will look like in System Explorer.

Recently Viewed Topics