07-24-2007 11:44 AM
07-25-2007 07:14 PM
Hello Noidea,
I would suggest converting both DAQ Assistants into DAQmx code. (Right-click on the DAQ Assistant >> Generate NI-DAQmx Code) If they are both continuous, you might want to make sure that you setup the sampling rate and samples to read correctly. The samples to read should be approximately 10% of the sampling rate. (e.g. Sampling Rate: 1kHz and Samples to Read: 100) The samples to read will be your buffer size under continuous acquisition mode.
You could also try to separate while loops for each task once you convert the DAQ Assistants into DAQmx Subvis. The last error that you received (-200279) is telling me that you were overrunning your buffer. (Help >> Explain Error) I don’t think that you are reading from each DAQ Assistant fast enough. One DAQ Assistant is should be acquiring data 100 faster than the other DAQ Assistant. Therefore the slow DAQ Assistant is preventing the faster DAQ Assistant from overwriting its buffer.
07-25-2007 08:17 PM
07-26-2007 07:57 AM
07-26-2007 01:17 PM
Hello Noidea,
The cDAQ-9172 only has one hardware timing engine onboard
for analog inputs. This is the master
clock that will tell the hardware when to actually acquire data. You could create a clock pulse using a
counter and use that signal for data acquisition. (Help >> Find Examples >>
Hardware Input and Output >> DAQmx >> Generating Digital Pulses
>> Gen Dig Pulse Train-Continuous.vi)
You can only access the
counters on the cDAQ from slots 5 & 6. (Great KnowledgeBase)
You would need to synchronize by tasks. (Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Synchronization >> Multi-Function >> Multi-Function AI-AO.vi) This example demonstrates how to make one task a slave and the other a master. Start the slave task first and have it trigger when the master task starts. Once the master task starts, the slave task will start at the same time and both of the tasks will by hardware synchronized.
07-26-2007 02:16 PM
07-27-2007 09:03 AM
Neil,
What Time Averaging VI settings would you recommend?
08-03-2007 05:27 PM
Hello Noidea,
You want to average all 1k points from each thermocouple signal produced from the DAQ Assistant. You have two choices for weighting the data, linear and exponential. Each method has its advantages and disadvantages.
Linear averaging mode will give each sample equal weight. Exponential averaging mode will give the most recent sample more weight then older samples. This way more emphasis is given on the most recent samples.
New Average = New Spectra * 1/N + Old Average * (N-1)/N
Where N is the number of averages for linear averaging, or is computed from the time constant for exponential averaging.
Exponential Average provides a continuous weighted averaging while Linear averaging will average a selected number of measurements and stop the analysis process.
08-04-2007 03:12 AM
check this link also for downloads