LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

6533 delay trigger

I have noticed an occasional pattern in the detected lag in sampling of data.  When there is a severe occurrence, the jump(delay) appears in the data every 10 samples.  I have the code set up to read all CAN samples, and therefore Digital input samples, from the buffer every 100 ms, which = 10 samples @ 10 ms per sample, so it seems it may be related to the reading of the buffered data.

I am also using a DAQmx Read property node at every buffer read.  I am setting the Read properties "Relative to" and "offset" to 'Most current sample' and '0'.  Could I simply move this read property node to the initialization case where the DAQmx task is created?  Could repeatedly setting these properties to the same values at every read cause a delay in digital input card sampling?

Thanks

Jason

0 Kudos
Message 11 of 14
(1,086 Views)
Howdy Jason,

You definitely do not need to set a property node at each read.  While I'm not sure that is the cause of your delay, it will certainly cause increased CPU usage.  Moving the property node to the initialization case is a great idea.  Try that and see if you see any better performance.  Have a great day!
Sincerely,

Chris G in AE
0 Kudos
Message 12 of 14
(1,057 Views)

Thanks for the info.  I have moved the Read property node to the initialize portion of the code.  The delay in sampling issue is still occurring.

Could code that causes the DAQmx Read VI to wait for the requested # of samples to be available cause a lag/delay in sampling by the PXI-6533 card?  Example: Attempt to read 10 samples when only 9 are in the buffer, causing the Read VI to wait (probably around 5 ms) for 10 samples to be available in the buffer before finishing execution?  This is another thing I could try, to only read the # of samples KNOWN to be in the buffer.

I have read somewhere something about a 'pipeline width' of two samples on the PXI-6533.  Does this have any effect on the sampling or buffer reading ability of the card?

Thanks,

Jason

0 Kudos
Message 13 of 14
(1,045 Views)

Hi,

Sampling Rate is not going to be affected by the DAQmx Read VI. If I recall correctly you are using an external clock and this clock is going to control your sampled rate. There is a difference between “Read VI” and the reading of the data into the card. Read VI takes the data from the buffer and puts it into LabVIEW memory while your card is still pushing sampled data through the PCI BUS.

The three Read Status attributes/properties are useful for observing the progress of your acquisition. The Current Read Position is the place in the buffer where the next read begins if the Relative To attribute/property is Current Read Position and the Offset is 0. In any case, the Current Read Position is always where the last read left it. Total Samples per Channel Acquired is the total number of samples per channel acquired by the device and transferred into the buffer. Available Samples per Channel is computed by first calculating the Current Read Position based on the settings of the Relative To and Offset attributes/properties and then subtracting this number from Total Samples per Channel Acquired.

I hope it helps



Message Edited by Jaime F on 03-04-2008 11:35 AM
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 14 of 14
(1,003 Views)