LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying data while sampling is in progress

I'm using a cDAQ-9174 for acquiring data. I have two modules to measure 8 thermocouples (4 on each module) and one module to measure 4 analogue voltages.

I'm triggering on a digital signal of a fourth module. The sampling frequencies are 10kHz for the analogue voltages and 10 Hz for the thermocouples. The triggering works fine, but there is another problem:

I want to sample until one of the temperatures measured with the thermocouples reaches its steady state. Now i only get the stuff working by sampling a certain number of samples which have to be defined before the task is started (and so, before triggering). Is there a way to "see" the values before the "DAQmx read"-block has finished?

I don't want to read less samples and restart to sample again because of the missing samples between the two reads.

0 Kudos
Message 1 of 5
(2,555 Views)

If you set the timing of the thermocouple task to 'Continious' you can use the DAQ read function to read '-1' samples. That will read all the samples that are avialable on the DAQ buffer at that moment. No need to finish or stop the task.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 5
(2,535 Views)

Thanks for the reply! The problem is, that if i change to continuous, it will not wait on the triggersignal of the digital input.

0 Kudos
Message 3 of 5
(2,523 Views)

OK, maybe i missunderstand something. I don't exactly know how what the hardware does when I'm using the different VI's.

After setting up a task (channel, clock, trigger) and starting it, what happens? Does the hardware begin to sample (after a trigger occurs) and transfer data to the computer even before using the read-VI?

Is there a good description of how the cDAQ works?

0 Kudos
Message 4 of 5
(2,489 Views)

The online manuals for DAQmx are valid for cDAQ as well (I don't have link ready, sorry), I think you can find them in your windows start menu, LabVIEW help and MAX help.

 

The read VI will read the data (if it's available), you can set the number of samples to read each iteration (or set the number  to -1 this will get all data available at that moment). If you set a number, you can specify a timeout, if the required number of samples is not availble before the timeout happens (10 seconds default) the function will return an error, for instance if the trigger did not happen.

 

If you want to retrigger your task you have to stop the task and restart the task.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 5
(2,468 Views)