Getting Started with DCFG on Your Existing Project
Add DCFG support to your project
Having a LabVIEW Project Opened (DCFG can work only on saved to disk Projects, it needs a valid Path to save and script a DCFG LabVIEW Class)
Go to LabVIEW menu
-
Select Where to add DCFG
-
DQMH Module
-
Project
-
Library
-
-
Choose a Configuration Name, this name will be used as your Configuration Class name. If you leave it blank, it will be named DCFG Config.lvclass
-
Add any additional Configuration View, by default DCFG will allways have 'Default' as a Configuration View.
-
Choose the Configuration Item Position, if you leave 0, DCFG will take care of organizing the Configuration positions.
-
Add the arguments you want for this configuration to the Configuration Parameters Window.
| If you set the default values, these will be used as your default configuration. |
-
Change the Configuration Class Icon by clicking on the Edit Overlay button, this is an optional step.
-
Click the OK button when done, and watch the scripting do its magic.
-
If you need to change the Configuration Item Position for your configuration, follow these steps:
-
Open Init Config.vi block diagram
-
Change the 'DCFG_Configuration Order' constant
You can also change the Configuration Item Position programmatically
-
Open and run the DQMH_DCFG API Tester
-
On the Config Pages tab, click on the Get Config Order Values button
-
Right-click on the Updated Name-Order Array and select "Copy Data"
-
Right-click on the Name-Order Array to Change and select "Paste Data"
-
Change the configuration order by editing the order numbers
-
Click on the Set Config Order Values button
-
-
Alternatively, you could make the order be a control and an input to your Init Config.vi and provide the order when you initialize the configurations.
Manage Presets
-
Select the configuration values
-
Click the Save Preset and choose a name
-
Every Preset Saved will contain all the configuration values
-
How to enable Presets:
-
-
After Adding DCFG Support to a module Main.vi Block diagram will be opened
-
Create a True Constant and connect it to DCFG Framework:Start Module.vi as shown in the following image
-
Once you add this constant all the preset related buttons will be displayed in the configuration UI.