Distributed Control & Automation Framework (DCAF)

cancel
Showing results for 
Search instead for 
Did you mean: 

Legacy Module Upgrade Guide (TBD to DCAF)

Purpose

This guide is intended to help developers using the pre-lease version of DCAF or the Tag Bus Data Framework update their existing plugin modules to work with the newest version of DCAF.

The steps in this guide are only necessary for updating plugin modules that were created using the Tag Bus Data Framework (TBDF) or using a beta version of DCAF before the release of DCAF at NIWeek 2016 on the LabVIEW Tools Network. If you created a module using the released version then you can ignore these steps.

Problem

While updating the DCAF framework, we came to the conclusion that our application was limited by our choice of file hierarchy. Previously, the modules, the engines, and the editor were all a the same depth as many of their dependencies in the file hierarchy. This resulted in a cluttered folder and the need to be overly-specific in regards to the editor's search paths. By taking these core elements and placing them in a single folder at <LabVIEW>/vi.lib/NI/DCAF we were able to clean up the file hierarchy and have that folder be the sole search path in our default cache.

Many, if not all of the modules for DCAF depend on the classes in this new directory and are unable to be loaded because their dependencies are "missing" on disk.

Additionally, we have now standardized on a UI scheme as well as adding groupings for modules in the right-click menus. This guide will show how to add a category to an existing module.

Solution

Module Linking

Before attempting to relink your modules, ensure that everything from the Tag Bus Data Framework or prior versions of DCAF is uninstalled.

To relink your module to the new file locations you only need to open your existing project, let LabVIEW search for and update the dependencies, and save the project. If this doesn't work for you, please post to the forums and we will try to assist you.

UI Update

The new DCAF framework installs a palette of controls called the DCAF UI Toolkit that features the common UI elements used for DCAF modules. Most critically, it includes a tab control that is sized to the exact size of the DCAF editor subpanel and subVI that resizes the window and sets the top-left corner to (0,0). In general, the update process is:

1. Place down a Top-Level Tab Control from the DCAF UI Toolkit palette. Move all of the controls and indicators from your existing UI inside of the tab control taking care to not accidentally resize the tab.

2. On the block diagram, place the "Align Front Panel" anywhere on the block diagram.

3. Create a property node for the Top-Level Tab Control and set the position to (0,0).

4. Run the VI. It will likely error out, but it will resize itself and adjust the placement of the tab control. You can now delete the "Align Front Panel" VI and the property node.

5. (Optional). If you want to update any buttons to match the DCAF default buttons, it is much easier to right-click your existing button and select "Replace". This will save you from having to relink any event structures or property nodes that were assigned to your existing button.

Adding a Right-Click Category

1. To add a custom right-click category, simply override the "GetCategory" method in your Editor Node object. Any module that doesn't have a category is added to the 'Other' category.

Tanner B.
Systems R&D Engineer - Aerospace, Defense, and Government
National Instruments
0 Kudos
Message 1 of 1
(4,354 Views)