LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to change the Sample Clock Rate on the fly while performing a continous analog input using a PCI-6221?

I am using a PCI-6221 to perform a continous analog input in order to read a voltage produced by a function generator.  I would like to be able to change the Sample Clock Rate on the fly while the VI is running instead of having to start and stop the program.  I understand E-series devices do not support this property change while the VI is running but is there a way around this?
Thanks
 
Dan Berry
 
0 Kudos
Message 1 of 3
(3,241 Views)
Dan,

there is one point in your understanding, which i am not sure what you think about when talking about it: I understand E-series devices do not support this property change while the VI is running.
infact, you cannot change the sample clock rate during acquisition. but this does not mean that you cannot change it while the VI is running. you have only to interrupt the acquisition. since you want to acquire continuous, this would have the same effect as stopping the vi, i asume.
so the best way to accomplish this task is to use an external clock. this is e.g. often used for acquistion on rotating shafts. the acquistionrate is always e.g. 24 points per revolution regardless of the rotational speed of the shaft, except for a maximum frequency of course.

Norbert B.
NI - Germany

Message Edited by Norbert B on 09-14-2005 04:16 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(3,230 Views)

First, your 6221 is an M-series device, in many ways similar but in certain ways superior to the E-series devices.

Second, one workaround is to use an onboard counter to generate a pulse train that you then use as your AI sample clock.  The counter frequency (and duty cycle) can be changed on-the-fly without a stop and re-start step.  Here's an example.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 3
(3,222 Views)