HP E1366A, E1367A manual Using the Scan Complete Bit, Example Scan Complete Interrupt

Page 36

Using the Scan Complete Bit

You can use the Scan Complete Bit (bit 8) in the Operation Status register of a switchbox to determine when a scanning cycle completes (no other bits in the register apply to the switchbox). Bit 8 has a decimal value of 256 and you can read it directly with the STAT:OPER? command. Refer to STATus:OPERation[:EVENt]? command in Chapter 5 for an example.

When enabled by the STAT:OPER:ENAB 256 command, the Scan Complete Bit will be reported as bit 7 of the Status register. Use the HP-IB Serial Poll or the IEEE 488.2 Common Command *STB? to read the Status register.

When bit 7 of the Status register is enabled by the *SRE 128 Common Command to assert an HP-IB Service Request (SRQ), you can interrupt the computer when the Scan Complete Bit is set, after a scanning cycle completes. This allows the controller to do other operations while the scanning cycle is in progress.

The following example monitors bit 7 in the Status register to determine when the scanning cycle completes. The computer used in this example is an HP 9000 Series 200/300 used with HP BASIC as the programming language. The computer interfaces with an HP E1300A/E1301A mainframe over HP-IB. The HP-IB select code is 7, the HP-IB primary address is 09, and the HP-IB secondary address is 15.

Example: Scan

Complete Interrupt

10 OUTPUT 70915;"*CLS"

! Clear all switchbox status structure

20OUTPUT 70915;"STAT:OPER:ENAB 256" ! Enable Scan Complete Bit to set bit 7 in Status register

30

OUTPUT 70915;"*SRE 128"

! Enable bit 7 of Status register to

 

 

assert SRQ

40

OUTPUT 70915;"TRIG:SOUR EXT"

! External trigger mode

50

OUTPUT 70915;"SCAN (@100:105)"

! Select channels to be scanned

60

OUTPUT 70915;"INIT"

! Start scanning cycle

70

WHILE NOT BIT(SPOLL(70915),7)

! Waiting for scan complete

80PRINT "DO OTHER OPERATION HERE" ! Enter program lines for computer to do other operations

90 END WHILE

100PRINT "INTERRUPT GENERATED" ! Program goes to this line after interrupt generated by a completed scanning cycle

110 END

36 Understanding the HP E1366A/E1367A RF Multiplexers

Chapter 4

