Distributed Control & Automation Framework (DCAF)

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically change DCAF Tags default values

I'm looking to get some help figuring out how to automate Default value changes while in program.

I understand that making changes to the config will require the engine to restart inorder to come into effect. This is fine.

Ideally would need to searchable by Tag alias.

 

Ive come up the attached (in LV2015). Also attached is screen cap.

I believe this opens up the tree in the config, but not sure where to go next.

 

Can anyone point me in the right direction?

Download All
0 Kudos
Message 1 of 4
(4,779 Views)

Is the purpose of this to enable a form of state persistence across runs of the system?

 

 

Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 2 of 4
(4,768 Views)

Are you looking to automate this within the Configuration Editor or on the execution target before running a specific configuration? If we get a better understanding of the use-case, we may be able to provide more specific guidance.

 

To make these changes you will need to get access to the 'Engine Configuration' class which contains the list of Tags and their default values. The way you access the 'Engine Configuration' may change depending on your use-case, but once you get it, you will use the API found in AddOns>>Module Execution Interface>>Tags to make programmatic modifications. At that point you can find a tag by name, make changes to the tag using the API found in Data Communication>>NI Tag Bus>>tag, and then apply the changes using 'apply tag changes'. Once you've made all of your desired changes to the 'Engine Configuration' class, you will need to store it back from wherever you found it (again this may vary depending on use-case).

 

This might take a minute to learn, but will definitely be possible. Feel free to post any additional questions you run into here.

Message 3 of 4
(4,765 Views)

In a word yes. I would like a module running inside of DCAF execution be able to change default values to be able to used on the next run of the engine.

0 Kudos
Message 4 of 4
(4,763 Views)