Agilent Technologies E1470A user manual Void errhandler /* Error Handling Routine

Page 51

/* wait 1 second (must wait at least 100 usec before writing a "0") */

wait(1);

err = viOut16(rf_mux,VI_A16_SPACE,0x04,0); if(err < VI_SUCCESS)err_handler(rf_mux,err);

printf("\n\nE1470A is reset");

/* Close Session */

viClose (rf_mux); viClose (defaultRM);

}

void err_handler() /* Error Handling Routine */

{

ViStatus err;

char err_msg[1024] = {0}; viStatusDesc(rf_mux,err,err_msg);

if(strcmp ("VI_SUCCESS: No error",err_msg) != 0) printf("ERROR = %s\n",err_msg);

return;

}

void wait (int wait_seconds) /* Wait for specified period in seconds */

{

time_t current_time; time_t entry_time; fflush(stdout);

if(-1 == time(&entry_time))

{

printf ("Call failed, exiting ...\n"); exit(1);

}

do

{

if (-1 == time)¤t_time))

{

printf("Call failed, exiting ...\n"); exit(1);

}

}

while ((current_time - entry_time) ((time-t)wait_seconds)); fflush(stdout);

}

Appendix B

Register-Based Programming 51

Image 51
Contents E1470-90002 Page Contents Appendix C RF Switch Error Messages Index Government Restricted Rights Agilent Technologies Warranty StatementDocumentation History Safety SymbolsModel Number Manufacturer’s NameManufacturer’s Address Declares, that the product Product NamePage Using This Chapter Switching DiagramChapter Cascade Relays COM 33 332 Creating Multiple Multiplexers Configuring the RF Switch ChapterOn this module RF Switch ConfigurationMaximum POWER. The maximum RF power that can be applied Chapter Configuring the RF SwitchSetting 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 Chapter RF Switch Command Reference Command TypesCommon Commands Format Scpi Commands FormatScpi Command Reference Linking CommandsRF Switch Command Reference Chapter DIAGnosticCLOSe DIAGnosticReset to its power-on state Common to NC DIAGnosticCLOSe?DIAGnosticOPEN DIAGnosticOPEN relay,relay... opens individual relays onDIAGOPEN333 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 Addressing Overview Appendix BAbout This Appendix Register AddressingFigure B-1. Register Address Locations Within VXI A16 Base AddressA16 Address Space Outside the Command Module Register-Based Programming Appendix B Register DefinitionsTable B-1. General Register-based Programming Method Table B-2. Register MapTable 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