C And Quickbasic Program Versions - HP E1340A User Manual

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

C and QuickBASIC
Program Versions
Transferring Data in C
Chapter 3
390
OUTPUT @Afg;" SOUR:LIST:SEGM:VOLT";Waveform(*)!load
400
SUBEND
410
!
420
SUB Rst
490
SUB Errmsg
The C example program, ARB_GEN.C, is in directory " CPROG" and the
QuickBASIC example program, ARB_GEN.BAS, is in directory
" QBPROG" on the C and QuickBASIC example disk (part number
E1340-10036).
To transfer data to the AFG requires that the data sent with the
[SOURce:]LIST[:SEGMent]:VOLTage
this, send no carriage return (CR) and line feed (LF) before transferring all
the data. The
send_data
function below):
1. Disable EOI and EOL using
respectively.
ISC
(NULL) values disables the carriage return (CR) and line feed (LF)
to allow the AFG to receive a command string without a terminator.
2. Next, sent to the AFG the SCPI
[SOURce:]LIST[:SEGment]:VOLTage
IOOUTPUTS (ADDR, commands, strlen(commands))
contains the AFG HP-IB address,
command string, and
commands
. This enables the AFG to receive voltage data. Since CR
or LF is disabled, the AFG holds execution until all the data is sent.
3. Enable EOI and EOL using
respectively. The variable
and LF. Although EOL and EOI are enabled, no CR and LF is sent
until all voltage data transfer is completed (next step).
Generating Arbitrary Waveforms with the HP E1340A
command must be contiguous. To do
function does this as follows (refer to the C
IOEOI (ISC, 0)
contains the HP-IB select code, and the
command string using
commands
strlen(commands)
contains the string length of
IOEOI (ISC, 1)
state
contains the decimal codes for CR
waveform points
and
IOEOL (ISC,
" "
, 0)
and " "
0
.
ADDR
contains the SCPI
and
IOEOL (ISC, state, 2)
62
,
,

Advertisement

Table of Contents
loading

Table of Contents