background image

Programming the RF Switch 23

Chapter 2

Example: Closing a

Signal Path

This program example closes a signal path from COM 01 to channel 010
and verifies that the path is closed.

#include <visa.h> 

#include <stdio.h> 

#include <stdlib.h>
void err_handler(); 

void main()

{

int ch_closed;
/* Create and open a device session, E1470 is at logical address 120 */
ViStatus err; 

ViSession defaultRM,rf_mux; 

ViOpenDefaultRM (&defaultRM); 

viOpen (defaultRM,"GPIB-VXI0::9::120",VI_NULL,VI_NULL,&rf_mux);
/* Close a path from COM 01 to channel 010 */
err= viPrintf (rf_mux,"PATH:COMM 01,011\n");

if (err < VI_SUCCESS) err_handler (rf_mux,err);

/* Verify the path closure */
err = viPrintf (rf_mux,"PATH:COMM? 01,011\n");

if (err < VI_SUCCESS) err_handler (rf_mux,err);

err = viScanf (rf_mux,"%d",&ch_closed);

if (err < VI_SUCCESS) err_handler (rf_mux,err);

if (ch_closed == 1) printf ("Signal path is closed");

else printf ("Signal path is NOT closed");

/* Close the 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); 

printf ("Error = %s\n",err_msg); 

return;

}

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Содержание E1470A Series

Страница 1: ...service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE IN...

Страница 2: ...nologies E1470A Cascade RF Switch Module User s Manual E1470 90002 Manual Part Number E1470 90002 Printed in U S A E1100 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www a...

Страница 3: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Страница 4: ...0 Programming Examples 21 Example Module Self Test 21 Example Closing a Signal Path 23 Example Opening and Closing Signal Paths 24 Example Saving and Recalling Module States 25 Chapter 3 RF Switch Com...

Страница 5: ...42 Register Offset 43 Reset and Registers 44 Register Definitions 44 Manufacturer Identification Register 45 Device Identification Register 45 Status Control Register 45 Relay Control Registers 46 Reg...

Страница 6: ...ARRANTIES ARE EXCLUSIVE AND NO OTHER WARRANTY OR CONDITION WHETHER WRITTEN OR ORAL IS EXPRESSED OR IMPLIED AND AGILENT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OR CONDITIONS OF MERCHANTABILITY SATI...

Страница 7: ...e repaired fuses or short circuited fuse holders Keep away from live circuits Operating personnel must not remove equipment covers or shields Procedures involving the removal of covers or shields are...

Страница 8: ...4 4 1995 EN 61000 4 4 1995 0 5 kV signal lines 1 kV power lines IEC 61000 4 5 1995 EN 61000 4 5 1995 0 5 kV line line 1 kV line ground IEC 61000 4 6 1996 EN 61000 4 6 1996 3 V 0 15 80 MHz IEC 61000 4...

Страница 9: ...8 Notes Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Страница 10: ...lexer etc Cascading all twenty 3 to 1 multiplexers forms one 60 to 1 multiplexer Multiple combinations are simultaneously allowed on the module User connections to the module are to SMB connectors on...

Страница 11: ...OM 11 6 1 K113 COM 10 3 1 K111 K112 112 111 110 K122 121 122 120 K121 K124 K123 COM 12 9 1 K132 132 131 130 K131 K134 K133 COM 13 12 1 12 1 Input 12 1 A 30 1 Output to Right Side Board Channel Numbers...

Страница 12: ...12 1 K256 K233 K243 K212 K202 K214 K203 K213 COM 24 COM 25 15 1 COM 22 COM 23 12 1 9 1 COM 20 COM 21 6 1 3 1 A 30 1 Input Input from Channels 0xx and 1xx 30 1 Board on Left Side or 30 1 No Connection...

Страница 13: ...hannels 100 through 132 can go to COM 05 as well as to COM 13 and channels 300 through 332 can go to COM 25 as well as to COM 33 For example COM 01 can be used as the common for channels 000 002 and 0...

Страница 14: ...d install remove or configure the module Before you remove any installed module disconnect AC power from the mainframe and from other modules that may be connected to the module WARNING CHANNEL WIRING...

Страница 15: ...When using the Cascade RF Switch module with an E1406 Command Module the address must be a multiple of 8 for example 8 16 24 112 120 128 240 248 The module cannot be configured as part of a multiple m...

Страница 16: ...y level that will be asserted The Interrupt Request Level switch is set in position 1 as shipped from the factory For most applications this priority level should not be changed The interrupts are dis...

Страница 17: ...02 03 04 05 042 041 101 102 040 COM 10 111 112 110 COM 05 052 051 021 022 COM 02 020 COM 04 COM 03 050 032 COM 01 030 031 002 001 000 COM 00 011 012 010 Numbers Channel 30 31 32 33 10 11 12 13 COM BB...

Страница 18: ...lder must be used if adjacent sockets on the module are used See Table 1 1 Assembling SMB Connector Jacks Figure 1 7 shows how to assemble the SMB connector jacks Jacks for double shielded cable requi...

Страница 19: ...01 CH 111 CH 241 CH 000 CH 112 CH 240 COM 01 COM 12 COM 25 CH 010 CH 122 CH 252 CH 011 CH 121 CH 251 CH 012 CH 120 CH 250 COM 02 COM 13 COM 30 CH 022 CH 130 CH 300 CH 021 CH 131 CH 301 CH 020 CH 132 C...

Страница 20: ...VXIplug play driver or using SCPI commands embedded in an I O language For the latest information on drivers see the Agilent Web Site http www agilent com find inst_drivers To download the SCPI Instr...

Страница 21: ...a channel PATH COMM 00 001 Connects COM 00 to Channel 001 COM 00 is common to channels 000 001 002 forming a 3 to 1 mux PATH COMM 04 020 Connects COM 04 to Channel 020 COM 04 is common to channels 02...

Страница 22: ...the relay positions match the configurations programmed using the ROUT PATH commands NOTE TST results are unpredictable if you use register based programming or DIAG CLOS or DIAG OPEN to control indiv...

Страница 23: ...no while err VI_SUCCESS err viScanf rf_mux d err_no if err no 0 printf nSelf Test Error d n err_no else printf nNo Self Test Errors Close a signal path from COM 02 to Channel 002 err ViPrintf rf_mux P...

Страница 24: ...se a path from COM 01 to channel 010 err viPrintf rf_mux PATH COMM 01 011 n if err VI_SUCCESS err_handler rf_mux err Verify the path closure err viPrintf rf_mux PATH COMM 01 011 n if err VI_SUCCESS er...

Страница 25: ...x Close a path from COM 01 to channel 011 err viPrintf rf_mux PATH COMM 01 011 n if err VI_SUCCESS err_handler rf_mux err Verify path closure err viPrintf rf_mux PATH COMM 01 011 n if err VI_SUCCESS e...

Страница 26: ...tates and then use the RCL command to return to a specific saved state The commands have the form SAV n and RCL n where n has a range of 0 to 9 Error 222 Data out of range results if a value other tha...

Страница 27: ...I_SUCCESS err_handler rf_mux err err viScanf rf_mux d ch_closed if err VI_SUCCESS err_handler rf_mux err Recall state number 1 err viPrintf rf_mux RCL 1 n if err VI_SUCCESS err_handler rf_mux err Veri...

Страница 28: ...tructure is a hierarchical structure that usually consists of a top level or root command one or more lower level commands and their parameters The following example shows part of a typical subsystem...

Страница 29: ...mplied command as is the command COMMon To close a signal path you can send any of the following command statements PATH 2 1 ROUT PATH 2 1 PATH COMM 2 1 ROUT PATH COMM 2 1 These commands function the...

Страница 30: ...Parameters Comments Invalid Values Values other than those listed in the table cause error 2022 Invalid relay number Closing Relays To close single relays use DIAG CLOS abc To close multiple relays us...

Страница 31: ...ers causes error 108 Parameter not allowed Example Querying Relay Closures RST Reset module and open all relays DIAG CLOS 002 Closes relay 002 connects CH002 to relay 003 in bank 00 DIAG CLOS 001 002...

Страница 32: ...buffer contains an unquoted string containing the result for the relay s 0 Not Opened COMMON to NO and 1 Opened COMMON to NC Invalid Values Values other than those listed in the table cause error 202...

Страница 33: ...s a relay number If no relay is closed the output buffer will contain the null string This is a register readback command that returns the current state of the registers controlling the relays It does...

Страница 34: ...h paths use the same relays See Chapter 1 to determine if this might happen Use ROUTe PATH to determine if a path is closed Invalid Values Invalid comm and channel values or combinations may cause one...

Страница 35: ...ermine if a path is closed Closing one path may open another path if both paths use the same relays See Chapter 1 to determine if this might happen Invalid Values Invalid comm and channel values or co...

Страница 36: ...ter 3 Example Querying Paths Opened Closed PATH 2 1 Connects COMMON in Bank 02 to channel 1 in bank 00 PATH 2 1 Returns 1 PATH 0 002 Returns 0 Artisan Technology Group Quality Instrumentation Guarante...

Страница 37: ...command is sent The errors are cleared first in first out When the queue is empty each following SYSTem ERRor query command returns 0 No error To clear all error numbers messages in the queue execute...

Страница 38: ...peration is the time delay 16 msec provided to allow the relays to settle If this command waits longer than about 60 msec the error 240 Hardware error is generated RCL numeric state Recalls the instru...

Страница 39: ...OPEN DIAGnostic RELAY Closes individual relays Returns a number that indicates the closed state of each relay in the list Opens individual relays Returns a number that indicates the open state of each...

Страница 40: ...45 500 MHz 1 7 VSWR Voltage Standing Wave Ratio for a 30 1 Multiplexer 200 MHz 1 5 30 1 muxs are channels 000 132 to COM05 or channels 200 332 to COM25 multiplexers VSWR Voltage Standing Wave Ratio f...

Страница 41: ...40 RF Switch Specifications Appendix A Notes Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Страница 42: ...register for either read or write operations the address of the register must be used Register addresses for the plug in modules are in an address space known as VXI A16 The exact location of A16 wit...

Страница 43: ...Control Register Device Type Register Manufacturer ID Register 10 16 Relay Control Register Relay Control Register Relay Control Register Relay Control Register 16 BIT WORDS Register 22 20 24 16 16 1...

Страница 44: ...DDRh 40h or decimal 2 080 768 LADDR 64 where 1FC000h 2 080 768 is the starting location of the VXI A16 addresses LADDR is the module s logical address and 64 is the number of address bytes per registe...

Страница 45: ...a VXIbus interrupt acknowledge cycle Table B 1 General Register based Programming Method System Typical Commands Base Address External Computer over GPIB to E1406 Command Module VXI READ logical_addre...

Страница 46: ...Register and write to the Control Register Table B 3 Status Register Bit Patterns read Address b 04h Address b 05h 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 1 1 1 1 1 CDI0 CDI1 BSY IEN 1 1 1 1 1 SR SR s...

Страница 47: ...ite K134 K133 K132 K131 K124 K123 K122 K121 K114 K113 K112 K111 K051 K103 K102 K101 Read K134 K133 K132 K131 K124 K123 K122 K121 K114 K113 K112 K111 K051 K103 K102 K101 Table B 7 Right hand Relay Asse...

Страница 48: ...commands VXI SEL 120 Selects logical address VXI REG WRIT 20 2 Writes value 2 to register 20h To set relays K001 K003 K014 K013 and K024 connect CH 001 to COM 02 set bits 0 2 7 6 and 11 decimal values...

Страница 49: ...ter 20h 0 2112 29632 13248 13248 13248 Write to register 28h x x x 4 38 32714 To connect CH011 to COM01 COM02 COM03 COM04 COM05 COM25 Write to register 20h 16 2128 29616 13232 13232 13232 Write to reg...

Страница 50: ...h for Both Assemblies 0x 26 include visa h include stdio h include stdlib h include string h include time h ViSession defaultRM rf_mux void err_handler void wait void main void unsigned short reg_20h...

Страница 51: ...es err viIn16 rf_mux VI_A16_SPACE 0x20 reg_20h if err VI_SUCCESS err_handler rf_mux err err viIn16 rf_mux VI_A16_SPACE 0x22 reg_22h if err VI_SUCCESS err_handler rf_mux err err viIn16 rf_mux VI_A16_SP...

Страница 52: ...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 curre...

Страница 53: ...52 Register Based Programming Appendix B Notes Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Страница 54: ...ore than 60 msec was required for the relays to settle OPC OPC WAI 2001 Invalid channel number Invalid channel number in source parameter ROUT PATH COMM ROUT PATH COMM 2022 Invalid relay number Invali...

Страница 55: ...54 RF Switch Error Messages Appendix C Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Страница 56: ...tic RELAY 32 documentation history 6 E error messages RF switch 53 examples Closing Channel Path 34 Closing Relays 29 Module Self Test 21 Opening and Closing Signal Paths 24 Opening Relays 31 Querying...

Страница 57: ...g 19 specifications 39 ROUTe PATH COMMon 33 ROUTe PATH COMMon 34 ROUTe subsystem 33 S safety symbols 6 SCPI commands abbreviated 27 command reference 28 command separator 27 format 27 implied 28 linki...

Страница 58: ...E1470 90002 Manual Part Number E1470 90002 Printed in U S A E1100 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Страница 59: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...

Страница 60: ...service in house repair center WE BUY USED EQUIPMENT Sell your excess underutilized and idle used equipment We also offer credit for buy backs and trade ins www artisantg com WeBuyEquipment REMOTE IN...

Отзывы: