EasyManua.ls Logo

Giga-tronics 58542 - Page 184

Default Icon
252 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
58542 VXIbus Universal Power Meter
A-2 Publication 21555, Rev. E, September 2002
A.2.2 Sensor Calibration Example 2
The power meter measurement functions are operated to tight tolerances during sensor calibration. If
the sensor passes calibration, it is a good health check of the 58542 VXI Power Meter. In general, the
power meter and sensors are operating properly if they pass the calibration process. For instance, the
calibration process will fail if the sensor detector elements have been damaged. Also see the self test
functions, which are initiated using the *TST command or the DIAG: commands (See Table5-1).
The following program uses the CAL? query format to perform power sweep calibration of a power
sensor and sends back a pass/fail flag upon completion. Completion of the calibration function is
monitored via service requests using the *OPC, operation complete command.
330 !
340 !################################
350 !
350 ! CALIBRATE THE SENSORS
370 !
380 !################################
390 ASSIGN@Pwr_mtr to 70101
400 CLEAR@Pwr_mtr
410 WAIT 1
420 OUTPUT@Pwr_mtr;*CLS ! Clear status registers and error queue buffer
425 WAIT 0.3
430 OUTPUT@Pwr_mtr;*ESE 1 ! Standard Event Status Enable bit 0, Operation Complete
440 OUTPUT@Pwr_mtr;*SRE 32 ! Service Request Enable Status Byte bit 5, Standard
! Event Status Register
450 !
460 ON INTR 7 GOSUB Spoll_intr
470 ENABLE INTR 7;2
480 !
490 ! Calibration Routine
500 !
510 INPUT Connect the sensor to the calibrator. Then press ENTER.,Dmy
520 PRINT Calibrating Sensor 1...
525 Srq_flag=0
530 OUTPUT@Pwr_mtr;CAL1?;*OPC ! For zeroing substitute CAL1:ZERO? for CAL1?
540 !
550 !
560 ! Now wait for srq
570 !
580 !
590 !
600 WHILE Srq_flag=0
610 END WHILE
620 !
630 ! Enter Pass/Fail Flag, This comes with query format, CAL1?, rather than command format, CAL1.
640 !
650 ENTER@Pwr_mtr;Pass_cal
660 IF Pass_cal=0 THEN PRINT Calibration Passed
670 IF Pass_cal=1 THEN
680 OUTPUT@Pwr_mtr;SYST:ERR?
690 ENTER@Pwr_mtr;Err_msg$ ! Reading an error message clears it.
700 PRINT The power meter reports the following error.,ERR_msg$
710 PRINT Calibration FAILED, sensor on calibrator?
720 ELSE
730 IF Pass_cal<>0 THEN PRINT Strange Response to CAL1?. Other Event Status Register Bits Too?
740 END IF
750 !
760 STOP
770 !
780 Spoll_intr: !
790 !
800 State=SPOLL(@Pwr_mtr)
810 PRINT SPOLL INTR:;State

Table of Contents