640! If output relay open (disabled) but should be closed, clear main
650! output enable bit.
660!
670IF Out1_state AND NOT
680WRITEIO
690END 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
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 |
830END 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 |
920END 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!
970IF
980IF Out1_state THEN
990 | Out_ctrl= BINIOR(Out_ctrl,16) | ! Relay close |
1000 | ELSE |
|
1010 | Out_ctrl= | ! Relay open |
1020 | END IF |
|
1030 | END IF |
|
1040 | ! |
|
Continued on Next Page
| Example Programs |