def read(self, samples_per_channel=None, timeout=10.0):

        if samples_per_channel is None:
            samples_per_channel = self.samples_per_channel_available()

        data = np.zeros((samples_per_channel,),dtype=np.int32)

        err, count = self.lib.ReadCounterU32(samples_per_channel, float64(timeout),
                                             data.ctypes.data, data.size, RetValue('i32'), None)

        return data[:count]
Read multiple 32-bit integer samples from a counter task.
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/legacy/ni/daqmx/tasks.py/CounterInputTask.read