#NEWLINE# def read( self , samples_per_channel = None , timeout = 10.0 ) : #NEWLINE# #INDENT# 'Read multiple 32-bit integer samples from a counter task.\n        Use this function when counter samples are returned unscaled,\n        such as for edge counting.\n\n        :param samples_per_channel:\n          The number of samples, per channel, to read. The default\n          value of -1 (DAQmx_Val_Auto) reads all available samples. If\n          readArray does not contain enough space, this function\n          returns as many samples as fit in readArray.\n\n          NI-DAQmx determines how many samples to read based on\n          whether the task acquires samples continuously or acquires a\n          finite number of samples.\n\n          If the task acquires samples continuously and you set this\n          parameter to -1, this function reads all the samples\n          currently available in the buffer.\n\n          If the task acquires a finite number of samples and you set\n          this parameter to -1, the function waits for the task to\n          acquire all requested samples, then reads those samples. If\n          you set the Read All Available Samples property to TRUE, the\n          function reads the samples currently available in the buffer\n          and does not wait for the task to acquire all requested\n          samples.\n\n        :param timeout:\n          The amount of time, in seconds, to wait for the function to\n          read the sample(s). The default value is 10.0 seconds. To\n          specify an infinite wait, pass -1\n          (DAQmx_Val_WaitInfinitely). This function returns an error\n          if the timeout elapses.\n\n          A value of 0 indicates to try once to read the requested\n          samples. If all the requested samples are read, the function\n          is successful. Otherwise, the function returns a timeout\n          error and returns the samples that were actually read.\n\n\n        :return: The array of samples read.\n        ' #NEWLINE# if ( samples_per_channel is None ) : #NEWLINE# #INDENT# samples_per_channel = self . samples_per_channel_available ( ) #NEWLINE# #UNINDENT# data = np . zeros ( ( self , ) , dtype = np . int32 ) #NEWLINE# ( err , count ) = self . lib . ReadCounterU32 ( samples_per_channel , float64 ( timeout ) , data . ctypes . data , data . size , RetValue ( 'i32' ) , None ) #NEWLINE# return data [ : count ]