|
Question:
What is the recommended driver and technique to do scanning using the E8460A and the E1411B? Answer: The latest drivers can be found at http://www.agilent.com/find/inst_drivers Three drivers support the E8460. VOLTMETER Driver Revision: Recommended for scanning with the E1411B. Listed below are the minimum revisions which support scanning.
SWITCH Driver Revision: Recommended for Close/Open operations. Listed below is the minimum revision which included support for the E8460.
E8460 Driver Revision: Not recommended for new designs
The E1411B driver that responds to a *idn? Query with a 8.0 or later revision supports scanning with the E8460A multiplexer. Doing the scanning using the E1411A driver is the preferred method of scanning. Note that the original manual E8460-90001 only contained information for the E8460.du original driver which is no longer recommended. This driver only supported the E8460.du and used a 3 digit channel number scheme that was different from the four digit standard that switch.du and voltmtr.du use. A example of scanning with the voltmtr.du driver would be: ROUTE:FUNC 1,WIRE2 MEAS:RES? (@10000:10002) Notice that before scanning you need to set the number of wires used in the scan. Differences between E8460.du and switch.du/voltmtr.du A major change between the original E8460.du driver and the newer switch.du and voltmtr.du drivers is with channel numbers. Both the E8460 and SWITCH drivers can handle comma separated channel lists, and both can build a sequence of channels when two channel numbers are given separated by a colon ":", but the numbers themselves are changed. The E8460 driver simplified channel numbers since it only had to deal with HP E8460 cards. Channel numbers became of the form ccnnn, where cc was 1 or 2 digits of card number, and nnn was the switch on the card. Unfortunately, SWITCH already had a precedent for channel numbers, namely by using the form cc[nn]nn. Again cc was 1 or 2 digits of card number, but this was to be followed by 2 or 4 digits of switch number - not 3 digits. So the first step in converting E8460 programs into SWITCH programs is to insert a "0" into all the channel numbers. That is, 1123 would become 10123. Now you may notice the brackets [nn] above. That is because if the nn in the brackets is 00, then it is optional. That is, channel 10023 and channel 123 are the same channel in SWITCH (and VOLTMTR, for that matter). Another change is that the diagClos and diagOpen commands do not exist in SWITCH. Previously in the E8460 driver the "normal" routClos and routOpen commands were restricted by routFunc. You could not use routClos or routOpen to program the tree switches (cc300 - cc347) at any time nor even the normal switches (cc000 - cc255) if routFunc was "NONE". The SWITCH driver has removed those restrictions. (They have also been removed from Revision A.01.04 of the E8460 driver.) The tree switches (now cc0300 - cc0347 in SWITCH) can be programmed at any time with the routClos and routOpen commands. The routClos and routOpen commands will also program switches cc0000 - c0255 (in SWITCH) when routFunc is "NONE." So for those cases simply moving the diagClos and diagOpen commands to routClos and routOpen (and inserting the "0") will retain the same functionality when moving from the E8460 driver to the SWITCH driver. The only functionality that is missing from the SWITCH driver is the ability to open or close the individual switches (cc0000 - cc0255) when routFunc is something other than NONE or WIRE1. (They open and close in pairs for WIRE2, in groups of 3 for WIRE3 and in groups of 4 for WIRE4 - not individually.) But such a programming practice is not recommended anyway - use routFunc NONE if you require such detail control of the individual switches. The E8460 driver had a command with SCPI syntax DIAGnostic:INTerrupt[:LINe]. This was a design error. The correct syntax is DIAGnostic:INTerrupt[:LINE]. The SWITCH driver uses the correct syntax. However, since "LINE" is optional, you probably didn't use it anyway so there would not need to be a programming change. And if you are using the Plug & Play driver, that would isolate you from that level of programming too. (Of course, you must change all occurrences of "hpe8460_" to "hpe8460s_" in your program too.) Both the E8460 driver and the SWITCH have modified the DIAG:INT:LINE command. Now, when line 0 is selected, interrupts will actually be turned off. (Since the previous revisions did not turn interrupts off, using line 0 caused some platforms to hang.) Use caution when using line 0. Testing has shown that using line 0 will speed up the simple routOpen and routClos commands on many platforms, but the scan commands may not work properly with line 0. The only way to know for sure is to perform a test on your platform. If line 0 causes the test to hang, then don't use it. Scanning using E8460.du driver. If the old E8460.du driver is used, perhaps to be compatible with old code then here are details on how scanning with a E1411B voltmeter would be accomplished. To scan requires programming two separate instruments the E1411B and the E8460A and programming them to use the TTL trigger lines to synchronize the scanning. The E1411s "VM compl" definition is partially defective. The "VM Compl"signal goes low when the voltmeter finishes sampling its input. It then stays low until it is ready to accept another trigger. It stays low for some computation time and for any auto zero time. The definition should have been that it pules low when it is ready to accept another trigger. A problems arises when the "VM Compl" signal is used to advance a switch. The switch advances on the falling edge of "VM Compl" When the switch has advanced it pulses the Ext Trig of the voltmeter. With the E1411 and the E8460 the E8460 will send a Ext Trig to the voltmeter before the voltmeter is ready. When this happens the voltmeter misses the Ext Trig, and the scanning becomes hung. To work around the above problem, a special command has been added to the E8460A driver to delay the triggering of the voltmeter. The driver revision must be A.01.01 with file creation date of at least 4/98. DIAG:SCAN:DEL ,is the MUX being addressed If only one E8460A is present, slot will always be one. If two E8460A are at successive logical addresses then the first on will be slot one and the second one will be slot 2. This is the amount of time to delay from the switch actually closing until the OUTP signal is sources which will be going to the Ext Trig of the voltmeter. Delay_time is in seconds and has a resolution of 100 usec. maximum. The amount of delay needed for the E1411 depends on the aperture and auto zero setting. For Auto Zero OFF the delay_time should be: .0003.For Auto Zero On the delay_time should be: (Aperature_time + .0004) Here are some examples: DELAY TIMES FOR SCANNING APERTURE AZ ON AZ OFF -----------------------------20E-3 .0204 .0003 16.7E-3 .0181 .0003 2.5E-3 .0029 .0003 1E-3 .0005 .0003 10E-6 .0004 .0003 Here is a BASIC program which demonstrates scanning. 10 ! re-save "8460_scan" 20 ! THIS PROGRAM DEMONSTRATES SCANNING WITH E1411 & E8460 30 ! This main line code is reserved as a error handling shell 40 ! All application code must be at lower level context in SUB Main 50 ASSIGN @Sys TO 70900 ! define I/O paths 60 ASSIGN @Dvm TO 70903 70 ASSIGN @Sw TO 70906 80 COM /Instr/ @Sys,@Dvm,@Sw ! Use COM so command line I/O always works 90 ON TIMEOUT 7,10 GOTO End ! Turn TIMEOUTS to errors--this branch never 100 ON ERROR RECOVER Kaboom ! This handles timeouts and errors not handled 110 ! at lower level contexts 120 ON KEY 1 LABEL "QUIT& ?" RECOVER Quit ! KEY to quit & check for errors 130 ON KEY 2 LABEL "END!",15 RECOVER End ! KEY to END now, no error check 140 Main ! Put application code in this sub 150 Quit:PRINT "Checking for E13xx Errors at the end of the program" 160 E13xx_errors 170 GOTO End 180 Kaboom:PRINT "" 190 PRINT ERRM$ 200 PRINT "Checking for E13xx Errors as a BASIC Error has occurred" 210 E13xx_errors 220 End:END 230 ! 240 E13xx_errors:SUB E13xx_errors ! This sub reads all errors from E13xx 250 COM /Instr/ @Sys,@Dvm,@Sw 260 DIM A$[128] 270 ABORT 7 ! Free bus handshaking 280 ! Add a error loop for each instrument 290 ! 300 CLEAR @Sys ! Terminate instrument activity & clear input/output 310 REPEAT ! Read the entire instrument error que 320 OUTPUT @Sys;"SYST:ERR?" 330 ENTER @Sys;A,A$ 340 PRINT "SYSTEM ERROR ";A$ 350 UNTIL A=0 360 ! 370 ! 380 CLEAR @Sw ! Terminate instrument activity & clear input/output 390 REPEAT ! Read the entire instrument error queue 400 OUTPUT @Sw;"SYST:ERR?" 410 ENTER @Sw;A,A$ 420 PRINT "SWITCH ERROR ";A$ 430 UNTIL A=0 440 ! 450 CLEAR @Dvm 460 REPEAT 470 OUTPUT @Dvm;"SYST:ERR?" 480 ENTER @Dvm;A,A$ 490 PRINT "DVM ERROR ";A$ 500 UNTIL A=0 510 ! 520 E13xx_errors_:SUBEND 530 ! 540 Main:SUB Main !This subroutine is treated as the main line 550 COM /Instr/ @Sys,@Dvm,@Sw 560 ! Put application code here 570 ! FULLY RESET SWITCH AND DVM 580 CLEAR @Sw 590 OUTPUT @Sw;"*RST;*CLS;*OPC?" 600 ENTER @Sw;A 610 CLEAR @Dvm 620 OUTPUT @Dvm;"*RST;*CLS;*OPC?" 630 ENTER @Dvm 640 ! 650 ! CONFIGURE DVM 660 OUTPUT @Dvm;"CONF:VOLT:DC" 670 ! Auto zero on doesn't work on 16.7 & 2.5 msec & 100 usec aperature 680 ! with E1411 and E8460 690 OUTPUT @Dvm;"CAL:ZERO:AUTO ON" 700 OUTPUT @Dvm;"volt:range 8" 710 ! 720 OUTPUT @Dvm;"volt:aper 16.7e-3" ! 10e-6|100e-6|2.5e-3|16.7e-3 730 ! 740 OUTPUT @Dvm;"TRIG:SOUR TTLT0;:TRIG:COUNT 10"! RECEIVE TRIGGER ON TTLT0" 750 OUTPUT @Dvm;"OUTP:TTLT1:STATE ON"!SEND ADVANCE SCAN ON TTLT1 760 OUTPUT @Dvm;"*OPC?" 770 ENTER @Dvm;A 780 ! CONFIGURE SWITCH 790 OUTPUT @Sw;"func 1,wire1" 800 OUTPUT @Sw;"SCAN (@1000:1009);:SCAN:PORT ABUS" 810 OUTPUT @Sw;"TRIG:SOUR TTLT1"!RECEIVE ADVANCE SCAN ON TTLT1 820 OUTPUT @Sw;"OUTP:TTLT0:STATE ON"!SEND TRIGGER TO DVM USING TTLT0 830 ! 840 ! DELAY TIMES FOR SCANNING 850 ! APERATURE AZ ON AZ OFF 860 ! 20E-3 .0204 .0003 870 ! 16.7E-3 .0181 .0003 880 ! 2.5E-3 .0029 .0003 890 ! .1E-3 .0005 .0003 900 ! 10E-6 .0003 .0003 910 ! 920 OUTPUT @Sw;"DIAG:SCAN:DEL 1,.0181" 930 ! 940 OUTPUT @Sw;"*OPC?" 950 ENTER @Sw;A 960 ! 970 FOR I=1 TO 100 980 OUTPUT @Dvm;"init" 990 OUTPUT @Sw;"INIT"! CLOSE FIRST SWITCH TO ENABLE SCAN 1000 ! 1010 DIM Readings(0:9) 1020 OUTPUT @Dvm;"FETC?" 1030 ENTER @Dvm;Readings(*) 1040 ! PRINT Readings(*) 1050 PRINT "loop count ";I 1060 NEXT I 1070 Main_:SUBEND |