LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature acquisition on USB-Temp

Solved!
Go to solution

Hi,

I'm using a Measurement Computing USB-Temp in order to acquire temperature with several sensors. I've made the attached program for two sensors. The problem is : I have to add a waveform for every sensor I have. So the program will rapidly become unreadable if I want seven or eight sensors.

Do you know a way to correct it ? Maybe with arrays...

 

Sorry for bad english

0 Kudos
Message 1 of 5
(3,489 Views)
Solution
Accepted by topic author simchoots

Yes - instead of having a single waveform on your shift register, change that to an array of waveforms. You can then have your data acquisition in a For loop for the number of sensors you have.

 

Here's a very simple of example of how you can modify your program:

2016-04-19_10-19-41.png

 

Also, be aware that because you are continuously building a waveform, if you run your program for a long time you will eventually run out of memory. You might want to consider looking at the Producer/Consumer architecture so that your logging happens while the data is being acquired, instead of just at the end (it also means you have data if your computer crashes 🙂 ).


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 5
(3,481 Views)

Thank you for your answer ! This is what I needed.

 

What do you mean by "a long time" ? Is it an hour or a day 🙂 ?

 

What if I create a conditional structure in the while loop that save the data when the user press a button ? It would avoid the loss of data.

 

Thanks again

0 Kudos
Message 3 of 5
(3,475 Views)
Depends on how much data you are acquiring and how quickly. Run your program and look at it's memory usage in Task Manager. It will grow over time.

Look at the producer/consumer examples in LabVIEW (or google 'producer/consumer LabVIEW') and you will find examples of how you can use a queue to send your data to another loop for logging.

LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 4 of 5
(3,470 Views)

Okay thanks !

0 Kudos
Message 5 of 5
(3,452 Views)