ieee488_2_commands
¶
Module containing inner classes to use for APIs for IEEE 488.2 commands.
IEEE4882Commands
¶
IEEE4882Commands(pi_control: PIControl)
An inner class containing an API for all the IEEE 488.2 SCPI commands.
cls
¶
cls() -> None
Send the *CLS (Clear Status) command.
This command (no query form) clears the following:
- Event Queue
- Standard Event Status Register
- Status Byte Register (except the MAV bit)
If the *CLS command immediately follows an *CLS does not clear the output queue or MAV.
*CLS can suppress a Service Request that is to be generated by an *OPC.
ese
¶
Send or query the *ESE (Event Status Enable) command.
This command sets and queries the bits in the Event Status Enable Register (ESER). The ESER prevents events from being reported to the Status Byte Register (STB).
The power-on default for the ESER is 0 if *PSC is 1. If *PSC is 0, the ESER
maintains the previous power cycle value through the current power cycle.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
esr
¶
esr() -> str
Query the *ESR? (Standard Event Status Register) command.
This query-only command returns the contents of the Standard Event Status Register (SESR).
*ESR? also clears the SESR (since reading the SESR clears it).
| Returns: |
|
|---|
idn
¶
idn() -> str
Query the *IDN? (Identification) command.
This query-only command returns the instrument identification code.
| Returns: |
|
|---|
lrn
¶
lrn() -> str
Query the *LRN? (Learn) command.
This query-only command returns the commands that list the instrument settings.
| Returns: |
|
|---|
opc
¶
Send or query the *OPC (Operation Complete) command.
The *OPC command generates an operation complete event which propagates
through the Standard Event Status Register (SESR) when all pending commands
that block OPC are complete.
The *OPC? query returns “1” after all blocking OPC operations are complete.
The *OPC? query response is not available to read until all pending operations finish,
so an appropriate timeout value should be used.
| Parameters: |
|
|---|
| Returns: |
|
|---|
opt
¶
opt() -> str
Query the *OPT? (Options) command.
This query-only command returns a comma separated list of installed options as an arbitrary ASCII string (no quotes) of the form:
<optionCode>:<optionDescription>,<optionCode>:<optionDescription>...
| Returns: |
|
|---|
psc
¶
Send or query the *PSC (Power-on Status Clear) command.
This command sets and queries the power-on status flag that controls the automatic
power-on handling of the SRER, and ESER registers. When *PSC is true,
the SRER and ESER registers are set to 0 at power-on. When *PSC is false,
the current values in the SRER and ESER registers are preserved in nonvolatile memory
when power is shut off and are restored at power-on.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rst
¶
rst() -> None
Send the *RST (Reset) command.
This command (no query form) does the following:
- Recalls the default instrument setup.
The *RST command does not change the following:
- The Power-on Status Clear Flag (
*PSCcommand). - The Event Status Enable Register (
*ESEcommand). - The Service Request Enable Register (
*SREcommand).
*RST only resets the programmable interface settings, it does not change any
user interface settings.
sre
¶
Send or query the *SRE (Service Request Enable) command.
The *SRE (Service Request Enable) command sets and queries the bits in the
Service Request Enable Register.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
stb
¶
stb() -> str
Query the *STB? (Status Byte) command.
The *STB? (Read Status Byte) query returns the contents of the
Status Byte Register (SBR) using the Master Summary Status (MSS) bit.
| Returns: |
|
|---|
tst
¶
tst() -> str
Send the *TST? (Self-Test) command.
Tests (self-test) the interface and returns the result.
| Returns: |
|
|---|
wai
¶
wai() -> None
Send the *WAI (Wait) command.
The *WAI (Wait) command (no query form) prevents the instrument from executing further
commands or queries until all pending commands that generate an OPC message are complete.
LegacyTSPIEEE4882Commands
¶
LegacyTSPIEEE4882Commands(pi_control: PIControl)
Bases: TSPIEEE4882Commands
An inner class containing an API for all the IEEE 488.2 commands for legacy TSP models.
cls
¶
cls() -> None
Send Clear Status commands (eventlog.clear(), status.clear()).
This command (no query form) clears the following:
- Event Queue
- Standard Event Status Register
- Status Byte Register
ese
¶
Send or query the Event Status Enable (status.standard.enable) command.
This command sets and queries the bits in the Event Status Enable Register (ESER). The ESER prevents events from being reported to the Status Byte Register (STB).
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
esr
¶
esr() -> str
Query the Standard Event Status Register (print(status.standard.event)) command.
This query-only command returns the contents of the Standard Event Status Register (SESR).
print(status.standard.event) also clears the SESR (since reading the SESR clears it).
| Returns: |
|
|---|
idn
¶
idn() -> str
Query the *IDN? (Identification) command.
This query-only command returns the instrument identification code.
| Returns: |
|
|---|
lrn
¶
lrn() -> str
Query the *LRN? (Learn) command.
This query-only command returns the commands that list the instrument settings.
| Returns: |
|
|---|
opc
¶
Send or query the Operation Complete command.
The OPC command generates an operation complete event which propagates through the Standard Event Status Register (SESR) when all pending commands that block OPC are complete.
| Parameters: |
|
|---|
| Returns: |
|
|---|
opt
¶
opt() -> str
Query the *OPT? (Options) command.
This query-only command returns a comma separated list of installed options as an arbitrary ASCII string (no quotes) of the form:
<optionCode>:<optionDescription>,<optionCode>:<optionDescription>...
| Returns: |
|
|---|
psc
¶
Send or query the *PSC (Power-on Status Clear) command.
This command sets and queries the power-on status flag that controls the automatic
power-on handling of the SRER, and ESER registers. When *PSC is true,
the SRER and ESER registers are set to 0 at power-on. When *PSC is false,
the current values in the SRER and ESER registers are preserved in nonvolatile memory
when power is shut off and are restored at power-on.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sre
¶
Send or query the Service Request Enable (status.request_enable) command.
The status.request_enable (Service Request Enable) command sets and
queries the bits in the Service Request Enable Register.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
stb
¶
stb() -> str
Query the Status Byte (print(status.condition)) command.
| Returns: |
|
|---|
TSPIEEE4882Commands
¶
TSPIEEE4882Commands(pi_control: PIControl)
Bases: IEEE4882Commands
An inner class containing an API for all the IEEE488.2 TSP commands.
cls
¶
cls() -> None
Send Clear Status commands (errorqueue.clear(), status.clear()).
This command (no query form) clears the following:
- Event Queue
- Standard Event Status Register
- Status Byte Register
ese
¶
Send or query the Event Status Enable (status.standard.enable) command.
This command sets and queries the bits in the Event Status Enable Register (ESER). The ESER prevents events from being reported to the Status Byte Register (STB).
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
esr
¶
esr() -> str
Query the Standard Event Status Register (print(status.standard.event)) command.
This query-only command returns the contents of the Standard Event Status Register (SESR).
print(status.standard.event) also clears the SESR (since reading the SESR clears it).
| Returns: |
|
|---|
idn
¶
idn() -> str
Query the *IDN? (Identification) command.
This query-only command returns the instrument identification code.
| Returns: |
|
|---|
lrn
¶
lrn() -> str
Query the *LRN? (Learn) command.
This query-only command returns the commands that list the instrument settings.
| Returns: |
|
|---|
opc
¶
Send or query the Operation Complete command.
The OPC command generates an operation complete event which propagates through the Standard Event Status Register (SESR) when all pending commands that block OPC are complete.
| Parameters: |
|
|---|
| Returns: |
|
|---|
opt
¶
opt() -> str
Query the *OPT? (Options) command.
This query-only command returns a comma separated list of installed options as an arbitrary ASCII string (no quotes) of the form:
<optionCode>:<optionDescription>,<optionCode>:<optionDescription>...
| Returns: |
|
|---|
psc
¶
Send or query the *PSC (Power-on Status Clear) command.
This command sets and queries the power-on status flag that controls the automatic
power-on handling of the SRER, and ESER registers. When *PSC is true,
the SRER and ESER registers are set to 0 at power-on. When *PSC is false,
the current values in the SRER and ESER registers are preserved in nonvolatile memory
when power is shut off and are restored at power-on.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sre
¶
Send or query the Service Request Enable (status.request_enable) command.
The status.request_enable (Service Request Enable) command sets and
queries the bits in the Service Request Enable Register.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
stb
¶
stb() -> str
Query the Status Byte (print(status.condition)) command.
| Returns: |
|
|---|