03-16-2023 03:57 AM
Hello,
I am a novice labview programmer so would welcome advice on the best way to achieve my intended goal. My target is to record capacitance and tan delta as a function of temperature with a control setting the interval between measurements i.e. every n degrees..
In terms of hardware I have the following
1) An oven that is programmed to cycle from +85°C to -45°C. It is not controlled via labview but by an in-built controller. The program does not dwell at any temperature and simply reduces in temperature at a linear rate.
2) An NI USB-TC01 thermocouple measurement device. USB-TC01 - NI
3) A Keysight capacitance meter, E4981A.
I have already made a program that records the temperature, capacitance and tan delta every n seconds. The time between measurements is set with a control on the VI front panel. Once at the stop temperature the data is logged in an excel file in accordance with my template. See below.
From labview I envisage that I could set the start temperature (e.g. +85°C) with a control on the VI front panel, the increments to measure set with a control on the VI front panel (e.g. every 5°C record capacitance and tan delta), an upper and lower tolerance on the temperature to record at set with a control on the VI front panel (e.g. +/- 1°C) and finally a stop temperature set with a control on the front panel (e.g. -45°C) at which point the data will save to an excel template and stop the program. I only require 1 record at each temperature so don't need for example 5 measurements at 85°C, I just need 1 result.
Welcome your thoughts on the best way to achieve the above.
Kind regards,
J
03-16-2023 04:20 AM
Hi J,
@jb-ctuk wrote:
I am a novice labview programmer so would welcome advice on the best way to achieve my intended goal.
As can be seen by your snippet… 😄
What's the point of the loop in the first frame? It's greedy and it will stop on first iteration or never…
@jb-ctuk wrote:
Welcome your thoughts on the best way to achieve the above.
Convert your VI into a proper statemachine.
Then all you need to do is to implement a proper decision when to call the "save data" state, based on temperature instead of time data!
03-16-2023 04:34 AM
GerdW,
The loop has a shift register to record the data point and add it to the graph. The program does work and doesn't stop on first iteration. As I say I am a novice so just went with what seemed to work.
I will look into state machine solutions. Thank you.
J
03-16-2023 04:40 AM
Hi J,
@jb-ctuk wrote:
The loop has a shift register to record the data point and …
The small loop inside the first fram of that sequence structure has no shift register.
And it will either stop immediately or run FOREVER…
03-16-2023 04:59 AM
GerdW,
Apologies, I missed that you said inside of the first frame. As you have correctly stated it has no shift register. It must be running forever then as the program runs and collects data.
Kind regards,
J