Phase Control
Program
The PHAS_CHNG program demonstrates how to change the sine wave
signal phase while the waveform is currently at the AFG output.
BASIC Program Example (PHAS_CHNG)
1
!RE-STORE "PHAS_CHNG"
2
!This program changes the phase of the output signal by writing
3
!phase offset data to the phase modulation registers.
4
!
10
ASSIGN @Afg TO 1680
20
COM @Afg,Base_addr
30
!
40
!Call the subprograms which reset the AFG, which determine the base
50
!address of the AFG registers in A24 address space, and which set the
60
!output function.
70
CALL Rst
80
CALL A24_offset
90
CALL Output_function
100
!
110
DISP "Press ’Continue’ to change the signal phase (register writes)"
120
PAUSE
130
DISP ""
140
!Call the subprogram which changes the signal phase, and pass the new
150
!phase value.
160
!
170
CALL Phase_change(180)
180
END
190
!
200
SUB A24_offset
210 A24_offset: !Subprogram which determines the base address for
220
!the AFG registers in A24 address space.
230
COM @Afg,Base_addr
240
CONTROL 16,25;2
!access A16 space with READIO and WRITEIO
250
A16_addr=DVAL("D400",16)
!AFG A16 base address
260
Offset=READIO(-16,A6)
!read AFG offset register
270
Base_addr=Offset*256
!shift offset for 24-bit address
280
SUBEND
290
!
300
SUB Output_function
310 Output_function:
!Subprogram which uses SCPI commands to set DDS
320
!frequency synthesis, to set the output frequency/
330
!function/amplitude, to set up phase modulation, and
340
!to start the waveform.
350
COM @Afg,Base_addr
360
OUTPUT @Afg;"TRIG:STAR:SOUR INT1;";
!frequency generator
370
OUTPUT @Afg;":SOUR:FREQ1:FIX 60;";
!frequency
380
OUTPUT @Afg;":SOUR:PM:SOUR INT;";
!phase modulation source
390
OUTPUT @Afg;":SOUR:PM:STAT ON;";
!enable phase modulation
400
OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;";
!function
Continued on Next Page
496 Register-Based Programming
Appendix C
Summary of Contents for E1445A
Page 2: ......
Page 14: ...Notes 12 Agilent E1445A User s Manual Contents...
Page 18: ...Notes 16 Agilent E1445A Arbitrary Function Generator User s Manual...
Page 19: ...Notes Agilent E1445A Arbitrary Function Generator User s Manual 17...
Page 20: ...Notes 18 Agilent E1445A Arbitrary Function Generator User s Manual...
Page 54: ...Notes 52 Getting Started Chapter 1...
Page 84: ...Notes 82 Generating Standard Waveforms Chapter 2...
Page 204: ...Notes 202 Arming and Triggering Chapter 5...
Page 432: ...Figure 9 1 E1445A Status Groups and Associated Registers 430 AFG Status Chapter 9...
Page 446: ...Notes 444 AFG Status Chapter 9...
Page 464: ...Notes 462 Agilent E1445A Specifications Appendix A...
Page 534: ...Notes 532 Agilent E1445A User s Manual Index...