HP SB manual Status Reporting and Service Request Control, Condition Register, Status Register

Page 34

OPC?

Operation Complete

Returns the status of the input buffer.

1 = the input buffer is empty, for example, all commands have been executed

0 = the input buffer is not empty, for example, commands are still pending

IDN?

Identifier

Returns a string that identifies the manufacturer, the switch series, and the firmware level, for example, JDS Uniphase, SB Switch, 2.00

Status Reporting and Service Request Control

The SB switch maintains three eight-bit registers that are used for status reporting and for enabling the GPIB service request interrupt:

Condition register

Status register

SRQ mask register

Condition Register

The condition register monitors the current state of the switch mechanism ( Table 9). Bit 2, the settled condition bit, is 1 when the switch mechanism has stopped at the desired channel and 0 when the switch is moving to a new output channel. The CNB? query command returns the value of the condition register. When the settled bit is true, CNB? query returns 4.

Table 9: Condition Register

Condition Register

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

 

 

 

 

 

 

 

 

0

0

0

0

0

settled

0

0

 

 

 

 

 

 

 

 

Status Register

The status register records errors and other events that have occurred in the switch (Table 10). When an event occurs, the switch status logic sets the corresponding bit to 1. The status register can be read at any time because the bits stay set until the register is read at least once.

Table 10: Status Register

Status Register

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

 

 

 

 

 

 

 

 

self-test

service

syntax

message

0

settled

0

parameter

 

 

 

 

 

 

 

 

Programming Guide – 29

Image 34
Contents SB Series Fiberoptic Switch User’s ManualPage Contents Programming Guide SD000153 Rev. J May Safety Information, Instructions, and Symbols Safety InformationBefore Initializing and Operating the Unit Safety InstructionsOperating the Unit Safety Symbol Safety SymbolsProceeding Compliance CE ComplianceSingle-Common SB-C Switch Configuration General Information and SpecificationsGeneral Information Dual-Common SB-D Switch Configuration Single Step Dual Common SB-E Switch ConfigurationStandard Accessories Dual-Common Blocking SB-F Switch ConfigurationKey Features Optional AccessoriesSpecifications Parameter Typical MaximumPhysical ElectricalEnvironmental Initial Inspection Getting StartedBefore Initializing and Operating the Unit Operating EnvironmentStoring and Shipping Cleaning Connectors Installing the Switch Connector Cleaning connector type can varyOperating Keys Operating and Maintenance InstructionsFront Panel Key DescriptionExternal Switch Module without TTL Input Controls External Switch Module ConnectionsRear Panel External Switch Module with TTL Input Controls Sample Driver Application Electrical Equivalent of DriverPowering Up the Switch Using and Selecting a ChannelSetting the Interface Command Set for SC and SX Switches Setting the Gpib AddressControlling the Drivers Controlling the Switch Remotely by Gpib Interface Controlling the Switch LocallyControlling the Switch Remotely by RS232 Interface Maintaining the Switch Calibrating the SwitchPrint #1, CLOSE? Input #1,A$ Print A$ END Operating and Maintenance Instructions Programming Guide Gpib Pin AssignmentRS232 Pin Assignment RS232 Interface SpecificationsGpib Interface Functions Mnemonic FunctionCommand Parser Rules Operation and Query CommandsName Symbol Pin Number Signal Direction RS232 Driver Pin AssignmentClose Set Optical Channel Operation CommandsReset XDR i k Driver ControlQuery Commands Drivers Error NumberLast Number Error LearnCondition Register Status Reporting and Service Request ControlStatus Register SRQ Mask Register Gpib Programming ExamplesSRQ Mask Register Bit Sending Commands Serial Polling the Status RegisterRS232 Programming Examples Generating a Service Request InterruptLearn Query LRN? Querying Status Setting the Interface Command SetReading the Status Register Syntax Function SC Series Switch Command Set SCXXX-0XXX ModelsSX Series Switch Command Set Bit MessageRQS Busy Normal BAD Data Unit Failure