LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq 6008 acquire 10 analog signals with external 3 external multiplexer

The LabVIEW Help files contain much useful information.  Sometimes it is tricky to find the parts you are looking for, especially if you are unsure of the terminology.

 

Example VIs which come with LV are also useful. Many of the examples have improved documentation in newer versions of LV than the one you are using.

 

Yes. Use a common ground for all the voltages connected to the USB-6008. That ground is connected internally to the USB ground and to the computer ground.

 

The mux commutation and the sampling rate are not closely correlated. 

 

Consider this as an example: You want to commute the muxes once per second. Allow 0.1 second for switching the muxes, for settling time, and for saving data to file. That leaves 0.9 second to acquire data. You could set the rate to 1250 S/s for 8 channels. Use a finite acquisition and acquire 1125 samples (per channel). For the DC voltages you could average those samples to get a single reading per second. For the AC voltage you could display the waveform (provided the frequency was below the Nyquist limit of 562 Hz).  Many other combinatiosn are possible.

 

To save data in a format which Excel can read the easiest thing is to use Write To Spreadsheet File.vi.  You wire an array of data and a file path and it writes the data to a tab-delimited text file.

 

Your charts will not work as you have them connected. Because they are outside the loop, they will only update after the loop stops and they will only display the last data point.  They need to be inside like the other indicator terminals.

 

Lynn

0 Kudos
Message 11 of 14
(743 Views)

ok, thanks !

 

one more question: how could i set the graph for 1 hour and for 1 day recording and how could i integrate a button to set this 2 options.

 

isma

0 Kudos
Message 12 of 14
(719 Views)

You are using charts, not graphs. A chart accepts data one point at a time and keeps an internal buffer for past data. A graph accepts an array of data (or a waveform) and completely rewrites the plot every time data is sent to it.

 

To allow the user to select the amount of data to be displayed you will need to accumulate the data in a buffer. Probably a shift register with an array data type. To avoid memory allocation problems you will need to initialize the array outside the loop and use Replace Array Subset inside the loop to place the current acqusition into the buffer. Then you use Array Subset to get the part of the data you want to display on the graphs.

 

The best way to manage this may depend on how much data you will be collecting, whether you can keep it all in memory at one time, and the degree of flexibility you will give the user to deternine how to display the data (zoom, sliding indexes, and so on...). Anbother possibility is to read it from the file for display puproses.

 

Lynn

0 Kudos
Message 13 of 14
(708 Views)

Hello Lynn,

 

Could you please be more specific.

What do you mean: to start recording data until we stop the loop and then allow us to select the amount of data (for example day 28.05.2015 start time:15;00 end time 16:00 (for 1 hour option) or day 28.05.2015 start time:15;00 end time 15:00 of 29.05.2015). I think that this will occupy a lot of memory but if i want just to record data when i push the botton and then select the option four 1 hour or 1 day, how it could be??

 

Concerning your last infor, if i use diff config (even without being mandatory as you suggested) then we have 10ks/s rate of daq, that means that daq can make maximum 2500s/S/channel (4 channels max.) and that means that can spent maximum 4ms in each channel becuase of daq internal multiplexing. With my program i set the loop to repeat sequence each 1 second, doest it mean i have to configure the rate of each channel at 250 ms/channel or 0,25Hz minimum, right?? but if i configurate this rate higher than 0,25hz then maybe we took more samples than one we can display because of timed loop 1 sec. this samplings we take are stored somewhere or are being rewrited each time??

 

Sincerely our project specifications are not very good defined, which solution do you think is better, to strore all data in excel since we start program and then generate graphic of specific periods or to store data just when we want it? Because the sampling rate is not defined by the professor we can change it perhaps to 5 sec. or 10 sec. to reduce size  of data buffer.

 

Thanks!

0 Kudos
Message 14 of 14
(680 Views)