07-14-2022 08:48 AM - edited 07-14-2022 08:55 AM
I'm very new to LabVIEW and I'm trying to write a program that will output the voltage for a thermistor and photoresistor circuit. The circuit consists of (attached) two voltage-divider circuits - one for the thermistor connected to AI1 and one for the photoresistor connected to AI0 of an NI-DAQ 6002. The program allows you to input photoresistor and thermistor values and a file path. We want to output data points went the "press to acquire" button is pressed.
While testing the program, the temperature graph was a reversed mirror of the illuminance graph (screen recording attached). Also, when the data outputs, the headers in the csv file repeat every time a point is acquired (screenshot below). I attached a PDF of the program -- is there a way to ensure the Thermistor and Photoresistor voltage outputs are separate and output accurate readings?
Solved! Go to Solution.
07-14-2022 09:00 AM
There is not much anyone can tell you without seeing your code so post it here. If you are using a new LabVIEW version (2020-2021) I suggest you back-save to 2018 or so using the Save for Previous... That way more people can open it.
07-14-2022 10:00 AM
Hello,
I attached the VI file. I used the "save for previous" and selected 18. I also attached the version 2020 file.
07-14-2022 10:58 AM
The photoresistor is now completely functioning. The thermistor is showing the correct data, but the graph is still running backwards (showing the most recent value at t=0).
07-14-2022 12:21 PM
The specific problem of the "backwards graph" is because you are PRE-pending your new data point to the beginning of the cumulative array of data. Build array works from top to bottom, so you need to connect your new data to the bottom of that node to *append* it at the end.
-Kevin P
07-15-2022 07:38 PM
That worked, thank you!