background image

                         Register-Based Programming   91

Appendix B

Example: Reading

the Registers

(C/HP-UX)

This C/HP-UX programming example reads the Manufacturer ID Register, 
Device Type Register and Status Register on the E1466A matrix module.

/***************************************************/ 
/******                            readreg.c                         ******/ 
/**************************************************/

#include       <sys/vxi.h>      /*source file for controller VXI drivers*/ 
#include       <fcntl.h>
#include        <stdio.h>

#define logical_address 120   /*logical address of the matrix module*/

int fd;
typedef unsigned short word; 
typedef struct dev_regs{                   /*set up pointers*/

unsigned short id_reg;

 unsigned 

short 

device_type; 

unsigned short status_reg;
unsigned short bank0_channels; 

} DEV_REGS;

main( )
{
/*open the controller VXI interface*/
fd=open("/dev/vxi/primary",O_RDWR); 
if (fd){

perror("open");
exit(1);

         }
/*retrieve the A16 pointers*/
dev=(struct dev_regs *)vxi_get_a16_addr(fd,logical_address);

/*sub to read the registers*/
read_reg(dev);
/*END of main program*/
}

/*SUB READ_REG*/

int read_reg(reg_ptr)
DEV_REGS *reg_ptr;
{
/*read the ID register*/
printf("\n ID Register = 0x%x\n",reg_ptr->id_reg);
/*read the Device Type register*/
printf("\n Device Type Register = 0x%x\n",reg_ptr->device_type);
/*read the Status register*/
printf("\n Status Register = 0x%x\n",reg_ptr->status_reg);
return;
}

Содержание E1465A

Страница 1: ...Agilent Technologies E1465A E1466A E1467A Relay Matrix Switch Modules User s Manual Manual Part Number E1465 90013 Printed in U S A E0301 ...

Страница 2: ......

Страница 3: ...Setting the Logical Address Switch 21 Setting the Interrupt Level 21 Installing the Switch Module in a Mainframe 23 Configuring the Terminal Modules 24 Terminal Module Connectors 24 Wiring the Terminal Modules 27 Attaching the Terminal Modules to the Switch Module 29 Configuring Larger Matrixes 30 Creating Larger Matrixes 30 Creating a 32x32 Matrix 30 Creating a 4x256 Matrix 32 Creating an 8x96 Ma...

Страница 4: ...Understanding Matrix Modules 47 Advantages of Latching Relays 47 Matrix Module Operations 47 Chapter 4 Matrix Modules Command Reference 49 Using This Chapter 49 Command Types 49 Common Command Format 49 SCPI Command Format 49 SCPI Command Reference 51 ABORt 52 ARM 53 ARM COUNt 53 ARM COUNt 54 DISPlay 55 DISPlay MONitor CARD 55 DISPlay MONitor STATe 56 INITiate 57 INITiate CONTinuous 57 INITiate CO...

Страница 5: ... Address 84 Register Offset 84 Register Descriptions 86 Reading and Writing to the Registers 86 Manufacturer Identification Register 86 Device Type Register 86 Status Control Register 86 Relay Control Register 88 Programming Examples 90 Example Reading the Registers BASIC 90 Example Reading the Registers C HP UX 91 Example Making Measurements BASIC 92 Example Making Measurements C HP UX 93 Example...

Страница 6: ...6 ...

Страница 7: ...EXTENT ALLOWED BY LOCAL LAW THE ABOVE WARRANTIES 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 SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE 8 Agilent will be liable for damage to tangible property per incident up to the greater of 300 000 or the a...

Страница 8: ...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 for use by service trained personnel only Under certain conditions dangerous voltages may exist even with the equipment switched off To avoid dangerous electrical shock DO NOT perform procedures involvi...

Страница 9: ...V CD 8 kV AD IEC 61000 4 3 1995 EN 61000 4 3 1995 3 V m 80 1000 MHz IEC 61000 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 11 1994 EN 61000 4 11 1994 1 cycle 100 Canada ICES 001 1998 Australia New Zealand AS NZS 2064 1 Safety IEC 61010 1 1990 A1...

Страница 10: ...10 Notes ...

Страница 11: ...mory space for readings or data An instrument may be composed of a single plug in module or multiple plug in modules NOTE The matrix model number is determined by the terminal module connected to the PC board If no terminal module is connected the relay matrix switch module defaults to an E1466A To program the E1465A and E1467A make certain the terminal module is connected The E1465A Relay Matrix ...

Страница 12: ...12 Getting Started Chapter 1 Figure 1 1 E1465A 16x16 Relay Matrix Module TERMINAL MODULE MATRIX MODULE A B C D ...

Страница 13: ...Getting Started 13 Chapter 1 Figure 1 2 E1466A 4x64 Relay Matrix Module TERMINAL MODULE MATRIX MODULE A B C D ...

Страница 14: ...14 Getting Started Chapter 1 Figure 1 3 E1467A 8x32 Relay Matrix Module TERMINAL MODULE MATRIX MODULE A B C D ...

Страница 15: ...lumn number of the matrix module Card Number The card number ss of the channel_list identifies the switch module within a switchbox The card number assigned depends on the switch configuration used Leading zeroes can be ignored for the card number For a single module switchbox configuration the card number is always 01 For a multiple module switchbox configuration multiplexer modules are set to su...

