LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquire wrong data at high sampling rate

Hi everyone,

 

I am still new to labview and real time data acquisition. I am trying to continue an experiment from a previous student. I hope someone could help me with my problem. Sorry if the question has already been asked.

 

I have a PXIe-6358 measurement card with PXIe-1073 connected to a real time PC and host PC. I am inputing an AC signal (1 khz, sine wave, 1 Vpp)from a function generator to a channel of the PXIe-6358 and the data will be sent through TCP to draw into a graph for 1000 samples. I am trying to reach the maximum sampling rate of PXIe-6358 which is 1.25MS/s.

 

Basically, I will get 10 cycles of sinusoidal wave for 1000 samples if my sampling rate is at 100 kSamples/s. Everything was fine with my program until the sampling rate is more than 100 kSamples/s. For instance, when I change my sampling rate to 200 kSamples/s, I should get 5 sinusoidal wave cycles, instead I get 8 cycles or sometimes more (not really stable). The CPU load in my real time PC is just 70%, it have not even reach 100%.

 

I am trying to figure out what is the cause of this? Hardware limitation or my labview code? Why my labview code couldn't work at such high rate? If it is hardware limitation, why it is not 100%?

 

I have attached my program that runs in real time PC and host PC. Hope someone could help me out. Thank you in advance.

 

Boon

Download All
0 Kudos
Message 1 of 9
(3,184 Views)

I think you would be much better off getting rid of the timed loop and single point acquisition and acquiring NSamples. You don't even need RT to acquire at the highest sample rate.

0 Kudos
Message 2 of 9
(3,144 Views)

Could you please explain abit more in details?

 

My final experiment needs to use real time system and acquire data at maximum speed. The experiment describe above is just a control experiment to make sure I could write a program that could acquire data from a real time system at maximum sampling rate. Of course discarding RT is out of question.

0 Kudos
Message 3 of 9
(3,127 Views)

A computer can only run so fast.  Even in RT, you are limited by how fast you can cycle a loop.  But the DAQ can constantly acquire data using hardware timing and store it in a buffer.  You can then grab all of the data in the buffer and process as needed.  Reading a single sample at a time and expecting kHz sampling rate is not going to happen.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(3,124 Views)

Thank you for all the replies. You have enlighten me on my experiment. At the end of the day, I need to synchronise digital output with analog input. 

 

I have gone through the wrong way with my control experiment. I should investigate on how fast I could write a digital output rather than how fast I could acquire. 

 

If you don't mind me asking again. I am still not very familiar with creating a labview program that write an input digital signal. I saw a lot of the examples are creating loop. If I were to write digital input into daqmx at extremely high speed, what is the best way to do it? Will I be limit by how fast I can cycle a loop? 

0 Kudos
Message 5 of 9
(3,099 Views)

At first you say "digital output" and then at the end  you say write "digital input into DAQmx". We need to keep the terms straight.

 

In any case, with your board, just like the analog input, the digital I/O can be controlled by clock hardware on the board itself. I/O would not depend on cycling a loop. That would be the least deterministic way to do I/O. Your board has 32 lines that can be timed at 10MHz. Look at the examples that come with LabVIEW. For further help, you need to provide details on exactly what sort of digital I/O you are trying to do.

0 Kudos
Message 6 of 9
(3,089 Views)

I am very sorry for the unclear terms.

 

Actually I am trying to send different digital addresses from my computer to an array of chip and read out the respective data of the correct address. The fastest I could read out a data from the chip is 0.8 us if I were to use the maximum sampling rate, 1.25 MS/s. I would like to read a data from the particular address in 0.8 us if possible and the next iteration I would send out another new address and read the data of the new address. Can I write different addresses into daqmx that fast? I should use a loop to write different addresses into daqmx right? If i did not get my understanding wrong, I need to write addresses into daqmx at 0.8 us right? If using loop, would I be limit by my loop and processor speed? 

 

Hope I am not confusing you.

0 Kudos
Message 7 of 9
(3,076 Views)

I don't know where you are getting a max sample rate of 1.25 MS/s. That is for analog input. The digital is 10 MHz as I already said.

 

I'm not sure how fast you can write and then read. Perhaps someone else can provide specifics on this.

0 Kudos
Message 8 of 9
(3,070 Views)

I am very sorry I could not explain more clearly. I am still trying very hard to understand everything. 

 

I will try to understand more and be able to ask in the correct direction. Thank you all for the prompt replies from everyone. 

 

I apologise if all my questions do not make sense.

0 Kudos
Message 9 of 9
(3,061 Views)