GPIB

class tam.GPIB(gpib_ip='192.168.0.175')[source]
clear()[source]

Sends the Selected Device Clear (SDC) message to the currently specified GPIB address.

close()[source]

Close connection to the GPIB controller.

eot_char(ch)[source]

Specifies the character to be appended to network output when eot_enable is set to 1 and EOI is detected.

eot_enable(f)[source]

Enable or disable the appending of a user specified character (see eot_char) to network output whenever EOI is detected while reading a character from the GPIB port.

property gpib_id

Return the ID of the currently selected instrument.

initialize(timeout=2)[source]

Connect to the GPIB controller.

local()[source]

Enable front panel operation of the currently addressed instrument.

read()[source]

Read a value from the selected device.

Returns:

The read value as a string.

read_bin(num_bytes)[source]

Read data from the currently selected instrument.

Parameters:

num_bytes (int) – The number of bytes of data to read.

Returns:

The data read from the instrument as a bytearray.

read_float()[source]

Read a floating point value from the selected device

Returns:

The read value as a float.

read_int()[source]

Read an integer value from the selected device

Returns:

The read value as an integer.

reset()[source]

Perform a power-on reset of the controller.

spoll()[source]

Perform a serial poll of the instrument at the currently specified address.

srq()[source]

Return the current state of the GPIB SRQ signal

wait_for_done()[source]

Wait for ‘DONE?’ to return non-zero.

write(cmd)[source]

Write a command to the selected controller.

Parameters:

cmd (str) – The command to send to the selected controller.