180
CALL Dac_drive
190
END
200
!
210
SUB A24_offset
220 A24_offset: !Subprogram which determines the base address for
230
!the AFG registers in A24 address space, then adds the
240
!offset and register number to the base to get the
250
!complete address.
260
COM @Afg,Addr
270
!CONTROL 16,25;2
!access A16 space with READIO and WRITEIO
280
A16_addr=DVAL("D400",16)
!AFG A16 base address
290
Offset=READIO(-16,A6)
!read AFG offset register
300
Base_addr=Offset*256
!shift offset for 24-bit address
310
!Add the register number of the high speed data register
320
!to the A24 base address.
330
Addr=BaIVAL("26",16)
340
SUBEND
350
!
360
SUB Dac_drive
370 Dac_drive: !Subprogram which computes a 128 point, 5 Vpp triangle wave and
380
!writes the corresponding codes directly to the DAC via
390
!the VXIbus and High Speed Data register.
400
COM @Afg,Addr
410
!CONTROL 16,25;3
!access A24 space with WRITEIO
420
!
430
INTEGER I,Waveform(1:128)
!Calculate triangle wave (dac codes)
440
FOR I=1 TO 64
450
Waveform(I)=I*.0755/.00125
460
Waveform(I)=SHIFT(Waveform(I),-3)
!shift bits to dac code positions
470
NEXT I
480
FOR I=65 TO 128
490
Waveform(I)=(128-I)*.0755/.00125
500
Waveform(I)=SHIFT(Waveform(I),-3)
!shift bits to dac code positions
510
NEXT I
520
!
530
!Continuously write data (in 16-bit words) to the dac via the
540
!VXIbus and High Speed Data register.
550
LOOP
560
FOR I=1 TO 128
570
WRITEIO -16,Addr;Waveform(I)
580
NEXT I
590
END LOOP
600
SUBEND
610
!
620
SUB Rst
630 Rst:
!Subprogram which resets the E1445.
640
COM @Afg,Addr
650
OUTPUT @Afg;"*RST;*OPC?"
!reset the AFG
660
ENTER @Afg;Complete
670
SUBEND
Appendix C
Register-Based Programming 507
Содержание E1445A
Страница 2: ......
Страница 14: ...Notes 12 Agilent E1445A User s Manual Contents...
Страница 18: ...Notes 16 Agilent E1445A Arbitrary Function Generator User s Manual...
Страница 19: ...Notes Agilent E1445A Arbitrary Function Generator User s Manual 17...
Страница 20: ...Notes 18 Agilent E1445A Arbitrary Function Generator User s Manual...
Страница 54: ...Notes 52 Getting Started Chapter 1...
Страница 84: ...Notes 82 Generating Standard Waveforms Chapter 2...
Страница 204: ...Notes 202 Arming and Triggering Chapter 5...
Страница 432: ...Figure 9 1 E1445A Status Groups and Associated Registers 430 AFG Status Chapter 9...
Страница 446: ...Notes 444 AFG Status Chapter 9...
Страница 464: ...Notes 462 Agilent E1445A Specifications Appendix A...
Страница 534: ...Notes 532 Agilent E1445A User s Manual Index...