Страница 16: ...o variable Value 50 PRINT Value Print results should print 1 to indicate that the channel is closed 60 END Terminate program Table 1 1 Matrix Modules Channel Numbers Matrix Module Rows rr Columns cc E1465A 16x16 Relay Matrix Switch 00 15 00 15 E1466A 4x64 Relay Matrix Switch 00 03 00 63 E1467A 8x32 Relay Matrix Switch 00 07 00 31 Figure 1 4 Card Numbers in a Multiple Module Switchbox Command Modul...

Страница 17: ...ault address define TASK1 RST Reset define TASK2 CLOS 10312 Close row 3 column 12 define TASK3 CLOS 10312 Query row 3 column 12 main char into 257 int length 256 Output commands to matrix module error_handler IOTIMEOUT 7L 5 0 TIMEOUT error_handler IOOUTPUTS MATRIX TASK1 4 OUTPUT command error_handler IOOUTPUTS MATRIX TASK2 15 OUTPUT command error_handler IOOUTPUTS MATRIX TASK3 15 OUTPUT command En...

Страница 18: ...18 Getting Started Chapter 1 Notes ...

Страница 19: ...ed personnel who are aware of the hazards involved should install remove or configure matrix modules Remove all power sources from the mainframe and installed modules before installing or removing a module CAUTION MAXIMUM INPUTS The maximum voltage that can be applied to any terminal is 200 Vdc 170 Vrms The maximum current that can be applied to any row or column is 1 A dc or ac peak The maximum p...

Страница 20: ... 03H 03L 06H 06L 0H 0L 3H 3L GND A A GND ROW ROW 1H 1L COL COL A A 00H 00L COL COL ROW ROW ROW ROW COL COL COL COL COL COL COL COL COL COL COL COL COL COL COL COL COL COL COL COL A 65 Pin B B B B B B B B B B B B A A A A A A A A NC A NC B B 96 Pin GND GND A A 10H 12L 15H 15L 09L 12H 06H 06L 09H 03H 03L 00H 13L 00L 10L 13H 07H 07L 01L 04H 04L 01H 1H 1L 2H 2L Pin 1 CF 10 GND D D NC C C D NC D D D D D...

Страница 21: ...r applications where the matrix module is installed in a C Size mainframe and is a servant of the command module the interrupt line jumper does not have to be moved See Figure 2 3 to change the interrupt line You can select seven different interrupt line levels Line X disables the interrupt and should not be used The module s factory setting is line 1 To change the setting remove the four pin jump...

Страница 22: ...ever if you are using an embedded computer with the E1406A Command Module interrupt line 2 should be selected The Level X interrupt line should not be used under normal operating conditions Figure 2 3 Setting the Interrupt Level Logical Address Switch Location Interrupt Priority Location Using 4 Pin IRQ 7 IRQ 7 2 4 6 5 3 X 1 2 6 5 3 4 X 1 Jumper Jumper Using 2 Pin ...

Страница 23: ...ttom screws until the backplane connectors touch Slide the module into any slot except slot 0 reverse the procedure mainframe to secure the module to the Levers Extraction Set the extraction levers out 4 1 2 the extraction levers mainframe by pushing in Seat the module into the 3 NOTE The extraction levers will not seat the backplane connectors on older VXIbus mainframes You must manually seat the...

Страница 24: ...minal Module Connectors Figure 2 5 shows the E1465A terminal module connectors and associated row column designators Figure 2 6 shows the E1466A terminal module connectors and associated row column designators Figure 2 7 shows the E1467A terminal module connectors and associated row column designators Figure 2 5 E1465A Terminal Module Daisy Chain Column 00 07 00 07 Column Daisy Chain Row 00 07 Row...

Страница 25: ...Configuring the Matrix Modules 25 Chapter 2 Figure 2 6 E1466A Terminal Module for Expansion Daisy Chain Rows 00 03 Rows Columns 32 63 Columns 00 31 ...

Страница 26: ...26 Configuring the Matrix Modules Chapter 2 Figure 2 7 E1467A Terminal Module Daisy Chain Rows for Expansion Rows 00 07 Columns 00 15 Columns 16 31 ...

Страница 27: ...ctions Maximum terminal wire size is No 16 AWG Wire ends should be stripped 6 mm 0 25 in and tinned When wiring all channels use a smaller gauge wire No 20 22 AWG Continued on next page Figure 2 8 Wiring the Terminal Module Remove clear cover 1 Remove and retain wiring exit panel 2 Make connections 3 Route wiring 4 A Release screws B Press tab forward and release Tab Remove 1 of the 3 wire exit pa...

Страница 28: ...ous page Figure 2 9 Wiring the Terminal Module Replace clear cover 6 Cut required holes in panels for wire exit Keep wiring exit panel hole as small as possible Replace wiring exit panel 5 A Hook in the top cover tabs B Press down and tighten screws onto the fixture ...

Страница 29: ...ll screwdriver to release the two extraction levers Relay Marix Switch Module Align the terminal module connectors to the 2 Extraction Lever module to the Relay Matrix Switch Module Apply gentle pressure to attach the terminal terminal module onto the Relay Matrix Switch Push in the extraction levers to lock the 4 Module To remove the terminal module from the Relay Matrix Switch Module use a small...

