qcodes/instrument/visa.py
def device_clear(self) -> None:
        """Clear the buffers of the device"""

        # Serial instruments have a separate flush method to clear
        # their buffers which behaves differently to clear. This is
        # particularly important for instruments which do not support
        # SCPI commands.

        # Simulated instruments do not support a handle clear
        if self.visabackend == 'sim':
            return

        flush_operation = (
                vi_const.BufferOperation.discard_read_buffer_no_io |
                vi_const.BufferOperation.discard_write_buffer
        )

        if isinstance(self.visa_handle, pyvisa.resources.SerialInstrument):
            self.visa_handle.flush(flush_operation)
        else:
            self.visa_handle.clear()
Clear the buffers of the device
Clear the buffers of the device
Clear the buffers of the device
def device_clear(self) -> None:
        if self.visabackend == 'sim':
            return
        flush_operation = (
                vi_const.BufferOperation.discard_read_buffer_no_io |
                vi_const.BufferOperation.discard_write_buffer
        )
        if isinstance(self.visa_handle, pyvisa.resources.SerialInstrument):
            self.visa_handle.flush(flush_operation)
        else:
            self.visa_handle.clear()
def device_clear ( self ) -> None : if self . visabackend == 'sim' : return flush_operation = ( vi_const . BufferOperation . discard_read_buffer_no_io | vi_const . BufferOperation . discard_write_buffer ) if isinstance ( self . visa_handle , pyvisa . resources . SerialInstrument ) : self . visa_handle . flush ( flush_operation ) else : self . visa_handle . clear ( )
Clear the buffers of the device
Clear the buffers of the device
"""Clear the buffers of the device""" # Serial instruments have a separate flush method to clear # their buffers which behaves differently to clear. This is # particularly important for instruments which do not support # SCPI commands. # Simulated instruments do not support a handle clear
self