Forum Italiano sui Prodotti NI

annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

time difference between 2 consecutive acquisition on USB-DAQ

Hello,
 
I'm using a USB-6009 to acquire 7 analog inputs (most of them sinusoidal 50/60 Hz).
The sampling rate is 5120 and everything works fine.
I would try to measure the phase difference between 2 acquired signals.
To verify the acquisition and the algorithm used, I connected the same signal on 2 analog inputs (ai0 and ai6).
 
The outcome of the test indicate a phase shift of 125us ( --> 20,83us between two consecutive channels). This seems to indicate that the A/D converter inside 6009 works at 48kHz even if I configured a slower acquisition.
 
Can anyone confirm if this is correct, or maybe I have a bug in my algorithm?
 
Thanks a lot
 
I use CVI8.0 / NI-DAQmx 8.0.0f0 / Windows XP
 
baloss
 
0 Kudos
Messaggio 1 di 5
5.442Visualizzazioni

USB 6009 effectively is a 48 kS/s device, that is this board is capable of acquiring 48000 measures/second (= sample / second). This capability is to be divided by the number of channels acquired to derive the maximum sample/second/channel rate: if you are acquiring 2 analog signals you may sample each of them no faster than 24000 times/second. This speed is referred to as the scanning rate (= scans / second), that is the speed at which a complete set of measures is acquired on all channels.

However, these are the maximum available sampling / scanning rates but in the software this speed can be reduced, as you are doing in your application. Now, the speed you have set in your application is the scanning rate: you are acquiring 5120 measures per second per channel (or scans per second), while within each scan the board is working at its maximum speed (48 kS/s).

This permits to achieve the maximum available contemporarity between acquisition on various channels, nevertheless this lag between measures exists and is to be considered in designing an application: it may be relevant or not, depending on which processing is required on signals. Only the "simultaneous-sampling" devices effectively reduces this lag to zero via the use of sample-and-hold technology inside the board.

 

...infine, siccome questo è il forum per noi utenti italiani, puoi tranquillamente usare l'italiano per i messaggi inseriti qui dentro! Smiley Strizza l'occhio

Message Edited by Roberto Bozzolo on 07-05-2006 11:51 PM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Messaggio 2 di 5
5.435Visualizzazioni

Ciao Roberto,

grazie per la spiegazione sul funzionamento della scheda USB. Questo conferma le misure da me fatte.

In merito alla lingua, solo dopo aver inoltrato il post mi sono reso conto che ero nel forum italiano...

 

Grazie

 

0 Kudos
Messaggio 3 di 5
5.424Visualizzazioni

Alla risposta eccellente di Roberto, mi permetto di aggiungere che, se e' necessario, il DAQmx consente di variare l'Inter-Channel Delay (DAQmx lo chiama channel clock), ovvero il tempo che l'ADC aspetta tra un canale e il successivo in una scansione.

Di default, l'interchannel Delay viene impostato al massimo della velocita' possibile per l'ADC. Essendo su questo device la velocita' massima pari a 48 KS/s, l'interchannel delay viene impostato a 1s / 48k = 20.83 us. Questo e' possibile cambiarlo e aumentarlo fino al massimo consentito dalla scan rate selezionata per l'acquisizione, in questo caso 5120 S/s.

Questo Knowledge Base riporta le indicazioni necessarie per la programmazione di quanto scritto sopra

 

AlessioD
National Instruments

0 Kudos
Messaggio 4 di 5
5.424Visualizzazioni

Ciao Alessio,

ho provato a seguire il tuo suggerimento per variare il channel clock.

Non sono però riuscito a configurarlo:

ho provato a modificare sia l'attributo " DAQmx_SampClk_Rate" sia il "DAQmx_SampClk_Timebase_Rate" nella funzione DAQmxSetTimingAttribute (provando l'uno, laltro o entrambi), ma l'acquisizione era sempre a 48kS/s. (Nota: dopo la chiamata a "DAQmxSetTimingAttribute" ho sempre eseguito la chiamata a "DAQmxCfgSampClkTiming" configurandola sempre a 5120). È possibile che l'USB 6009 non supporti tale funzione?

In ogni caso devo dire che la spiegazione di Roberto é stata sufficiente, e che ora riesco ad ottenere una precisione sufficiente correggendo la misura di fase con il ritardo tra i due canali in questione.

Grazie comunque per i suggerimenti

 

 

 

0 Kudos
Messaggio 5 di 5
5.411Visualizzazioni