Страница 30: ...cceeding switch cards have sequential logical addresses For example if you use the matrix default address of 120 for the first card the remaining cards in the switchbox would have logical addresses of 121 122 123 etc When using multiple modules configured as a switchbox you must address the modules as a switchbox For example if you want to close row 00 column 05 on the second card use CLOSe 20005 ...

Страница 31: ...DULES Daisy Chain Rows 00 07 Daisy Chain Cable Daisy Chain Columns 16 31 Rows 08 15 Daisy Chain Rows 16 23 Rows 16 23 Daisy Chain Columns 00 15 24 31 Rows Chain Daisy MODULE 1 MODULE 2 MODULE 4 MODULE 3 Rows 24 31 00 15 Columns Daisy Chain 16 31 Columns Daisy Chain 00 07 Rows 08 15 Rows Chain Daisy ...

Страница 32: ... The daisy chain rows of the second module are then connected to the rows of the next module etc You can continue this pattern to create even larger matrixes For example to connect row 03 to column 255 use CLOSe 40363 This command will close the relay on card 4 row 3 column 63 Figure 2 12 Creating a 4x256 Matrix Daisy Chain Cable Daisy Row Chain Daisy Chain Cable Daisy Row Chain Columns Rows 0 3 0...

Страница 33: ... daisy chain rows of the second module are then connected to the rows of the next module etc You can continue this pattern to create even larger matrixes For example to connect row 4 to column 32 use CLOSe 20400 This command closes the relay on card 2 row 4 column 00 Figure 2 13 Creating an 8x96 Matrix Rows 4 7 0 3 Rows 0 31 Columns Daisy Chain Cable Columns 32 63 Rows 0 3 4 7 Rows Daisy Chain Cab...

Страница 34: ...terface select code is 7 the command module primary address is 08 and and the matrix module s secondary address is 15 This address selects card 2 row 00 column 01 Figure 2 14 Creating Larger Matrixes with Multiple Mainframes E1466A Logical Address 122 E1466A Logical Address 121 E1466A Logical Address 120 Secondary Address 15 E1406A Command Module Primary Address 09 E1466A Logical Address 120 Secon...

Страница 35: ...IB select code 7 primary address 09 and secondary address 15 LADDR 120 for the matrix modules Matrix Modules Commands Table 3 1 explains some of the SCPI commands used in this chapter See Chapter 4 for more information on these commands Table 3 1 Matrix Modules Commands Used in Chapter 3 SCPI Command Command Description ROUTe CLOSe channel_list Closes the channels in the channel_list ROUTe CLOSe c...

Страница 36: ...ication BASIC 10 DIM A 50 B 50 C 50 I Dimensions three string variables to fifty characters 20 OUTPUT 70915 RST CLS Outputs the commands to reset and clears the status register 30 OUTPUT 70915 IDN Queries for module identification 40 ENTER 70915 A I Enters the results into A 50 OUTPUT 70915 SYST CDES 1 Outputs the command for a card description 60 ENTER 70915 B Enters the results into B 70 OUTPUT ...

Страница 37: ...OTIMEOUT 7L 5 0 TIMEOUT error_handler IOOUTPUTS MATRIX TASK1 15 OUTPUT command error_handler IOENTERS MATRIX into1 length ENTER command error_handler IOOUTPUTS MATRIX TASK2 12 OUTPUT command error_handler IOENTERS MATRIX into2 length ENTER command error_handler IOOUTPUTS MATRIX TASK3 12 OUTPUT command error_handler IOENTERS MATRIX into3 length ENTER command printf IDENTIFICATION s into1 printf CAR...

Страница 38: ...in the command syntax The brackets are not part of the command and are not sent to the instrument For example in the following program ROUTe can be eliminated and just the CLOSe or OPEN command can be used 10 DISP TEST E1465A Matrix 20 OUTPUT 70915 ROUT CLOS 10214 30 OUTPUT 70915 ROUT OPEN 10214 40 END Example Channel Sequencing BASIC This example BASIC program sequences through each channel on an...

Страница 39: ...igger the multimeter to perform a measurement The E1406A TTL Trigger Bus Line 1 is used by the multimeter to advance the matrix module channel scan Note that these trigger bus lines are not actual hardware connections Triggering is accomplished by the E1406A firmware Row 00 High and Low of an E1465A 16x 6 matrix module is connected to the voltmeter s High and Low The columns are then scanned switc...

Страница 40: ...1 on measurement complete 60 OUTPUT 70903 CONF RES AUTO DEF Set multimeter function to Resistance 70 OUTPUT 70903 TRIG DEL 0 COUN 16 CAL ZERO AUTO ON Set multimeter Range NPLC functions 80 OUTPUT 70903 OPC 90 ENTER 70903 Check Check to see if multimeter ready 100 OUTPUT 70903 INIT When multimeter is ready initialize trigger 110 OUTPUT 70915 TRIG SOUR TTLTRG1 Set matrix module to be triggered by TT...

