I am trying to improve the efficiency of my vi as much as possible and was wondering if anyone has any tips, tricks, or corrections. The vi is a temperature monitor that will be built into an exe application. The front panel has numeric indicator for temperature and a waveform chart that will record temperature over the course of a week so it need to be memory efficient. There are also other programs on the computer that will be running alongside this vi so Im also trying to make it the least CPU intensive as I can.
My vi reads the voltage drop across a thermistor using a Labjack( this part of the code will replaced soon with Daqmx when my ni daq comes in the mail). Voltage data is collected at 5 samples/second and the average of those samples is fed into an event structure that times out every second. The event structure calculates the temperature from the voltage and displays the reading on the front panel and also adds it to a waveform chart. I have designed it so the temperature indicator is updated every second while the waveform chart will update less frequently to save memory. In the final build the waveform chart will update every 1 minute, 5 minutes or 10 minutes. depends how efficient I need it.
I used a Case Structure inside the event case to control when the waveform chart updates the while loop iteration is divided by a number to be determined and if the remainder is 0 the chart updates. Is there a way to do this operation so that the case structure inst continuously polling?
shown in the second image is the sequence structure containing the while loop. The first sequence when it starts up is it reads default values from a text file and writes them to local variables. The last sequence writes the local variables to the same file.
Any help is appreciated, Thanks!