VisaDevice
- class tam.VisaDevice(visa_rm, visa_id)[source]
Create an instance of
VisaDevice
.- Parameters:
visa_rm – A reference to a Visa resource manager. As returned (for example) by a call to
pyvisa.ResourceManager()
.visa_id (str) – The ID of the instrument to connect with.
- initialize()[source]
Open a connection to the selected instrument.
This will also initialize query delay and timeout values for the instrument. Default values for these are
VisaDevice.DEFAULT_QUERY_DELAY
andVisaDevice.DEFAULT_TIMEOUT
. See also the propertiesquery_delay
andtimeout
.
- query(cmd)[source]
Send a query command to the instrument.
- Parameters:
cmd (str) – The command to send.
- Returns:
The instrument response as a string.
- property query_delay
Get or set the query delay. This is the delay in seconds between write and read operations.
- query_float(cmd)[source]
Send a query command to the instrument.
- Parameters:
cmd (str) – The command to send.
- Returns:
The instrument response as a float.
- query_int(cmd)[source]
Send a query command to the instrument.
- Parameters:
cmd (str) – The command to send.
- Returns:
The instrument response as an integer.
- property timeout
Get or set the timeout. This is the timeout (in millisecs) for all instrument I/O operations.