bench.common module¶
- class bench.common.Common(address: str | None = None, use_config_file=False, backend: str | None = None)¶
Bases:
object- auto_connect = True¶
Automatically connect to hardware when running methods
- property auto_reconnect¶
Automatically reconnect if connection dropped
- backend = None¶
Override pyvisa backend string (e.g. “@sim”, “/path/to/dev.yaml@sim”). When set, takes precedence over use_py_resource_manager.
- property config_file¶
- config_locations = ['.', '/etc/']¶
Paths to search for config
- connect()¶
- disconnect()¶
- query_error()¶
Queries for PXA error
- Raises:
AttributeError – Error
- use_config_file = False¶
Use config file to get address for instrument(s)
- use_py_resource_manager = True¶
Use @py resource manager
- bench.common.check_connected(func)¶
- class bench.common.instrument(rm, address, auto_reconnect=True, use_py_resource_manager=True, backend=None)¶
Bases:
objectShim layer between pyvisa instrument class and pybench instruments
- close()¶
- query(cmd)¶
- query_ascii_values(cmd, converter=None)¶
- read_raw()¶
- property read_termination¶
- property timeout¶
- write(cmd)¶
- property write_termination¶