1120 Atten=Atten+(Ampl/1.0235)*2047
1130 C$=DVAL$(Atten,16)
1140 Offset=((Offset/.005)*10)+2048
1150 END IF
1160 END SELECT
1170 !
1180 !Load the attenuation value
1190 Write_reg(8,4)
1200 Write_reg(10,IVAL(C$[5;2],16))
1210 Write_reg(10,IVAL(C$[7;2],16))
1220 Check_done
1230 !
1240 !Load the offset value
1250 C$=DVAL$(Offset,16)
1260 Write_reg(8,3)
1270 Write_reg(10,IVAL(C$[5;2],16))
1280 Write_reg(10,IVAL(C$[7;2],16))
1290 Check_done
1300 SUBEND
1310 !
1320 SUB Linsweep(Start_freq,Stop_freq,Rate)
1330 Linsweep: !Subprogram which sets up linear sweeps
1340 COM Base_addr
1350 !Set start and stop frequencies
1360 Frequency1(Start_freq)
1370 Frequency2(Stop_freq)
1380 !Calculate phase (frequency) increment
1390 Tic_cnt=256
1400 REPEAT
1410 Phase_inc=(Stop_freq-Start_freq)*(.00025+.0001*Tic_cnt)/Rate
1420 Tic_cnt=Tic_cnt-1
1430 UNTIL Phase_inc>=.01 AND Phase_inc<42949672.955 OR Tic_cnt=0
1440 C$=DVAL$(INT(100.*Ph.5),16)
1450 !
1460 !Load the phase increment, tic count, and sweep type value
1470 Write_reg(8,7)
1480 Write_reg(10,IVAL(C$[1;2],16)) !phase increment
1490 Write_reg(10,IVAL(C$[3;2],16)) !phase increment
1500 Write_reg(10,IVAL(C$[5;2],16)) !phase increment
1510 Write_reg(10,IVAL(C$[7;2],16)) !phase increment
1520 Write_reg(10,BINAND(1,255)) !tic count
1530 Write_reg(10,0) !linear sweep
1540 Check_done
Appendix C
HP E1340A Register-Based Programming 275
Summary of Contents for E1340A
Page 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Page 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Page 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Page 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Page 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Page 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Page 218: ...218 HP E1340A Specifications Appendix A ...
Page 284: ...284 HP E1340A Register Based Programming Appendix C ...
Page 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...