Agilent Technologies E1446A Car Amplifier User Manual


 
640 ! If output relay open (disabled) but should be closed, clear main
650 ! output enable bit.
660 !
670 IF Out1_state AND NOT BINAND(READIO(-16,Base_addr+ 4),256) THEN
680 WRITEIO -16,Base_addr+ 10;BINAND(READIO(-16,Base_addr+ 10),-17)
690 END IF
700 !
710 ! Set up output and input relays. Close new relays, particularly the
720 ! attenuation and impedance relays, before opening old relays to prevent
730 ! a possible momentary all-open situation which could output a high-
740 ! voltage glitch.
750 !
760 ! Do output side first
770 !
780 SELECT Out1_atten ! Set main output attenuation
790 CASE 0.
800 Out_ctrl= 128 ! Close 0 dB path relay
810 CASE 20.
820 Out_ctrl= 64 ! Close 20 dB path relay
830 END SELECT
840 !
850 SELECT Out1_imped ! Set main output impedance
860 CASE 0.
870 Out_ctrl= BINIOR(Out_ctrl,34) ! Close 0 Ohm relay
880 CASE 50.
890 Out_ctrl= BINIOR(Out_ctrl,32) ! Close 50 Ohm relay
900 CASE 75.
910 Out_ctrl= BINIOR(Out_ctrl,0) ! 75 Ohm - no action
920 END SELECT
930 !
940 ! If output relay was closed (enabled), set new state here. If it
950 ! was open, close it before previous configuration is removed.
960 !
970 IF BINAND(READIO(-16,Base_addr+ 4),256) THEN
980 IF Out1_state THEN
990 Out_ctrl= BINIOR(Out_ctrl,16) ! Relay close
1000 ELSE
1010 Out_ctrl= BINAND(Out_ctrl,-17) ! Relay open
1020 END IF
1030 END IF
1040 !
Continued on Next Page
C-28 Register-Based Programming Example Programs