LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample rate addition

Hello, 

   I am working on a program in which I am measuring the time between photo gates, as sprinters break them for a timing trial. My VI uses the DAQmx Start Task to read voltage triggers from the acquisition device, but I can't specify the sampling rate for the VI. I've tried using the Sample Clock within the VI, but for some reason, that is altering the acquisition of times and reducing their accuracy. How or where can I implement or specify the sample rate for the voltage acquisition, such that the timing isnt changed? I've attached the program I'm working on.

 

Thanks so much,

Patrick

0 Kudos
Message 1 of 5
(2,409 Views)

The correct way to do this is by inserting the DAQmx Timing function, set for Sample Clock, before starting the task.  If this is not working for you, can you upload your VI showing how you used the DAQmx Timing function, and explain in more detail the effect it is having on your measurements?  I don't understand what you mean by change the sample rate without changing the timing - the sample rate determines the timing of the measurements.

0 Kudos
Message 2 of 5
(2,402 Views)

Hello,

  Here is how I attempted to implement the Sample Clock (attachment), is this somewhat accurate? Thanks again for the help

0 Kudos
Message 3 of 5
(2,378 Views)

So how are you setting the sample rate when the control is hidden ? 

 

Could you save your vi with some typical setting and then uploading it again ?

 

I would also set the "Number of sample per Channel" input for the DAQmx read vi. You could set it to 50 or 100 if your sampling rate is 1kHz.

Of cause then you need another way to find out when the max value happend, as you would get 100 samples every 100 ms.

0 Kudos
Message 4 of 5
(2,370 Views)

Don't mind the first question, I was just having to many vi's open.

0 Kudos
Message 5 of 5
(2,369 Views)