Test 2-8: Duty Cycle (cont’d)
Example Program (cont’d)
410 !Take readings here
420 PRINT "Output Frequency =";Freq(I);" Hz"
430 PRINT
440 PRINT "Read positive pulse width (average at least 10 periods)."
450 INPUT "Enter positive pulse width (in sec):",Pos_width
460 !
470 PRINT "Set Counter to measure period (average at least 10 periods)."
480 INPUT "Enter period (in sec):",Period
490 !
500 !Calculate duty cycle
510 Duty_cycle=(Pos_width/(Peri od))*100
520 Duty_cycle=PROUND(Duty_cycle,-2)
530 PRINT
540 PRINT "Positive Pulse Width = "&VAL$(Pos_width)
550 PRINT "Duty Cycle = "&VAL$(Duty_cycle)&"%"
560 !
570 DISP "Press ’Continue’ when ready"
580 PAUSE
590 CLEAR SCREEN
600 NEXT I
610 !
620 OUTPUT @Afg;"*RST;*CLS" !Reset AFG
630 END
Agilent E1445A Service Manual Verification Tests 63