1562 Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide41 Status ReportingStatus Byte Register (STB)The Status Byte Register is the summary-level register in the status reportingstructure. It contains summary bits that monitor activity in the other statusregisters and queues. The Status Byte Register is a live register. That is, itssummary bits are set and cleared by the presence and absence of a summary bitfrom other event registers or queues.If the Status Byte Register is to be used with the Service Request Enable Registerto set bit 6 (RQS/MSS) and to generate an SRQ, at least one of the summary bitsmust be enabled, then set. Also, event bits in all other status registers must bespecifically enabled to generate the summary bit that sets the associatedsummary bit in the Status Byte Register.The Status Byte Register can be read using either the *STB? Common Commandor the programming interface serial poll command. Both commands return thedecimal-weighted sum of all set bits in the register. The difference between thetwo methods is that the serial poll command reads bit 6 as the Request Service(RQS) bit and clears the bit which clears the SRQ interrupt. The *STB? commandreads bit 6 as the Master Summary Status (MSS) and does not clear the bit or haveany affect on the SRQ interrupt. The value returned is the total bit weights of all ofthe bits that are set at the present time.The use of bit 6 can be confusing. This bit was defined to cover all possiblecomputer interfaces, including a computer that could not do a serial poll. Theimportant point to remember is that, if you are using an SRQ interrupt to anexternal computer, the serial poll command clears bit 6. Clearing bit 6 allows theoscilloscope to generate another SRQ interrupt when another enabled eventoccurs.No other bits in the Status Byte Register are cleared by either the *STB? query orthe serial poll, except the Message Available bit (bit 4). If there are no othermessages in the Output Queue, bit 4 (MAV) can be cleared as a result of readingthe response to the *STB? command.If bit 4 (weight = 16) and bit 5 (weight = 32) are set, the program prints the sum ofthe two weights. Since these bits were not enabled to generate an SRQ, bit 6(weight = 64) is not set.The following example uses the *STB? query to read the contents of theoscilloscope's Status Byte Register.myScope.WriteString "*STB?"varQueryResult = myScope.ReadNumberMsgBox "Status Byte Register, Read: 0x" + Hex(varQueryResult)The next program prints 0xD1 and clears bit 6 (RQS) and bit 4 (MAV) of the StatusByte Register. The difference in the output value between this example and theprevious one is the value of bit 6 (weight = 64). Bit 6 is set when the first enabledsummary bit is set and is cleared when the Status Byte Register is read by theserial poll command.