code: def stop(self):
          
          try:
              self.aitask.stop()
              self.aotask.stop()
              pass
          except:     
              print u"No task running"
          self.aitask = None
          self.aotask = None
docs: Halts the acquisition, this must be called before resetting acquisition