LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Input a value initally from a datasheet, then refresh it from a subvi

Solved!
Go to solution

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.

 

0 Kudos
Message 1 of 4
(2,764 Views)
Solution
Accepted by topic author Vanessa86

Hello Vanessa,

Use a shift register and wire it to your new slope and intercept from the "temps calibration VI"

Here is a solution :

temp calib.PNG

In the "false", you just wire the inputs with the outputs

And you don't need the flat sequence for what you want to do.

 

Yddet

Message 2 of 4
(2,729 Views)

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!

0 Kudos
Message 3 of 4
(2,719 Views)

Thank you both for the valuable input!

I included all suggestions in my vi and now it's working.

Cheers!

Vanessa

0 Kudos
Message 4 of 4
(2,680 Views)