Страница 41: ...torage 20 OUTPUT 70915 RST CLS Reset and clear the matrix module 30 OUTPUT 70915 OUTP ON Enable the E1406A Trig Out port 40 OUTPUT 70915 TRIG SOUR EXT Set trigger source to external triggering 50 OUTPUT 70915 SCAN 10000 10015 Set matrix measurement mode and define channel list 60 OUTPUT 70915 INIT Initiate scan 70 WAIT 2 Wait 2 seconds 80 FOR Channels 1 to 16 90 ENTER 722 Results 100 PRINT Results...

Страница 42: ...racters each 20 OUTPUT 70915 CLOS 10000 10731 Closes rows 00 through 07 and columns 00 through 31 30 OUTPUT 70915 CLOS 10000 10331 Queries rows 00 through 03 and columns 00 through 31 40 ENTER 70915 Chan1 Enters the results of the first 128 channel closures 50 OUTPUT 70914 CLOS 10400 10731 Queries rows 04 through 07 and columns 00 through 31 60 ENTER 70915 Chan2 Enters the results of the second 12...

Страница 43: ...TPUT 70915 RST CLS Reset and clear the matrix module 20 OUTPUT 70915 STATUS OPER ENABLE 256 Enable Scan Complete Bit 30 OUTPUT 70915 TRIG SOUR IMM Set matrix module for continuous triggering 40 OUTPUT 70915 SCAN 10000 10015 Select channels to scan 50 OUTPUT 70915 OPC Wait for operation complete 60 ENTER 70915 A 70 PRINT OPC A 80 OUTPUT 70915 STAT OPER ENAB Query OPERation Status register contents ...

Страница 44: ...s see Table 3 2 Example Saving and Recalling States BASIC This program shows one way to save and recall matrix modules states 10 DIM A 30 Dimensions string variable A to 30 characters 20 OUTPUT 70915 CLOS 10000 10015 Closes channels on a matrix module 30 OUTPUT 70915 SAV 5 Saves state as numeric state 5 40 OUTPUT 70915 RST CLS Resets and clears the matrix module 50 OUTPUT 70915 CLOS 10000 10020 Qu...

Страница 45: ...466A 4x64 matrix module and polls for the error message 10 DIM Err_num 256 Dimensions Err_num for 256 characters 20 OUTPUT 70915 CLOS 10500 Try to close an illegal channel 30 OUTPUT 70915 SYST ERR Check for a system error 40 ENTER 70915 Err_num Enter the errors into Err_num 50 PRINT Err_num Prints error 2001 Invalid channel number 60 END Example Detecting Error Conditions TURBO C This Turbo C exam...

Страница 46: ...dule BASIC This BASIC example program shows how to synchronize matrix modules with measurement instruments In this example a matrix module switches a signal to a multimeter The program verifies that the channel is closed before the multimeter begins its measurement 10 OUTPUT 70915 RST Reset the module 20 OUTPUT 70915 CLOS 10012 Close a channel 30 OUTPUT 70915 OPC Wait for operation complete 40 ENT...

Страница 47: ...n the relay contacts cause thermal EMF electromotive force to be generated The life of a latching relay is usually longer than that of a nonlatching relay because of the power that must be continually applied to close a nonlatching relay In conventional switch module designs the module interrupts the central processing unit CPU each time a relay is opened or closed For the E1465A E1466A E1467A mat...

Страница 48: ...y has been activated Because the matrix module asserts IRQ after the last relay is activated the CPU is not continually interrupted Thus system throughput is enhanced Figure 3 3 Matrix Modules Block Diagram Decoder Add Driver One Shot FIFO Address Bus Detector Add Card Add Bus Sysreset Reset Control Logic Card Card Reset PAL FIFO Interface Empty PAL VME Timing DTACK IRQ Buffer Bus Data Data Bus Bu...

Страница 49: ...ry etc Common commands are four or five characters in length always begin with the asterisk character and may include one or more parameters The command keyword is separated from the first parameter by a space character Some examples of Common commands are shown below RST ESR 32 STB SCPI Command Format The SCPI commands perform functions like closing switches opening switches scanning channels que...

Страница 50: ...ters Therefore TRIGGER trigger and TrigGeR are all acceptable Implied Commands Implied commands are those that appear in square brackets in the command syntax The brackets are not part of the command and are not sent to the instrument Suppose you send a second level command but do not send the preceding implied command In this case the instrument assumes you intend to use the implied command and i...

Страница 51: ...ce command where source can be BUS EXTernal HOLD IMMediate or TTLTrgn Numeric Commonly used decimal representations of numbers including optional signs decimal points and scientific notation Examples are 123 123E2 123 1 23E2 123 1 23E 2 1 23000E 01 Special cases include MINimum MAXimum DEFault and INFinity Optional Parameters shown within square brackets are optional parameters The brackets are no...

Страница 52: ...an interface an interface CLEAR command can be used to stop the scan When the scan is enabled via the interface and TRIG SOUR BUS or HOLD is set you can use ABORt to stop the scan Restarting a Scan Use INIT to restart the scan Related Commands ARM INITiate CONTinuous ROUTe SCAN TRIGger Example Stopping a Scan with ABORt This example stops a continuous scan in progress TRIG SOUR BUS Trigger command...

