Download 1.6 PDF - Read the Docs

Transcript
PyVISA Documentation, Release 1.6
• handler – Interpreted as a valid reference to a handler to be installed by a client application.
• user_handle – A value specified by an application that can be used for identifying
handlers uniquely for an event type.
Returns user handle (a ctypes object)
interface_number
VI_ATTR_INTF_NUM specifies the board number for the given interface.
VISA Attribute VI_ATTR_INTF_NUM (1073676662)
Type int
Range 0 <= value <= 65535
interface_type
The interface type of the resource as a number.
io_protocol
VI_ATTR_IO_PROT specifies which protocol to use. In VXI, you can choose normal word serial or
fast data channel (FDC). In GPIB, you can choose normal or high-speed (HS-488) transfers. In serial,
TCPIP, or USB RAW, you can choose normal transfers or 488.2-defined strings. In USB INSTR, you
can choose normal or vendor-specific transfers.
VISA Attribute VI_ATTR_IO_PROT (1073676316)
Type int
Range 0 <= value <= 65535
is_4882_compliant
VI_ATTR_4882_COMPLIANT specifies whether the device is 488.2 compliant.
VISA Attribute VI_ATTR_4882_COMPLIANT (1073676703)
Type bool
last_status
Last status code for this session.
Return type pyvisa.constants.StatusCode
lock(timeout=None, requested_key=None)
Establish a shared lock to the resource.
Parameters
• timeout – Absolute time period (in milliseconds) that a resource waits to get unlocked
by the locking session before returning an error. (Defaults to self.timeout)
• requested_key – Access key used by another session with which you want your session to share a lock or None to generate a new shared access key.
Returns A new shared access key if requested_key is None, otherwise, same value as the requested_key
lock_state
VI_ATTR_RSRC_LOCK_STATE indicates the current locking state of the resource. The resource
can be unlocked, locked with an exclusive lock, or locked with a shared lock.
118
Chapter 3. More information