Instrument Base Module#

Module for the base classes of the instruments. Contain methods for communicating with instruments, and the specific instrument classes inherit these methods

class techconnect.base._instrument.VISAInstrument[source]#

For instruments communicating via VISA (ie USB, ethernet, etc)

check_errors()[source]#

Check for errors by querying the SCPI and handling the returned error.

close_device()[source]#

Closes the device.

This function clears the instrument and then closes the connection to the device.

connect(address)[source]#

Connects to an instrument at the specified address.

initialise_device()[source]#

Initializes the device.

This function is responsible for initializing the device. It clears any existing data on the instrument.

list_connections(verbose=True)[source]#

List connections and print the resource information if verbose is True. Otherwise, print only the resource names.

query_SCPI(query: str)[source]#

Execute a SCPI query command and return the response.

write_SCPI(command: str)[source]#

Writes an SCPI command to the instrument.

write_lines(lines)[source]#

Writes a list of lines to the device.

class techconnect.base._instrument.PrologixInstrument[source]#

For instruments communicating via Prologix GPIB adapter

check_errors()#

Check for errors by querying the SCPI and handling the returned error.

close_device()#

Closes the device.

This function clears the instrument and then closes the connection to the device.

connect(address)[source]#

Connects to an instrument at the specified address.

initialise_device()#

Initializes the device.

This function is responsible for initializing the device. It clears any existing data on the instrument.

list_connections(verbose=True)#

List connections and print the resource information if verbose is True. Otherwise, print only the resource names.

query_SCPI(query: str)[source]#

Send a query to the SCPI instrument and return the response.

write_SCPI(command: str)#

Writes an SCPI command to the instrument.

write_lines(lines)#

Writes a list of lines to the device.