Image 36
Contents Contents HP E1366A/E1367A RF Multiplexers Command Reference HP E1366A/E1367A RF Multiplexer Specifications HP E1366A/67A RF Multiplexers User’s Manual Contents HP E1366A & E1367A RF Multiplexer Modules User’s Manual Documentation History December 5 According to ISO/IEC Guide 22 and ENHP E1366A & E1367A RF Multiplexer Modules User’s Manual Measurement Systems Division Reader Comment SheetHP E1366A & E1367A RF Multiplexer Module User’s Manual Using This Chapter Getting Started with the HP E1366A/E1367A RF MultiplexersMultiplexer Module Description Multiplexers Switching Diagram Typical Configuration Specifying Scpi CommandsProgramming the Multiplexer Module AddressMultiplexer Card Numbers Multiplexer Channel NumbersInitial Operation Example RF Multiplexer Channel Lists/RangesPage Configuring the HP E1366A/E1367A RF Multiplexers Chapter Configuring the HP E1366A/E1367A RF MultiplexersConnecting User Inputs Configuring the HP E1366A/E1367A RF Multiplexers ChapterHewlett-Packard BNC Cables Typical Multiplexer Configurations Standard ConfigurationTypical Tree Configuration Matrix-Type Configuration Typical Matrix-Type ConfigurationChanging Multiplexer Components RF Multiplexer Component LocationsConfiguring the HP E1366A/E1367A RF Multiplexers Chapter Using the HP E1366A/E1367A RF Multiplexer Module Multiplexer CommandsSwitching Channels Chapter Using the HP E1366A/E1367A RF Multiplexer ModuleExample Standard Switching Using the HP E1366A/E1367A RF Multiplexer Module ChapterExample Tree Switching Tree SwitchingExample Matrix-Type Switching Query Channel States. Use CLOSe? channellist orExample Scanning Using Trig Out Port Scanning ChannelsScanning Channels Comments Scanning Channels Commands Using Scanning Trigger SourcesUnderstanding the HP E1366A/E1367A RF Multiplexers Scanning with External InstrumentsUnderstanding the HP E1366A/E1367A RF Multiplexers Chapter Scanning Trigger Sources Example Scanning with External Device Scanning with External DeviceExample Scanning Using Trig Out Event Ports Using the Scan Complete Bit Example Scan Complete InterruptHP E1366A/E1367A RF Multiplexers Command Reference Command TypesCommon Command Format Scpi Command FormatHP E1366A/E1367A RF Multiplexers Command Reference Chapter Semicolon between the commands. For example Scpi Command Reference ABORtSubsystem Syntax ABORt Example Stopping a Scan with ABORtSubsystem Syntax ARM ParametersExample Query Number of Scanning Cycles Example Enabling the Monitor Mode DISPlaySubsystem Syntax DISPlay Example Select Module #2 in a Switchbox for Monitoring ∙ Non-Continuous Scanning Operation This is enabled with ∙ Stopping Continuous Scans See the ABORt commandINITiate Example Enabling Continuous ScansExample Query Continuous Scanning State Example Enable Trig Out Port Example Query Trig Out Port Enable StateOUTPut Subsystem Syntax OUTPutROUTe Subsystem Syntax ROUTeComments ∙ Closing Channels To close Example Closing Multiplexer ChannelsComments ∙ Opening Channels To openExample Opening Channels Open Example Scanning Using External Devices Example Query Scan Mode Example Selecting Paired-Channel Scanning∙ Setting Bit 7 of the Status Register STATusSubsystem Syntax STATus ∙ Returned Data after sending the STATusOPERationEVENt?SYSTem CTYPe?Subsystem Syntax SYSTem ∙ RF Multiplexers Power-On State The power-on state is all Example Setting Card #1 Module to its Power-on StateComments ∙ RF Multiplexers Model Number Example Reading the Model Number of a Card #1 ModuleExample Advancing Scan Using the TRIGger Command TRIGgerSubsystem Syntax TRIGger ∙ Trig Out Port Shared by Switchboxes See the OUTPut command Example Scanning Using External Triggers Example Scanning Using Bus TriggersExample Query Trigger Source Ieee 488.2 Common Commands Command Title DescriptionCommand Quick Reference Commands for the RF Multiplexer modules used in a switchboxHP E1366A/E1367A RF Multiplexer Specifications Input Characteristics AC PerformanceAppendix a HP E1366A/E1367A RF Multiplexer Specifications GeneralHP E1366A/E1367A RF Multiplexer Specifications Appendix a Typical Crosstalk channel-channel Cooling/SlotEnd of Life Detection Replacement Strategy Relay LifeHP E1366A/E1367A RF Multiplexer Specifications Appendix a HP E1366A/E1367A Multiplexer Registers Appendix B HP E1366A/E1367A Multiplexer RegistersID Register Status/Control Register Channel Enable Registers Addressing the RegistersReading the Registers ID/Device Type RegistersWriting to the Registers HP E1366A/E1367A Multiplexer Registers Appendix B HP E1366A/E1367A RF Multiplexer Error Messages Appendix C HP E1366A/E1367A RF Multiplexer Error MessagesHP E1366A/E1367A RF Multiplexer Error Messages Appendix C Index HP E1366A/67A RF Multiplexers User’s Manual IndexHP-IB HP E1366A/67A RF Multiplexers User’s Manual Index HP E1366A/67A RF Multiplexers User’s Manual Index