Showing results for 
Search instead for 
Did you mean: 

Load value from a file to the configuration of a DAQmx Virtual channel.

Dear LabView users,


I need to make a program that can acquire data from a load cell and different strain gauges and present this in a nice graph. My question is: Can I load the value for the bridge type from a file per channel? So I want to create a file in notebook with my types of strain gauges with the information of the bridge type and the gage factor. When I load this file, the configuration per channel for the strain task must load automatically so I don't need to configure each strain gage manually. I've done this already for the load cell configuration, but I don't know how to do this for the strain gage configuration. How can I realise this?


I've attached my vi, you can find the problem in the state : Set Channels   event: [3] Set Channels


With kind regards,



0 Kudos
Message 1 of 26

Have you looked at the DAQmx tutorials that show how to create a Virtual Channel?  Do a Web Search for "DAQmx Tutorial" -- I especially recommend the one that has a name like "Use 10 Functions to do 80% of your work".


Bob Schor

0 Kudos
Message 2 of 26



Yes ofcourse I looked at the tutorials, I know about the virtual channel task creator, and I used it too, but I want to know how I can change the values of the subVI bridge configuration. I want to import the config instead of configuring it when the program is running (front panel). 

0 Kudos
Message 3 of 26

Sorry -- I didn't understand (and still don't) the problem you are trying to solve.  I looked at your code, but still don't understand the distinction you are trying to make.



0 Kudos
Message 4 of 26



Thanks for the fast reply. 

So, when you use the DAQmx virtual channel task , with the settings for the strain gage, then there are several terminals you need to connect or make a variable of it. If you do this for the bridge configuration, then you get the cluster for this configuration that you can adjust in the frontpanel. But I don't want that cluster to show on the front panel, I want to load the settings for the cluster internally from a notebook file. So in my notebook file there is: Type of gage, Bridge Type, Gage Factor and Gage resistance, devided by a tab. When I load this file, the Bridge Type (Full bridge I or Half Bridge II, etc..) needs to be imported automatically on the background, so I don't need to configure each gage on the front panel... It's kinda difficult to explain the program I want...


with kind regards,



0 Kudos
Message 5 of 26

Not being an engineer, some of this goes right over my head.  However, it seems to me that you might be saying that different instruments might need not only different parameters, but different DAQmx functions doing the work.  Well, that's not too difficult (in principle -- this may be much easier for me to say than to doSmiley Wink).


I gather you are planning a notebook file that includes not only a set of parameters but also a Type of Gauge parameter.  Make this an Enum (taking values Full Bridge, Half Bridge, Golden Gate Bridge, etc.).  Have your code include a Case Statement into which you wire the Enum that you choose at Run Time (either by a Front Panel selection or by reading from a parameter file).  Inside the individual Cases you put the code appropriate for the type of Bridge.


Yes, indeed, that was easier to say ...


Does that make sense?



0 Kudos
Message 6 of 26



I think you want to use Notepad, how ever I would recommend you to use a spreadsheet, since it is easier to differenciate the values. How to read from a spreadsheet file, please see this link.


After this works, do you still want to be able to use your controls for settings, or simply write these values as constants in the program and remove these controls from the UI? With that information i can look for further information for you.


Let me know how the reading from spreadsheet works for you.


Best regards,


Collin de Wit
National Instruments
Applications Engineering

0 Kudos
Message 7 of 26
You can also use an ini file to store all of your settings. This is a pretty common approach with numerous examples.
0 Kudos
Message 8 of 26

Thanks to all for replying. 


I'm gonna try to use the spreadsheet thing, and I will let you know how it worked. And indeed, I simply want to write these values as constants... But how do I do this for the value for Full bridge, or Half Bridge, to load this into the bridge information cluster?


with kind regards,



0 Kudos
Message 9 of 26
To write to a cluster, you would use Bundle or Bundle by Name.
0 Kudos
Message 10 of 26