Programming
Guidelines
Declaring IBASIC
Variables in COM
(common) Memory
Register Descriptions
The READ Registers
The ID Register
Address
base + 00
234 HP E1340A Register-Based Programming
As noted, the example programs in this appendix are written in IBASIC. If
your application involves arbitrary waveforms, and waveform computation
is intensive and download time is not critical, an external controller should
be used. If download time is important and computation time is not critical,
IBASIC enables fast downloading through direct access to the VXI
backplane.
When writing or modifying IBASIC programs, array variables can be
declared in COM (common) memory. Variables not in COM memory reside
in the IBASIC stack. The "stack" is a 32 kByte (default) segment of
memory which contains components such as pointers and local variables for
subprograms and declarations. When too many variables (or too large an
array) are in the stack, Error 2 - "Memory Overflow" will occur. If a
memory overflow occurs, the stack size can be changed with the command
PROGram:MALLocate <
for more information).
There are four READ and four WRITE registers on the AFG. This section
contains a description and a bit map of each register.
The following READ registers are located on the AFG.
ID Register (base + 00
Device Type Register (base + 02
Status Register (base + 04
Query Response Register (base + 08
Examples and program statements in this appendix use 16-bit reads. In most
cases, however, only the lower eight bits are used.
The AFG's ID Register indicates the classification, addressing mode, and
the manufacturer of the device.
15
14
Device Class
Address Mode
16
nbytes
>
(see the Instrument BASIC User's Manual
)
16
)
16
13
12
)
16
)
16
11 - 0
Manufacturer ID
Appendix C