Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with reading sample

Hi,

 

I'm using the USB-6001 to gather signal data to the NI MAX and to use the data in a Python script. My issue lies in that when I read the data, it is only limited to 100 samples. Previously when I tested it, there was no limit to how many samples. I've try trying to samples to read and sampling frequency and it's always limited to 100 samples. I've installed NI-DAQmx 19.0 and tried with 14.1, and the code is shown below.

 

import nidaqmx
import matplotlib.pyplot as plt

out = nidaqmx.system.storage.persisted_task.PersistedTask("out")
task = out.load()
data = task.read(10000)
dcOffset = sum(data)/len(data)
peakToPeak = max(data) - min(data)
plt.plot(data)

0 Kudos
Message 1 of 1
(1,708 Views)