LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sampling rate

Hi

    You can check it by acquiring the data (Probably a Sine Waveform) from the Function generator by setting the sampling rate twice that of the generating rate, by starting from the low rate value. If you should get a perfect sine waveform, you can calculate the sampling rate by acquiring and comparing the acquired and generated signal frequency.  and if the sampling rate is kept same as the generation rate then the card should acquire and display a perfect tringular waveform.

I don't know whether its a correct procedure or not but i used to check in the same way for a normal daq card for which sampling rate is already known. 

 

Regards

Visuman

0 Kudos
Message 11 of 21
(1,821 Views)

Is it possibe that when i received first byte from usb daq card on labview then i start the timer and as the second byte is received i stop  the timer then by taking the reciprocal of the sampling period i will get the sampling frequency?

 

If yes then please tell me how to implement this on labview. I think that in this way i will get the approximate sampling frequency.

0 Kudos
Message 12 of 21
(1,807 Views)

Hi

I have found the sampling speed of my usb DAQ card but i can not believe that it is only 12 samples per second . Since the controller pic18f4550 is capable of 12Mbits/sec. I found the sample rate on labview but i can not understand why the sampling rate is so low?

The device pic18f4550 has 16 bi directional endpoints but i am using end-point 1 only. Will it have some effect on sampling rate?

 

0 Kudos
Message 13 of 21
(1,786 Views)
Your posts are getting more confusing. First you asked about sample rate and now you are asking about the transfer speed over your USB connection. Two very diffrerent things. Provide some exact details on what it is you are trying to do. At some point, you are also going to have to provide some details on the implementation you have done with USB and LabVIEW. Right now, it's all a mystery.
0 Kudos
Message 14 of 21
(1,765 Views)

mhs100 wrote:

Hi

I have found the sampling speed of my usb DAQ card but i can not believe that it is only 12 samples per second . Since the controller pic18f4550 is capable of 12Mbits/sec. I found the sample rate on labview but i can not understand why the sampling rate is so low?

The device pic18f4550 has 16 bi directional endpoints but i am using end-point 1 only. Will it have some effect on sampling rate?

 


 

Your question is very strange. First of all your max sampling speed will be limited by your ADC unit specification. Then you program your pic18f4550 to control the sample rate, and transfer data to the PC by USB. Your custom DAQ card and the PC will be two autonomous units communication with each other. I really do not hope you have made some application where your Labview program is controlling the sample rate in a software timed loop. Requesting one sample each time. Because this is a very awkward, and clumsy solution.  


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 15 of 21
(1,740 Views)

Hi

 

I can not understand what are you trying to tell me , please explain me in detail. I am not controlling sample rate in my labview program. How can i increase my sample rate?

 

 

0 Kudos
Message 16 of 21
(1,721 Views)
This is basic knowledge of A/D conversion. The sample rate is the clock rate that is provided to the A/D converter. You seem to be measuring how fast it takes to transfer a single sample over the USB port. They would only have a relationship if you command the device to take a single sample and transfer the single sample. If the device is programmed to use a specific clock and certain number of samples, you would be transfering that number of samples at once - not a single sample at a time. This is why it seems you have an implementation problem with the device/usb. You need to be able to transfer multiple samples at a faster rate than the A/D conversion.
0 Kudos
Message 17 of 21
(1,718 Views)

Hi

 

Basically the device i am using is pic18f4550. You are right that it is programmed to use specific clock which i internally set and it is 48 MHz but the process is cyclic. for example ADC channel 1 reads the analog value and starts conversion.

After conversion ,my IC  performs another tasks and the process is repeated until the time comes when the same ADC channel 1 acquires the analog voltage again. My Question is that how to calculate the time between the two consecutive samples which the ADC acquires.

 

Thanks.

0 Kudos
Message 18 of 21
(1,674 Views)

mhs100 wrote:

My Question is that how to calculate the time between the two consecutive samples which the ADC acquires.


That time depends totally on the program in the PIC.

Since we don't know the program in the PIC, we can't help you on this one Smiley Sad

If it's like you wrote


mhs100 wrote:

... ... but the process is cyclic. for example ADC channel 1 reads the analog value and starts conversion.

After conversion ,my IC  performs another tasks and the process is repeated until the time comes when the same ADC channel 1 acquires the analog voltage again.


We definetly can't help you since the ADC conversion starts randomly.

Who says that all other tasks, processes and so on always takes the same amount of time?

 

If you're PIC code is setup that way, you're sampling rate vary all the time Smiley Sad

You're ADC conversion should be interrupt driven by using a timer of the PIC or an external/internal trigger clock.

See 21.8 Use of the CCP2 Trigger in the PIC datasheet.

 

If you didn't write the PIC code yourself it may be hard to change... ...

0 Kudos
Message 19 of 21
(1,667 Views)

mhs100 wrote:

Hi

 

Basically the device i am using is pic18f4550. You are right that it is programmed to use specific clock which i internally set and it is 48 MHz but the process is cyclic. for example ADC channel 1 reads the analog value and starts conversion.

After conversion ,my IC  performs another tasks and the process is repeated until the time comes when the same ADC channel 1 acquires the analog voltage again. My Question is that how to calculate the time between the two consecutive samples which the ADC acquires.

 

Thanks.


 

If you want precise sampling interval you must use the timers in your pic18f4550 to generate a interrupt for each sample. Then it is not sampling data it can do other things like handling the communication. It seams to me like you have turned the priority list upside down


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 20 of 21
(1,658 Views)