Страница 53: ...32 767 cycles Parameters Comments Number of Scans Use only numeric values between 1 and 32767 MIN or MAX for the number of scanning cycles Related Commands ABORt INITiate IMMediate RST Condition ARM COUNt 1 Example Setting Ten Scanning Cycles This example sets a relay matrix for 10 scans of channels 10000 through 10003 When the scan sequence completes channels 10000 through 10003 are closed ARM CO...

Страница 54: ...or MAX as a parameter MIN returns 1 and MAX returns 32 767 Parameters Comments Related Commands INITiate IMMediate Example Querying Number of Scans This example sets a switchbox for 10 scanning cycles and queries the number of scan cycles set The ARM COUN command returns 10 ARM COUN 10 Set 10 scans per INIT ARM COUN Query number of scans Name Type Range of Values Default Value MIN MAX numeric MIN ...

Страница 55: ...he module in a switchbox to be monitored Parameters Comments Selecting a Specific Module to be Monitored Use DISPlay MONitor CARD to send the card number for the switchbox to be monitored Selecting the Present Module to be Monitored Use DISPlay MONitor CARD AUTO to select the last module addressed by a switching command for example ROUTe CLOSe RST Conditions DISPlay MONitor CARD AUTO Example Selec...

Страница 56: ... Monitored Use DISPlay MONitor CARD number AUTO to select the module Monitor Mode with a Matrix Module When monitoring mode is turned ON a hexadecimal number representing the channels closed will be displayed at the bottom of the display terminal For example for an E1466A with row 0 columns 0 3 closed will look like the following R0 0000 0000 0000 000F R1 0000 0000 0000 0000 R2 0000 0000 etc RST C...

Страница 57: ...e specified by TRIGger SOURce advances the scan through the channel list A trigger at the end of the channel list closes the first channel in the channel list and the scan cycle repeats Noncontinuous Scanning Operation Noncontinuous scanning is enabled with INITiate CONTinuous OFF or INITiate CONTinuous 0 Sending INITiate IMMediate closes the first channel in the channel list Each trigger from the...

Страница 58: ...CONT returns 1 INIT CONT ON Enable continuous scanning INIT CONT Query continuous scanning state INITiate IMMediate INITiate IMMediate starts the scanning process and closes the first channel in the channel list Successive triggers from the source specified by TRIGger SOURce advance the scan through the channel list Comments Starting the Scanning Cycle INITiate IMMediate starts scanning by closing...

Страница 59: ...from the Trig Out port after each scanned switchbox channel is closed If disabled a pulse is not output from the port after channel closures The output pulse is a 5V negative going pulse Trig Out Port Shared by Switchboxes When enabled the Trig Out port is pulsed by any switchbox each time a scanned channel is closed To disable the output for a specific module send OUTPut EXTernal STATe OFF or OUT...

Страница 60: ...and queries the enable state OUTPut EXTernal STATe returns 1 since the port is enabled OUTP EXT ON Enable E1406A Trig Out port OUTP EXT Query port enable state OUTPut STATe OUTPut STATe mode enables or disables the Trig Out port on the E1406A Command Module OUTPut STATe ON 1 enables the port and OUTPut STATe OFF 0 disables the port This command functions the same as OUTPut EXTernal STATe Parameter...

Страница 61: ... TTL Trigger bus line n specifies the TTL Trigger bus line 0 to 7 and mode enables ON or 1 or disables OFF or 0 the specified TTL Trigger bus line Parameters Comments Enabling TTL Trigger Bus When enabled a pulse is output from the selected TTL Trigger bus line 0 to 7 after each channel in the switchbox is closed during a scan If disabled a pulse is not output The output is a negative going pulse ...

Страница 62: ...ut TTLTrgn STATe queries the present state of the specified TTL Trigger bus line The command returns 1 if the specified TTLTrg bus line is enabled or 0 if disabled Example Query TTL Trigger Bus Enable State This example enables TTL Trigger bus line 7 and queries the enable state OUTPut TTLTrgn returns 1 since the port is enabled OUTP TTLT7 STAT 1 Enable TTL Trigger bus line 7 OUTP TTLT 7 Query bus...

Страница 63: ... the relay matrix channels specified by channel_list channel_list has the form ssrrcc where ss matrix module card number 01 99 rr matrix module row number and cc matrix module column number Parameters Comments Closing Channels To close a single channel use ROUT CLOS ssrrcc To close multiple channels use ROUT CLOS ssrrcc ssrrcc To close sequential channels use ROUT CLOS ssrrcc ssrrcc To close group...

Страница 64: ...channel_list has the form ssrrcc where cc card number 01 99 and nn channel number 00 31 The command returns 1 if channel s are closed or returns 0 if channel s are open Comments Query is Software Readback ROUTe CLOSe returns the current software state of the channel s specified It does not account for relay hardware failures A maximum of 128 channels can be queried at one time If you want to query...

Страница 65: ... channels use ROUT OPEN ssrrcc ssrrcc To open groups of sequential channels use ROUT OPEN ssrrcc ssrrcc ssrrcc ssrrcc or any combination of the above Opening Order Opening order for multiple channels with a single command is not guaranteed Related Commands ROUTe CLOSe ROUTe OPEN RST Condition All channels open Example Opening Matrix Modules Channels This example opens channels 10100 and 20013 of a...

