Thank you Joe:smileyhappy:
I think you have cleared a few doubts.Correct me if i am wrong but what
u mean to say is that by using the same clock for two tasks they are
not dependant on the sequence of the Read Statements and both the task
data can be correlated. Your answers have made me think a bit more
deeper here it goes( Most of them are basics i'm asking them coz i'm
confused)
"When a hardware-timed measurement is configured, it gets its own memory buffer"
Will my measurement be hardware
timed,I mean as u know my clock will be an encoder which is passed as a
sample clock to the tasks using the change detection event is such a
setup called harware timed?
" As each task receives its start trigger, the buffers begin to be filled with samples with each tick of the sample clock"
I didn't exactly get the start trigger
part are you reffering to the sample clock(change detection-- encoder)
as the start trigger coz i am not using any other triggers?
" When you call a DAQmx Read function, you're asking for the samples in the buffer, not the samples currently coming in"
*Does this mean that the data in the
buffer is filled based on the ticks of the encoder and that data you
are reading using the read function after it is filled in the buffer.So
in that case the data will be continously filled in the buffer
regardless weather i read it or not - right?
There is a lot of ambiguity when it comes to this part. For Example
Create Analog Input
Analog Input Sample Clock = Change Detection Of the Encoder(Rate = 10000, Number Of Samples Per Channel = 72000)
Number of Samples Per Channel = 72000
Read Analog Input (Number of Samples Per Channel = 72000)
*Does the Read statement wait until 72000 samples are acquired or
in other words till the change detection takes place 72000 times.
*Does more Samples Per Channel mean more time to acquire & why
do we have to pass this parameter two times once in the configuration
of the sample clock (DAQmxCfgSampClkTiming) and once in the Read Input Fuction.
*How does the Rate in DAQmxCfgSampClkTiming affect my above
question because pratically what i saw is that when i increased the
rate the Read statement executes faster.
Basically i want to capture data for 5 seconds should i keep on
looping the Read Statement for 5 seconds or should i increase the
number of samples per channel to such an extent that it will capture
data using 1 Read Statement to avoid software timing issues.
"If, however, you can find a common sample clock
that will suffice for both of your analog measurements, then you should
use that one instead."I
have 2 Analog Input modules - 17 lines in that single task.Out of the
those16 lines have to measured at millisecond speed which include
crtitical parameters such as temperature and flow.Only 1 line has to
measure Load which has to have the sample clock as change detection
which as u know has to be correlated with position.I will have a
problem if i set the change detection as the sample clock for the
complete AI task because i will have to assign the same number of
samples per channel for the Load that i have set for position
measurement task which has to be high to avoid software timing
issues.But since the task is common for all the lines the time taken to
read temperature lines will be very high and buffer allocated also will
be high(17*numsamperchan). Even if i use ai/sampleclock for both the
tasks still the samples per channel problem will persist with longer
time taken.Your Thoughts?
One work around that i have thought is as i have said previoulsy is something like this
while( 1 )
{ DAQmxErrChk (DAQmxReadCounterF64(taskHandle,1000,-1,data,10000,&read,0)); if(read)