LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set configuration to "Finite Samples," but getting "Continuous Samples"

Hi, everyone. I'm fairly new to Labview, and I'm not exactly sure why I can't get a finite number of data points. I am using an NI PCIe-6323, and using the sample clock found under Daq MX in Measurement I/O of the functions pallet. I had originally set the sample mode to "Continuous," but recently wanted to change the mode to "Finite Samples," adding a samples per channel number as well. I try to wire a number into the samples per channel node, but when I click on the daq timing icon, the default never changes from 1000. When I run the program, it never acquires a finite number of samples. I tried taking the while loop out, but then it only acquired 104 samples at .01 second increments (I'm guessing it just used the default value of 1000 samples per channel). How can I take finite samples with my data? What I would like to do is have a # of samples equal to a function of user-inputted variables, but it doesn't seem to be working at all. Any help would be GREATLY appreciated. I am trying to get this project done in a couple days.

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

Hi there,

 

First of all, I cannot download your VI; I'm not sure what the problem with upload was, but it doesn't look like it was done correctly.

 

As far as "clicking on the daq timing icon", I assume you mean that you double-clicked it to show the "DAQmx Timing (Sample Clock).vi" sub-VI?  The values (such as 1000 for the samples per channel or for rate) are simply shown as the default (in other words, the values it'd use if you do not wire anyting to that input); when the program runs, it certainly does use whatever values you wire into it on the main VI.

 

As far as further trobuleshooting, definitely check out the Detailed Help for this DAQ Timing function.  I like to use Ctrl+H to open the context help, and then, hovering over the function on the block diagram, it shows the option to open Detailed Help.  This will show you exactly what each  input to the function does.

 

I get the impression that running this inside of one or more while loops may be causing issues, although I cannot see your VI.

 

Hope this helps,

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,425 Views)

I suspected the while loop to be the problem, but when I remove the while loop it runs on the default value and takes the default value of samples even though I have my own value wired into the Daq timing feature. I've tried  reuploading my code.

Download All
0 Kudos
Message 3 of 5
(2,419 Views)

I don't understand. Both programs have a loop and both programs are acquiring exactly 100 samples in finite mode. What do you think finite mode is supposed to do? Do you think the loop will stop after x number of samples?

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

Oh, I see what I did wrong now. Sorry about the uploads. I uploaded the wrong file. But I had to change the loop to a for loop, and make the iteration number the number of seconds I wanted the program to run. Wow. Thanks, everyone.

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