LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquiring and generating signals

Solved!
Go to solution

I am not using DAQ assistant, in the attached block diagram I am trying to write more than 1000 samples but it is showing that the maximum samples which are successfully written per channel is 1000, which the point of my confusion. I opened Multi-Function-Synch AI-AO.vi.  and it is running without any error. on 6221 and also 6361 I am sampling on one channel and I am keeping my sampling rate within 250kS/s on 6221 and under 2MS/s on 6361.  In my earlier posts  I was asking why am I getting a long time when I increase the samples/channel in the DAQmx read vi. to more than 1000 samples per channel but then I found out that the maximum number of samples wrote successfully by DAQ write vi is 1000, so I thought I am trying to read more samples then is actually available may be that is why I am getting a long delay in reading. Would you please tell me how to successfully write more than 1000 samples per channel using DAQ write vi.

 

Raj

Undergraduate Research assistant.

Iowa State University.

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 31 of 54
(1,160 Views)

raj_iastate

 

I think what might be happening is that you are reaching the limits of the onboard memory of the device. I believe that the on-board memory is 4095 samples for both the 6221 and the 6361. You are essentially telling your AI Read VI's to wait until all the samples are acquired before reading the samples from the onboard memory of the device. 

 

To allow the PC to pull samples from the card, you should try putting your Analog Input Read VIs in a while loop so you can read the data in chunks, like they do in the Multi-Function-Synch AI-AO example. 

 

 

Leah

 

 

0 Kudos
Message 32 of 54
(1,140 Views)

So it means that I can't generate more than 4095 samples per channel ? Can you please explain or give me a link to read how the memory is filled while generation. And also how come I am reaching the limit at 1000 samples per channel and not 4095 samples. ?

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 33 of 54
(1,135 Views)

You can acquire more than 4095 samples per channel, but you just have to read it in a loop to ensure that samples are being read from the hardware buffer on the card. If the Read VI is not in a loop, this will never happen. 

 

I would refer to this documentation for more information:

http://digital.ni.com/public.nsf/allkb/3E3D74E26B8A5B83862575CA0053E4B5

 

The following sentence from this document explains why you are only reading 1000 samples:

 

"The Number of Samples Per Channel determines how many samples are pulled from the hardware buffer to the software buffer. It is recommended that the number of samples be 1/10th the rate specified on the DAQmx Timing VI.  For example, if the rate input on the DAQmx is 1000 (Hz), then the number of samples per channel should be no more than 100.  This is to ensure there are not buffer overwrite or underwrite errors." 

 

Hopefully that information is helpful. 

 

Leah

0 Kudos
Message 34 of 54
(1,126 Views)

I am stilll not able to write more than 1000 samples per channel, can you please tell me how to achieve this and what am I missing ?

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 35 of 54
(1,106 Views)

Can you include your code that has a while loop around your Read vis? The picture that you attached only shows half of your code, so I can't tell if you implemented those while loops. 

 

Leah

0 Kudos
Message 36 of 54
(1,103 Views)

salut tout le monde

j'ai un problème comment organisé mon projet sous labview2012,j'ai besoin d'aide comment commençais mon projet.

Résumé:

Le projet vis à développer une chaîne de mesure et d’acquisition pour l’étude de l’activité physique humaine sur ergocycle lors de tests standardisés. C’est pourquoi, le système intègre la mesure de grandeurs biomécaniques (déplacement segmentaire, force développée) et électrophysiologiques (électromyographie, électrocardiographie). Ce système doit permettre à l’opérateur une gestion des paramètres de mesure du test sélectionné et au sujet de l’expérimentation un retour visuel sur son activité de pédalage .

Acquisition Multivoies:Ce système sera composé d’un ensemble de capteurs ;

-2 voies pour déplacement du pédalier (avec capteur et carte DAQ et affichage sur PC)

-2 voies pour  les forces appliquées sur chaque manivelle du pédalier  (avec capteur  et carte DAQ et affichage sur PC)

-1 voies les positions angulaires des segments impliqués dans le mouvement de pédalage (avec capteur  et carte DAQ et affichage sur PC)

-8 voies pour l’activité électromyographique  (avec capteur  et carte DAQ et affichage sur PC)

-1 voues pour L’activité électrocardiographique  (avec capteur  et carte DAQ et affichage sur PC)

j'attend la réponse

Merci

 

0 Kudos
Message 37 of 54
(1,093 Views)

abdelhak34t,

 

Since your post is unrelated to the present thread, I would recommend starting a new thread. This way, people will be more likely to respond if there is a relevant title to the discussion forum. 

 

Leah

0 Kudos
Message 38 of 54
(1,072 Views)

here is the code with the needed parameters, I want to sample at the highest frequency possible for each device. Dev 1 is 6361 and dev2 is 6221. My requirement is that I want to generate samples at the rate of 2M samples/sec and read at the highest possible sampling rate. This code is getting error 200019 and 200278. Please let me know what is my mistake. The reason I wanted to control the number of samples written at dev1 is because I want to control the number of cycles of sine wave to write at a given frequency.

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 39 of 54
(1,067 Views)

It looks like you are sharing a sample clock between your two devices. Because of this, you can't set your sample rates to two different rates for your devices. Even though the 6361 has a max sample rate of 2MS/s, you won't be able to exceed 250kS/s becuase that is the limitation with your 6221. 

 

I would try lowering your sample rate until you no longer recive an error. Also, you should make sure that your sample rates are the same for the two devices. 

 

Leah

0 Kudos
Message 40 of 54
(1,028 Views)