Страница 66: ...must enter the query data in two separate commands Example Querying Channel Open State This example opens channels 10100 and 20013 of a two module switchbox and queries channel 20013 state Since channel 20013 is programmed to be open 1 is returned OPEN 10100 20013 Open channels 10100 and 20013 OPEN 20013 Query channel 20013 state ROUTe SCAN ROUTe SCAN channel_list defines the channels to be scanne...

Страница 67: ...annel_list in any random order Scanning Operation When a valid channel list is defined INITiate IMMediate begins the scan and closes the first channel in the channel_list Successive triggers from the source specified by TRIGger SOURce advance the scan through the channel list At the end of the scan the last trigger opens the last channel Stopping Scan See ABORt Related Commands TRIGger TRIGger SOU...

Страница 68: ...6 5 4 and 3 respectively can be queried with the STB command Standard Event Status Register In the Standard Event Status Register you can use ESE to query the unmask value the bits to be logically ORed into the Summary bit The registers are queried using decimal weighted bit values Decimal equivalents for bits 0 through 15 are shown in Figure 3 1 OPERation Status Register Using STATus OPERation EN...

Страница 69: ...12 256 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 2 128 4 8 16 32 1 RQS ESB MAV 1 7 6 3 5 4 2 0 unmask examples ESE 61 unmasks standard event register bits 0 2 3 4 and 5 ESE 128 only unmasks bit 7 SRE 128 unmasks the OPR bit operation in the status byte register This is effective only if the STAT OPER ENAB 256 command is executed STAT QUES ENAB 256 unmasks the Scan Complete Operation Complete 128 7...

Страница 70: ...ng Bit 7 of the Status Byte Register STATus OPERation ENABle 256 sets bit 7 OPR of the Status Byte Register to 1 after bit 8 Scan Complete of the OPERation Status Register is set to 1 Related Commands ROUTe SCAN Example Enabling OPERation Status Register Bit 8 STAT OPER ENAB 256 Enable bit 8 of the OPERation Status Register to be reported to bit 7 OPR in the Status Byte Register STATus OPERation E...

Страница 71: ...of the OPERation Status Register is set to 1 The command returns 0 if bit 8 of the OPERation Status Register is set to 0 Event Register Cleared Reading the Event Register within the OPERation Status Register with STATus OPERation EVENt clears the Event Register Aborting a Scan Aborting a scan will leave bit 8 set to 0 Related Commands ROUTe SCAN Example Reading the OPERation Status Register After ...

Страница 72: ...m CDEScription SYSTem CDEScription number returns the description of a selected module card in a switchbox Parameters Comments E1465A Module Description SYSTem CDEScription returns 16 x 16 Matrix Switch E1466A Module Description SYSTem CDEScription returns 4 x 64 Matrix Switch E1467A Module Description SYSTem CDEScription returns 8 x 32 Matrix Switch Example Reading the Description of a Module SYS...

Страница 73: ...YSTem CTYPe number returns the module card type of a selected module in a switchbox Parameters Comments E1465A Matrix Module Model Number SYSTem CTYPe number returns HEWLETT PACKARD E1465A 0 A 04 00 where the 0 after E1465A is the module serial number always 0 and A 04 00 is an example of the module revision code number E1466A Matrix Module Model Number SYSTem CTYPe number returns HEWLETT PACKARD ...

Страница 74: ... a matrix module stores an error number and corresponding error message in the error queue The error message can be up to 255 characters long Clearing the Error Queue An error number message is removed from the queue each time SYSTem ERRor is sent The errors are cleared first in first out When the queue is empty each following SYSTem ERRor command returns 0 No error To clear all error numbers mess...

Страница 75: ...N channel_list and an INITiate IMMediate must be executed BUS or HOLD Source Remains If selected TRIGger SOURce BUS or TRIGger SOURce HOLD remains in effect after triggering a switchbox with TRIGger IMMediate Related Commands INITiate ROUTe SCAN Example Advancing Scan Using TRIGger This example scans a single module switchbox from channel 10000 through 10003 Since TRIGger SOURce HOLD is set the sc...

Страница 76: ... When the source is changed the external trigger source is available to the next switchbox requesting it with a TRIGger SOURce EXTernal command If a switchbox requests an external trigger input already assigned to another switchbox an error is generated Using Bus Triggers To trigger the switchbox with bus triggers when TRIGger SOURce BUS selected use the IEEE 488 2 common command TRG or the GPIB G...

Страница 77: ...s triggering TRIG SOUR BUS to scan channels 0000 through 0003 of a single module switchbox The trigger source to advance the scan is the TRG command as set with TRIGger SOURce BUS When INIT is executed the scan is started and channel 0000 is closed Then each TRG command advances the scan to the next channel TRIG SOUR BUS Select interface bus triggering SCAN 10000 10003 Scan channels 0000 0003 INIT...

Страница 78: ...igger bus line state ROUTe CLOSe channel _list CLOSe channel _list OPEN channel_list OPEN channel _list SCAN channel_list Closes channel s Queries channel s closed Opens channel s Queries channel s opened Defines channels for scanning STATus OPERation CONDition OPERation ENABle unmask OPERation ENABle OPERation EVENt PRESet Returns status of the Condition Register Enables the Operation Event Regis...

