LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking Data from Multiple AI0 and AI1 Using NI-DAQ 6002

Solved!
Go to solution

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?

hsp0808_0-1657805697210.png

 

Download All
0 Kudos
Message 1 of 6
(381 Views)

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.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 2 of 6
(368 Views)

Hello,

 

I attached the VI file. I used the "save for previous" and selected 18. I also attached the version 2020 file.

Download All
0 Kudos
Message 3 of 6
(347 Views)

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). 

0 Kudos
Message 4 of 6
(341 Views)
Solution
Accepted by topic author hsp0808

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_Price_0-1657819242195.png

 

-Kevin P

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?

(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).



0 Kudos
Message 5 of 6
(333 Views)

That worked, thank you!

0 Kudos
Message 6 of 6
(302 Views)