03-29-2015 08:57 PM
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:  Set Channels
With kind regards,
03-29-2015 09:52 PM
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".
03-29-2015 10:51 PM
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).
03-30-2015 06:21 AM
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.
03-30-2015 08:58 AM
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,
03-30-2015 09:38 AM
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 do).
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?
04-01-2015 08:20 AM
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. http://zone.ni.com/reference/en-XX/help/371361L-01/lvhowto/reading_from_spreadsheet/
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.
Collin de Wit
04-01-2015 09:00 AM
04-01-2015 10:54 AM
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,
04-01-2015 10:56 AM