qcodes_contrib_drivers.drivers.Newport package

Submodules

qcodes_contrib_drivers.drivers.Newport.AG_UC8 module

QCoDeS driver for Newport AGILIS AG-UC8 Piezo Stepper Controller.

exception qcodes_contrib_drivers.drivers.Newport.AG_UC8.Newport_AG_UC8_ErrorCode(cmd: str, err: int)[source]

Bases: Newport_AG_UC8_Exception

exception qcodes_contrib_drivers.drivers.Newport.AG_UC8.Newport_AG_UC8_Exception[source]

Bases: Exception

class qcodes_contrib_drivers.drivers.Newport.AG_UC8.Newport_AG_UC8(*args: Any, **kwargs: Any)[source]

Bases: VisaInstrument

QCoDeS driver for the Newport AGILIS AG-UC8 Piezo Stepper Controller.

Parameters:
  • name (str) – name of the instrument.

  • address (str) – VISA string describing the serial port, for example “ASRL3” for COM3.

ask_channel(channel_number: int, cmd: str) str[source]

Select specified channel, then apply specified query and return response.

get_idn() Dict[str, str | None][source]

Parse a standard VISA *IDN? response into an ID dict.

Even though this is the VISA standard, it applies to various other types as well, such as IPInstruments, so it is included here in the Instrument base class.

Override this if your instrument does not support *IDN? or returns a nonstandard IDN string. This string is supposed to be a comma-separated list of vendor, model, serial, and firmware, but semicolon and colon are also common separators so we accept them here as well.

Returns:

A dict containing vendor, model, serial, and firmware.

get_last_error() int[source]

Send a TE command (get error of previous command) and return a numerical error code.

Returns:

Error code for previous command. Value 0 means no error (success). See global table ERROR_CODES for the meaning of the codes.

Return type:

int

This function is called automatically after each command sent to the device. When a command results in error, exception Newport_AG_UC8_ErrorCode is raised.

reset() None[source]

Reset the motor controller.

write(cmd: str) None[source]

Write a command string with NO response to the hardware.

Subclasses that transform cmd should override this method, and in it call super().write(new_cmd). Subclasses that define a new hardware communication should instead override write_raw.

Parameters:

cmd – The string to send to the instrument.

Raises:

Exception – Wraps any underlying exception with extra context, including the command and the instrument.

write_channel(channel_number: int, cmd: str) None[source]

Select specified channel, then apply specified command.

command_delay = 0.002
default_timeout: float | None = 1.0

The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.

reset_delay = 0.05
slow_command_timeout = 120.0
class qcodes_contrib_drivers.drivers.Newport.AG_UC8.Newport_AG_UC8_Axis(parent: Newport_AG_UC8_Channel, axis: int)[source]

Bases: InstrumentChannel

Represents one of the 2 axes of one channel of an AG-UC8 controller.

jog(speed: int) None[source]

Start moving in positive (speed > 0) or negative (speed < 0) direction.

Parameters:

speed (int) – speed and direction of movement. Negative values (-1 .. -4) start moving in negative direction. Positive values (1 .. 4) start moving in positive direction. Magnitude determines speed according to Newport_AG_UC8_Axis.SPEED_TABLE.

measure_position() int[source]

Measure current position.

This is a slow command which may take up to 2 minutes to finish.

Returns:

Current position in range 0 .. 1000 representing steps of 1/1000 of total travel.

Return type:

int

move_abs(position: int) int[source]

Move to absolute position.

This is a slow command which may take up to 2 minutes to finish.

Parameters:

position (int) – Target position in range 0 .. 1000 representing steps of 1/1000 of total travel.

move_limit(speed: int) None[source]

Start moving to positive (speed > 0) or negative (speed < 0) limit.

Parameters:

speed (int) – speed and direction of movement. Negative values (-1 .. -4) start moving in negative direction. Positive values (1 .. 4) start moving in positive direction. Magnitude determines speed according to Newport_AG_UC8_Axis.SPEED_TABLE.

move_rel(steps: int) None[source]

Start a relative move to current position.

Parameters:

steps (int) – Number of steps to move relative to current position.

stop()[source]

Stop current movement.

zero_position()[source]

Reset the step counter to zero.

SPEED_TABLE = {1: '5 steps/second at defined step amplitude', 2: '100 steps/second at maximum step amplitude', 3: '1700 steps/second at maximum step amplitude', 4: '666 steps/second at defined step amplitude'}
class qcodes_contrib_drivers.drivers.Newport.AG_UC8.Newport_AG_UC8_Channel(parent: Newport_AG_UC8, channel_number: int)[source]

Bases: InstrumentChannel

Represents one of the 4 channels of an AG-UC8 controller.

Each channel drives 2 axes of an optical mount.

ask(cmd: str) str[source]
write(cmd: str) None[source]

Module contents