Страница 79: ...eturns a 1 to the output queue when all pending operations have completed Used to synchronize between multiple instruments RCL Recall Instrument State Recalls previously stored configuration RST Reset Opens all channels and sets the module to a known state SAV Save Instrument State Stores the current configuration in specified memory SRE Service Request Enable Sets the Service Request Enable Regis...

Страница 80: ...80 Matrix Modules Command Reference Chapter 4 Notes ...

Страница 81: ...aximum Voltage Terminal to Terminal 200 Vdc or 170 Vacrms 238 Vac peak to peak Maximum Voltage Terminal to Chassis 200 Vdc or 170 Vacrms 238 Vac peak to peak Maximum Current per Channel non inductive 1 Adc or 1 A ac peak Maximum Power per Channel 30 Wdc or 62 5 VA ac resistive load DC Performance Closed Channel Resistance Initial 4 0 W End of Life 10 0 W Insulation Resistance between any two point...

Страница 82: ...to Closed Path typical Open Row to Open Row typical Open Row to Open Column typical Open Column to Open Column typical 10 kHz 72 dB 73 dB 84 dB 92 dB 100 kHz 50 dB 52 dB 64 dB 70 dB 1 MHz 34 dB 37 dB 47 dB 52 dB Module to Module Represents 4 x 128 Configuration Closed Path to Closed Path typical Open Row to Open Row typical Open Row to Open Column typical Open Column to Open Column typical 10 kHz ...

Страница 83: ...to control this module register programming is not recommended The SCPI driver maintains an image of the card state The driver will be unaware of changes to the card state if you alter the card state by using register writes Register based programming is a series of reads and writes directly to the module registers This increases throughput speed since it eliminates command parsing and allows the ...

Страница 84: ...ample the matrix module s factory set logical address is 120 7816 If this address is not changed the switch will have a base address of C00016 120 64 16 C00016 1E0016 DE0016 or 49 152 120 64 49 152 7680 56 832 A16 Address Space Inside the Command Module or Mainframe When the A16 address space is inside the E1406 Command Module see Figure B 2 the matrix module s base address is computed as 1FC00016...

Страница 85: ... Register Bank 0 Control Register 16 06 04 02 16 16 Not Used Status Control Register Device Type Register 00 16 ID Register 1E16 ADDRESS REGISTER 200000 or 2 080 768 IFCOOO Logical Address 64 2 080 768 Logical Address 64 Register Address Base address Register Offset 200000 IF0000 00000016 16 16 Base Address IFC000 16 E1406A ADDRESS MAP FFFFFF EOOOOO16 A24 ADDRESS SPACE 16 200000 A16 ADDRESS SPACE ...

Страница 86: ...ntification Register is at offset address 0016 and returns FFFF16 This shows that Hewlett Packard is the manufacturer and the module is an A16 register based module This register is read only Device Type Register The Device Type Register is at offset address 0216 and returns 012216 for an E1465A E1466A E1467A module This register is read only Status Control Register The Status Control Register is ...

Страница 87: ...it 7 of this register is used to inform the user of a busy condition Enable bit 6 0 indicates the interrupt is enabled The interrupt generated after a channel has been closed can be disabled Bit 6 of this register is used to inform the user of the interrupt status Writing to the Status Control Register You can only write to bits 0 and 6 of the Status Control Register Enable bit 6 Writing a 1 to th...

Страница 88: ... 014 013 012 011 010 009 008 007 006 005 004 003 002 001 000 Bank 1 Relay Control Register Address Base 2216 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 115 114 113 112 111 111 109 108 107 106 105 104 103 102 101 100 Bank 2 Relay Control Register Address Base 2416 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 200 Bank 3 Relay Control Register Address B...

Страница 89: ...02 1001 1000 Bank 11 Relay Control Register Address Base 3616 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1115 1114 1113 1112 1111 1110 1109 1108 1107 1106 1105 1104 1103 1102 1101 1100 Bank 12 Relay Control Register Address Base 3816 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1215 1214 1213 1212 1211 1210 1209 1208 1207 1206 1205 1204 1203 1202 1201 1200 Bank 13 Relay Control Register Address Base 3A16 15 1...

Страница 90: ...ays to store register names and addresses 60 DIM Reg_name 1 3 32 Reg_addr 1 3 70 80 Read register names and addresses into the arrays 90 READ Reg_name 100 READ Reg_addr 110 120 Set base address variable 130 Base_addr DVAL DE00 16 140 150 Map the A16 address space in the controller 160 170 CONTROL 16 25 2 180 Call the subprogram Read_regs 190 Read_regs Base_addr Reg_name Reg_addr 200 210 DATA Ident...

Страница 91: ...p pointers unsigned short id_reg unsigned short device_type unsigned short status_reg unsigned short bank0_channels DEV_REGS main open the controller VXI interface fd open dev vxi primary O_RDWR if fd perror open exit 1 retrieve the A16 pointers dev struct dev_regs vxi_get_a16_addr fd logical_address sub to read the registers read_reg dev END of main program SUB READ_REG int read_reg reg_ptr DEV_R...

Страница 92: ... 32 Reg_addr 1 1 70 80 Read register names and address into the arrays 90 READ Reg_name 100 READ Reg_addr 110 120 Set base address variable 130 Base_addr DVAL DE00 16 140 150 Map the A16 address space in the controller 160 CONTROL 16 25 2 170 Call the subprogram Make_meas 180 Make_meas Base_addr Reg_addr 190 200 DATA Bank0 channels register 210 DATA 06 220 END 280 This subprogram closes bit 1 of b...

