Remote
Programming
WMPLE
PROGRAMS
10
REM
The following application program
is
written
in
BASICA for the IBM PC, PC-XI' or
20
REJM
PGAT.
The National Instnrments Model
GPIB-PCIIA
bard provides the interface
30
REM
between the PC and the Fluke
884049
DMM. The
program
assumes
that the configuration
40
REM
program IBCONF has been
run
to
initialize
the interfake board
with
the device
50
REM
name IWA assigned to the GPIBO
board.
60
REM
70
REM
The first
6
lines of code are required to properly
link
the
NI
drivers
to BMCA
80REWl
90
REM
This
program selects VDC (Fl), Autorange
(RO),
Slow rate
(SO),
Continuous
trigger
W)
100
REM
and
suffixes
enabled
(Yl).
All
readings
appear simultlaneously on the instrument
110
REM
display and the PC screen
with
&es
enabled for fuplction readout. Full
local
120
REM
control
is
given
to the
8840A
Note the local control
must
be
given
to the
board
130
REM
and not the device. Press
<CTRL>
BREAK to terminate
this
program.
140
REM
150
CLEAR
,59736!
160 IBINITl
=
59736!
170 IBINIT2
=
IBIMTl
+
3
180
BLOAD "bib.m",IBINITl
190
CALL
IBINITI
BBFIND,IBTRG,IBCLR,IBPCT,IBSIC,IBLOC~PP~~IBBN~IBO~~C,I~~,
IBRSVJBPAD JBSADJBIST,IBDIV&IBEOS JBTMO,IBEOT,IBRDF~WRTF)
200
CALL
IBINIT2 (IBGTSJBCAC
JBWAIT,IBPOI(E~WRT~WRT&IBCMD,IBCMDMBRD
JBRDA,IBST(
IBRPP,IBRSP,IBDIAGJBXTRC~RDI,IB~TI,IBRD~A,IBWR~$TA%,IBERR%~~)
210
REM
220
REM
IBM BASICA on
IBM
PC, PC-XT
or
PC-AT
230
REM
240 BDNAME$= "GPIBO"
250
CALL
IBFIND (BDNAME$,BD%)
260
DEVNAME="IOA"
270
CALL
IBFIND @EVNAME$,DVM%)
280
CALL
IBCLR
@W%)
290 FOR
W
=
1
TO
500:
NEXT
W
300
WRT$
=
"F1ROS0TOYln
310
320
CALL
IBWRT
@VM%,WRT$)
330
CALL
IBLOC
@W%)
34OV%= O:X%
=
0
350
CALL
IBSRE (BD%,V%)
360
370
380
RD$
=
SPACE$(18)
390
400
CALL
IBRD
@VM%,RD$)
4lOX%= X%
+
1
420 PRINT
X%,
LEFT$
(RD$,16)
430
GOT0 380
440
END
'Board name
is
GPIBO
'Initialize
the iqterface board
Device
name
is
1884OA
'Initialize
the D~M
'Clear
device
'Wait
1
second before sending commands
'Fl=VDC, RO=gutorange, SO=slow
rate
'TO=continuou$
trig.,
Y1
=enable suffix
Write functions to instrument
'Give local control to instrument
'Deassert the remote enable
(RENl
'so the 8840A stays
in
local when a call
'to IBRD
is
made
'11
characters
fbr
the reading,
5
for the
'suffix and
2
for the terminators
'Get data from 8840A
'Display readings
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com