Generic Instrument Types Mixins

You can use these Mixins as additional parent classes for your instrument. For more informations, see Common instrument types.

class pymeasure.instruments.generic_types.SCPIMixin(*args, **kwargs)

Mixin class for SCPI instruments with the default implementation of base SCPI commands.

check_errors()

Read all errors from the instrument.

Returns:

list[list[Union[float, str]]] – List of error entries.

property next_error: Any

Get the next error in the queue. If you want to read and log all errors, use check_errors() instead.

class pymeasure.instruments.generic_types.IEEE4882Mixin(*args, **kwargs)

Mixin class for IEEE 488.2 protocol instruments with the default implementation of base commands.

clear()

Clear the instrument status byte.

Return type:

None

property complete: Any

Get the synchronization bit.

This property allows synchronization between a controller and a device. The Operation Complete query places an ASCII character 1 into the device’s Output Queue when all pending selected device operations have been finished.

property id: Any

Get the identification of the instrument.

property options: Any

Get the device options installed.

reset()

Reset the instrument.

Return type:

None

property status: Any

Get the status byte and Master Summary Status bit.

Legacy compatibility

class pymeasure.instruments.generic_types.SCPIUnknownMixin(*args, **kwargs)

Preserve assumed SCPI support for existing instruments with unverified command sets.

This mixin is a transitional compatibility aid for drivers written when instruments included SCPI commands by default. It does not detect or verify SCPI support.

Do not use this mixin in new instrument drivers. Use SCPIMixin when the instrument supports its commands, or IEEE4882Mixin when only its IEEE 488.2 commands are supported. Otherwise, inherit from Instrument without either mixin and implement the commands the instrument supports.