1338
Keysight InfiniiVision M9241/42/43A PXIe Oscilloscopes SCPI Programmer's Guide
37
Status Reporting
Status Reporting Decision Chart
yes
no
Do you want
to do status
reporting?
Do you want to
send a Service Request
(SRQ) interrupt to the
controller?
Do you want to
report events monitored by
the Standard Event Status
Register?
yes
no (Your programs can read the status registers instead.)
yes
no
Reset the instrument and
clear the status registers:
myScope.WriteString "*RST"
myScope.WriteString "*CLS"
Use the *ESE common command
to enable the bits you want to
use to generate the ESB summary
bit in the Status Byte Register.
Use the *SRE common command
to enable the bits you want to
generate the RQS/MSS bit to set
bit 6 in the Status Byte Register
and send an SRQ to the computer.
If events are monitored by the
Standard Event Status Register,
also enable ESB with the *SRE
command.
Activate the instrument function
that you want to monitor.
When an interrupt occurs, interrupt
handler should serial poll STB with:
varR = myScope.IO.ReadSTB
END
To read the Status Byte Register,
use the following:
myScope.WriteString "*STB?"
varR = myScope.ReadNumber
MsgBox "STB: 0x" + Hex(varR)
This displays the hexadecmal value
of the Status Byte Register.
Determine which bits in the
Status Byte Register are set.
Use the following to read the
contents of the status byte:
myScope.WriteString "*STB?"
varR = myScope.ReadNumber
MsgBox "STB: 0x" + Hex(varR)
Use the following to see if an
operation is complete:
myScope.WriteString "*OPC?"
varR = myScope.ReadNumber
MsgBox "OPC: 0x" + Hex(varR)
Use the following to read the
Standard Event Status Register:
myScope.WriteString "*ESR?"
varR = myScope.ReadNumber
MsgBox "ESR: 0x" + Hex(varR)