04-26-2017 07:16 AM
Good afternoon Labviewers,
I need to make a linear calibration of a thermocouple using Labview 2012.
As I don't have the physical sensor yet, I'm simulating the signal, but in the future I will change this simulation to a voltage aquisition using DAQ USB-6229.
Nevertheless, In the main vi I'm showing the voltage (provisionally, only to check if the readings are correct) and the temperature, which is the result of a linear conversion of the measured voltage (y=mx+b). The calibrations values (x and y) are read from a txt datasheet and linearized then.
In a sub vi which runs when the user clicks "sensor calibration" button, the parameters that are being used in the moment are shown, and if the user wants to update this values there is a button that will call another vi in which it would be able to update the values and write them in the calibration txt datasheet.
The vi runs well, but the new calibration values are not updated unless the vi is stopped and re run (since I can't figure out a way for the new calibration to be read immediately after clicking "ok" in the new calibration).
Could anyone give me some hints about how could I make them input in the main vi immediately and forget the old values?
I'm kind of new in Labview and haven't been able to make this work.
Please find attached the screenshots of the vis.
Thank you in advance.
Solved! Go to Solution.
04-26-2017 08:02 AM
04-26-2017 08:16 AM - edited 04-26-2017 08:28 AM
Not commenting on your actual code (you should attach VIs and not pictures!), but about your hardware.
The NI USB-6229 (http://sine.ni.com/nips/cds/view/p/lang/en/nid/203482) is not suitable for thermocouple measurements. You need to use an amplifier to get a measurable voltage for your USB-6229 DAQ hardware, or you can purchase dedicated TC DAQs from NI:
http://www.ni.com/white-paper/7108/en/
edit: about your programming related question: I believe you need to use configuration files (.ini). Your application can save and load configuration files, to save and load calibration parameters...
edit2: never use two Event Structures in a VI!
04-27-2017 02:40 AM
Thank you both for the valuable input!
I included all suggestions in my vi and now it's working.
Cheers!
Vanessa