Agilent Technologies E1446A Car Amplifier User Manual


 
1970 ! Set inactive state by turning off input attenuator control bits
1980 ! and disabling inverter
1990 !
2000 WRITEIO -16,Base_addr+ 12;BINIOR(BINAND(In_ctrl,1542),1)
2010 SUBEND
2020 SUB Set_e46_offset(Offset)
2030 COM /E1446/ Base_addr,INTEGER In_ctrl,Out_imped
2040 REAL Offset_dac
2050 !
2060 ! Look for settings conflict
2070 !
2080 IF Out_imped= 0 THEN
2090 Offset_dac= -Offset/.0006103515625
2100 ELSE
2110 Offset_dac= -Offset/.00030517578125
2120 END IF
2130 IF Offset_dac< -32768.5 OR Offset_dac> = 32767.5 THEN
2140 DISP "Invalid SOUR:VOLT:LEV:IMM:OFFS value"
2150 STOP
2160 END IF
2170 !
2180 ! Set offset
2190 !
2200 WRITEIO -16,Base_addr+ 8;BINEOR(Offset_dac,32767)
2210 SUBEND
2220 !
2230 SUB Errmsg
2240 Errmsg: !Subprogram which displays E1445/E1446 programming errors
2250 DIM Message$[256]
2260 !Read AFG status byte register and clear service request bit
2270 B= SPOLL(1680)
2280 !End of statement if error occurs among coupled commands
2290 OUTPUT 1680;""
2300 OUTPUT 1680;"ABORT" !abort output waveform
2310 REPEAT
2320 OUTPUT 1680;"SYST:ERR?" !read AFG error queue
2330 ENTER 1680;Code,Message$
2340 PRINT Code,Message$
2350 UNTIL Code= 0
2360 STOP
2370 SUBEND
Example Programs Register-Based Programming C-31