06-22-2014 06:15 AM
Hi all,
I'm usually interfacing a lot of sensors via compactDAQ modules. I've made some subVis to handle tasks such as applying calibration data or filtering to their signals. These calibration data typically need to be set up or changed on the fly, so defining all of the sensor calibrations in NI MAX would be rather painful (as far as I can tell).
My calibration subVis typically have a few controls (a table, some bools etc) whose interface I would like to define once and for all so it could be plopped down in a single action, instead of having to create new controls for every input of the subVIs, all of which have to be moved and organized. It would be highly preferable if this could result in a single block in the block diagram, with multiple outputs...
06-22-2014 07:40 AM
06-22-2014 08:23 AM
Hi P@Anand.
I'm looking for the best practice for making a set of controls that interface with a subVI.
I have a customised subVI which I intend to re-use in many applications. What I want is to create a set of front panel controls that I can also re-use.
I've been researching a bit on my own since posting my question, and am now looking into using a cluster for this purpose. This means passing a cluster to a subVI which I understand has its own challenges.. Any other suggestions would be appreciated.
06-22-2014 08:45 AM
06-22-2014 10:27 AM
A cluster makes sense for that situation. After you have created the cluster, make it a typedef. If you ever need to make any changes to the cluster or any constants you made from the cluster, you only need to change the typedef file and all the other instances will change automatically.
If you have some cases where the calibrations data remains constant over multiple reboots of the system, it may also be useful to save the values to configuration (or .ini) files. Look at the Configuration File VIs sub palette of th eFile palette.
Lynn