06-30-2008 02:40 AM
06-30-2008 03:26 AM
06-30-2008 03:39 AM - edited 06-30-2008 03:48 AM
06-30-2008 04:22 AM
06-30-2008 06:33 PM
06-30-2008 09:45 PM
>> I am a bit confused as to why you have used the Digital Edge Counter Task. Is there any particular reason why this task was created?
I need to fire a Timed loop precisely once 125 samples were collected.
06-30-2008 09:55 PM
>>You should transpose the 2D array before saving it using Write to Spreadsheed File....
I understand. But transposing is just data re-ordering for analysis. I am keen to know HOW the data is actually acquired ?
Let me explain :
I switch on a solenoid valve and look for a pressure value. The dynamics of the valve + response of the hydraulics are such that there will be a time delay of about 150 to 200ms between both events. But I was actually getting a delay of 550ms which was ruining my whole sequence.
So just to cross check, I re-coded the timed loop for a fixed 50ms interval and the DAQMX read to acquire just one sample. I exactly got the delay at 200ms repeatedly.
When I revert back to the 125samples @ 2.5kHz, the delay went back to 550ms. Any guesses why this happening ??
07-01-2008 03:59 AM
07-01-2008 06:47 AM
Hi Norbert,
Thanks to your detailed explanation, I think I am now clear on the acquiring process. So in my case the hardware will be running at 2.5 x 7 = 17.5 kHz to satisfy my target rate of 7 channels with 125 samples/ch and at the rate of 2.5kHz ?
But still I am unable to explain the ensuing delay when I use the hardware timed loop. Just to clarify I am enclosing the relevant portion of my code for your study. The RawData array file was the one that I posted earlier ( without transposing ). And the InputArray values are passed to sub VIs for further process through a Functional Global.
Is the 350ms delay because of the "Mean" function inside the For loop ? Has it got to wait for all the 125 x 7 = 875 samples to arrive before it can output the mean values for all 7 channels ? But then as per you, the hardware is now blazing at 17.5 kHz and that still means 875/117500 = 50ms, which is my orginal Timed loop target value..
I am still in the dark as to why there should be a 350ms delay when using the above scheme as compared to a 50ms software timed loop and with 1 sample per channel rate?
07-01-2008 07:19 AM
- Another point I am not clear is the way the Digital Edge counter generates the Timing Source for the Timed Loop. It has been wired with a value of 125 counts for generating the trigger for the Timed Loop. And our hardware is running at 17.5 kHz to meet the 125 samples x 7 channels @ 2.5kHz rate. This means that the Timing Source will see 125 samples in 125/17500 = 7ms approx. So how does the Timed Loop fire once every 50ms ?