Страница 93: ... For example instead of 7000 you might need to use 10000 makemeas c include time h include sys vxi h source file for controller VXI drivers include fcntl h include stdio h define logical_address 120 logical address of matrix module int fd typedef unsigned short word typedef struct dev_regs set up pointers unsigned short id_reg unsigned short device_type unsigned short status_reg unsigned short ban...

Страница 94: ...second tv_sec lapsed tv_usec second tv_usec first tv_usec lapsed tv_sec second tv_sec first tv_sec printf Elapsed time for closing a channel is ld sec ld usec n lapsed tv_sec lapsed tv_usec SUB MAKE_MEAS int make_meas reg_ptr DEV_REGS reg_ptr close bit 1 of bank0 reg_ptr bank0_channels 0x0001 for j 0 j 7000 j wait for switch to close printf n Making Measurement make measurements open bit 1 of bank...

Страница 95: ...s into the arrays 90 READ Reg_name 100 READ Reg_addr 110 Set base address variable 120 Base_addr DVAL DE00 16 130 140 Map the A16 address space in the controller 150 CONTROL 16 25 2 160 Call the subprogram Scan_meas 170 Scan_meas Base_addr Reg_addr 180 190 DATA Bank0 channels register 200 DATA 06 210 END 270 This subprogram sets all bits in bank0 open then scans through 280 bank 0 closing one chan...

Страница 96: ...xample instead of 7000 you might need to use 10000 The math h include file requires a lm option when compiling this program scanning c include time h include math h file to perform math functions include sys vxi h source file for controller VXI drivers include fcntl h include stdio h define logical_address 120 logical address of Form C Switch define lastch 15 int fd i j reg double y typedef unsign...

Страница 97: ...d tzp if first tv_usec second tv_usec second tv_usec 1000000 second tv_sec lapsed tv_usec second tv_usec first tv_usec lapsed tv_sec second tv_sec first tv_sec printf Elapsed time for closing a channel is ld sec ld usec n lapsed tv_sec lapsed tv_usec SUB SCAN_MEAS int scan_meas reg_ptr DEV_REGS reg_ptr set bank0 to 000 reg_ptr bank0_channels 0x000 i 0 for i 0 i lastch i y i reg pow 2 0 y reg_ptr b...

Страница 98: ...98 Register Based Programming Appendix B Notes ...

Страница 99: ... categorized in Table C 1 Error numbers with positive values are not governed by the SCPI standard See the E1406A Command Module User s Manual for further details on these errors Table C 1 Error Types Range Error Types Description 199 to 100 Command Errors syntax and parameter errors 299 to 200 Execution Errors instrument driver detected errors 399 to 300 Device Specific Errors instrument driver e...

Страница 100: ...ther switchbox 2000 Invalid Card Number Addressing a module card in a switchbox that is not part of the switchbox 2001 Invalid Channel Number Attempting to address a channel of a module in a switchbox that is not supported by the module e g channel 99 of matrix module 2006 Command Not Supported On This Card Sending a command to a module card in a switchbox that is unsupported by the module 2008 Sc...

Страница 101: ...e effects of loading and switching frequency on relay life follow Relay Load In general higher power switching reduces relay life In addition capacitive inductive loads and high inrush currents for example turning on a lamp or starting a motor reduces relay life Exceeding specified maximum inputs can cause catastrophic failure Switching Frequency Relay contacts heat up when switched As the switchi...

Страница 102: ...ility of the contact resistance decreases with age Using this method the contact resistance is measured several 5 10 times and the variance of the measurements is determined An increase in the variance indicates deteriorating performance Number of Relay Operations Relays can be replaced after a predetermined number of contact closures However this method requires knowledge of the applied load and ...

Страница 103: ...rror messages 100 error types 99 examples Advancing Scan Using TRIGger 75 Channel Sequencing BASIC 38 Closing Form C Switch Channels 64 Closing Relays BASIC 16 Closing Relays Turbo C 17 Detecting Error Conditions BASIC 45 Detecting Error Conditions TURBO C 45 Enabling Trig Out Port 60 Enabling a Single Scan 58 Enabling Continuous Scanning 58 Enabling Monitor Mode 56 Enabling OPERation Status Regis...

Страница 104: ...sing registers 83 attaching terminal modules 29 command types 49 configuring 19 configuring switch modules 20 configuring terminal modules 24 creating a 32x32 matrix 30 creating a 4x256 matrix 32 creating an 8x96 matrix 33 creating larger matrixes 30 matrix modules cont d creating larger matrixes multiple mainframes 34 description 11 error messages 100 error types 99 installing switch module in ma...

Страница 105: ... and recalling states 44 Scan Complete bit using 42 scanning channels 39 SCPI command reference 51 SCPI commands abbreviated commands 50 command reference 51 command separator 50 format 49 implied commands 50 linking commands 50 parameters 51 quick reference 78 specifications 81 STATus subsystem STATus OPERation CONDition 70 STATus OPERation ENABle 70 STATus OPERation ENABle 70 STATus OPERation EV...

Отзывы: