LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Sampling Interval

Solved!
Go to solution

Greetings,

 

I have two probably related issues. One issue is that I'm trying to use an interval to retrieve data from a continuously sampling DAQ card (I've tested this on a 6361 and also a 16XE-10). When I run the code, I specify a sampling rate and a sampling interval to choose the number of samples to receive. The number of samples to read should gate how long the read operation takes, however, the time it takes to complete this operation is never my specified sampling interval which doesn't make a lot of sense to me. Furthermore, the dt for my data is always 0 as if it doesn't really know the sampling rate. This is probably a stupid error where I'm forgetting to set a parameter but maybe someone can see my error and point it out to me. Thanks for the help.

 

Attached is an example vi that should demonstrate the issue.

0 Kudos
Message 1 of 7
(3,283 Views)

I can't look at your VI on my internet computer, but one of these liknks might have the answer you are looking for or clear things up a bit.

 

http://digital.ni.com/public.nsf/allkb/8EF7084B908ABF6686257589007C97DF

http://digital.ni.com/public.nsf/allkb/2EE52DE8B5AD73AD86257C0B004FF4A9

0 Kudos
Message 2 of 7
(3,278 Views)

I had seen these links. I believe I understand them and that I'm implementing their suggestions properly. I could be wrong. Thanks for the help though.

0 Kudos
Message 3 of 7
(3,267 Views)
I can't view your VI either at this time. Can you post an image. I'm guessing that you have the DAQmx Read set for 1Samp instead of NSamp.
0 Kudos
Message 4 of 7
(3,262 Views)

pic 1.png

0 Kudos
Message 5 of 7
(3,253 Views)
Solution
Accepted by topic author majoris

The default sample timing type is "On Demand" and it doesn't look like you have changed it.  Why not just call DAQmx Timing.vi to set the sample clock parameters?  It wraps the property nodes that configure sample clock timing:

 

DAQmx Timing (Sample Clock).png

 

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 7
(3,247 Views)

Yes. This was it. I read the SampTimingType and it said "On Demand".

 

I had actually initially used the DAQ Assistant then I exploded all the VIs so I could get better control of what was happening (I actually do this every time I do a DAQ related project). Either I lost the SampTimingType along the way or I improperly setup the DAQ Assistant.

 

Thanks for pointing this out.

0 Kudos
Message 7 of 7
(3,232 Views)