Download PyVISA Documentation

Transcript
PyVISA Documentation, Release 1.9.dev0
• event_type – Logical event identifier.
• mechanism – Specifies event handling mechanisms to be disabled.
stants.VI_QUEUE, .VI_HNDLR, .VI_SUSPEND_HNDLR, .VI_ALL_MECH)
(Con-
discard_events(event_type, mechanism)
Discards event occurrences for specified event types and mechanisms in this resource.
Parameters
• event_type – Logical event identifier.
• mechanism – Specifies event handling mechanisms to be dicarded.
stants.VI_QUEUE, .VI_HNDLR, .VI_SUSPEND_HNDLR, .VI_ALL_MECH)
(Con-
enable_event(event_type, mechanism, context=None)
Enable event occurrences for specified event types and mechanisms in this resource.
Parameters
• event_type – Logical event identifier.
• mechanism – Specifies event handling mechanisms to be enabled.
stants.VI_QUEUE, .VI_HNDLR, .VI_SUSPEND_HNDLR)
(Con-
• context – Not currently used, leave as None.
get_visa_attribute(name)
Retrieves the state of an attribute in this resource.
Parameters name – Resource attribute for which the state query is made (see Attributes.*)
Returns The state of the queried attribute for a specified resource.
Return type unicode (Py2) or str (Py3), list or other type
ignore_warning(*warnings_constants)
Ignoring warnings context manager for the current resource.
Parameters warnings_constants – constants identifying the warnings to ignore.
implementation_version
VI_ATTR_RSRC_IMPL_VERSION is the resource version that uniquely identifies each of the different revisions or implementations of a resource. This attribute value is defined by the individual
manufacturer and increments with each new revision. The format of the value has the upper 12 bits as
the major number of the version, the next lower 12 bits as the minor number of the version, and the
lowest 8 bits as the sub-minor number of the version.
VISA Attribute VI_ATTR_RSRC_IMPL_VERSION (1073676291)
Type int
Range 0 <= value <= 4294967295
install_handler(event_type, handler, user_handle=None)
Installs handlers for event callbacks in this resource.
Parameters
• event_type – Logical event identifier.
• handler – Interpreted as a valid reference to a handler to be installed by a client application.
3.6. API
69