Download 1.6 PDF - Read the Docs
Transcript
PyVISA Documentation, Release 1.6 3.6.2 Resource Manager class pyvisa.highlevel.ResourceInfo(interface_type, interface_board_number, resource_class, resource_name, alias) Resource extended information Named tuple with information about a resource. Returned by some ResourceManager methods. Interface_type Interface type of pyvisa.constants.InterfaceType the given resource string. Interface_board_number Board number of the interface of the given resource string. Resource_class Specifies the resource class (for example, “INSTR”) of the given resource string. Resource_name This is the expanded version of the given resource string. The format should be similar to the VISA-defined canonical resource name. Alias Specifies the user-defined alias for the given resource string. class pyvisa.highlevel.ResourceManager VISA Resource Manager Parameters visa_library – VisaLibrary Instance, path of the VISA library or VisaLibrary spec string. (if not given, the default for the platform will be used). close() Close the resource manager session. last_status Last status code returned for an operation with this Resource Manager Return type pyvisa.constants.StatusCode list_resources(query=u’?*::INSTR’) Returns a tuple of all connected devices matching query. Parameters query – regular expression used to match devices. list_resources_info(query=u’?*::INSTR’) Returns a dictionary mapping resource names to resource extended information of all connected devices matching query. Parameters query – regular expression used to match devices. Returns Mapping of resource name to ResourceInfo Return type dict[str, pyvisa.highlevel.ResourceInfo] open_bare_resource(resource_name, access_mode=<AccessModes.no_lock: open_timeout=0) Open the specified resource without wrapping into a class 0>, Parameters • resource_name – name or alias of the resource to open. • access_mode (pyvisa.constants.AccessModes) – access mode. • open_timeout – time out to open. Returns Unique logical identifier reference to a session. open_resource(resource_name, access_mode=<AccessModes.no_lock: **kwargs) Return an instrument for the resource name. 3.6. API 0>, open_timeout=0, 51