code: def register_callback(self, fun, npts):
          
          self.callback_fun = fun
          self.n = npts
          self.AutoRegisterEveryNSamplesEvent(DAQmx_Val_Acquired_Into_Buffer,
                                              npts, 0, name=u"_run_callback")
docs: Provide a function to be executed periodically on 
          data collection, every time after the specified number 
          of points are collected.
          
          :param fun: the function that gets called, it must have a single positional argument that will be the data buffer read
          :type fun: function
          :param npts: The number of data points collected before the function is called.
          :type npts: int