LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

single samples for loop daqmx

Hi,

I'm trying to sample a burst of samples at one time, I have set up a DAQmx READ vi in a FOR LOOP and have it set up for single samples and tied the N of the FOR LOOP to a control so I can vary how mayny times it samples... but my problem is that I can't go past 100, it works fine until N > 100.  I don't know why.  This is my error message, my vi is included.

Much Thanks

Possible reason(s):
Measurements: Attempted to read a sample beyond the final sample acquired. The acquisition has stopped, therefore the sample specified by the combination of position and offset will never be available.

Specify a position and offset which selects a sample up to, but not beyond, the final sample acquired. The final sample acquired can be determined by querying the total samples acquired after an acquisition has stopped.

Attempted to Read Sample: 100

Property: RelativeTo
Corresponding Value: Current Read Position

Property: Offset
Corresponding Value:


Task Name: Voltage_1

0 Kudos
Message 1 of 3
(2,660 Views)

I cannot reproduce the error. I ran it with number of samples = 10000. Since you are using a task in MAX and no one has any idea how you've setup that task, why don't you do everything in the VI instead (channel select, range, timing, etc) so that information is available? I suspect you've got something wrong with the timing.

Not sure why you are acquiring data in this fashion anyway. You have no control over the sample rate. You aren't even attempting to set the sample rate, for that matter.

0 Kudos
Message 2 of 3
(2,654 Views)
Hi Monse,

what happens when you use "DAQ Read, 1Chan NSamp" instead? Can you aquire more than 100 samples then?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,649 Views)