09-01-2010 12:56 AM
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.
09-01-2010 03:05 AM
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
09-01-2010 04:32 AM
Thanks for the reply! The problem is, that if i change to continuous, it will not wait on the triggersignal of the digital input.
09-02-2010 02:09 AM
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?
09-02-2010 11:04 AM
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