Agilent Technologies E1470A user manual Programming Examples, Chapter Programming the RF Switch

Page 21

Programming Examples

Example: Module Self-Test

NOTE

The following C-language programs show one way to verify initial operation for the Cascade RF Switch module, to close signal paths, and to save and recall module states. To run these programs, you must have installed the E1470A SCPI Device Driver, Agilent IO Libraries for Windows, and a GPIB module in your PC.

This program:

Identifies the module and device driver

Resets the module

Closes a path (source/destination)

Verifies that the path is closed

Executes the module self-test

The command performs a device reset on the module and sets it to its power-on state. (Saved module states and status information are not

affected by

.) The

command verifies that the relay positions

match the configurations programmed using the

commands.

 

results are unpredictable if you use register -based programming or

 

or

to control individual relays. The value returned

should be a "0". Any other value indicates the actual state of the relays do

not match the configuration programmed by the

command.

See Chapter 3 for details.

 

 

 

Chapter 2

Programming the RF Switch 21

Image 21
Contents E1470-90002 Page Contents Appendix C RF Switch Error Messages Index Government Restricted Rights Agilent Technologies Warranty StatementDocumentation History Safety SymbolsManufacturer’s Address Manufacturer’s NameDeclares, that the product Product Name Model NumberPage Using This Chapter Switching DiagramChapter Cascade Relays COM 33 332 Creating Multiple Multiplexers Configuring the RF Switch ChapterMaximum POWER. The maximum RF power that can be applied RF Switch ConfigurationChapter Configuring the RF Switch On this moduleSetting the Logical Address Setting the Interrupt Request Level Installing User Wiring Configuring the RF Switch Chapter Connecting User WiringSMB Connectors and Connector Housings Assembling SMB Connector JacksUser Connections Wiring RF Switch Installing Device DriversProgramming the RF Switch Chapter Addressing the SwitchProgramming Examples Chapter Programming the RF SwitchProgramming the RF Switch Chapter Example Closing a Signal Path Example Opening Closing Signal Paths Example Saving Recalling Module States Programming the RF Switch Chapter Common Commands Format Command TypesScpi Commands Format Chapter RF Switch Command ReferenceScpi Command Reference Linking CommandsRF Switch Command Reference Chapter DIAGnosticCLOSe DIAGnosticDIAGnosticOPEN DIAGnosticCLOSe?DIAGnosticOPEN relay,relay... opens individual relays on Reset to its power-on state Common to NCDIAGOPEN333 DIAGnosticOPEN?RSTDIAGThis programCLOS042,043,053,054,256REL?returns DIAGnosticRELAY?ROUTePATHCOMMon ROUTeExample Closing Channel Path 10002 SYSTemERRor? SYSTemSYSTemVERSion? Command Ieee 488.2 Common Commands Quick ReferenceDescription Commands Quick ReferenceAppendix a Appendix a RF Switch SpecificationsRF Switch Specifications Appendix a About This Appendix Appendix BRegister Addressing Addressing OverviewFigure B-1. Register Address Locations Within VXI A16 Base AddressA16 Address Space Outside the Command Module Table B-1. General Register-based Programming Method Register DefinitionsTable B-2. Register Map Register-Based Programming Appendix BTable B-4. Control Register Bit Pattern write Table B-3. Status Register Bit Patterns readRelay Control Registers Vxie Table B-10. Writing to Relay Control Registers Create and open a device session Register Programming ExampleWait 5 seconds before resetting module Void errhandler /* Error Handling Routine Register-Based Programming Appendix B Appendix C Appendix C RF Switch Error MessagesRF Switch Error Messages Appendix C Index IndexIndex E1470-90002