Remote
Progtl
EXAMPLE
P
The following application program
is
written in C for the IBM PC-AT. The National
Instma
Model
AT-GPIB board provides the interface between
ahe
PC
and the Fluke WOA
DMM.
program assumes that the configuration program IBCOW
has
been
run
to initialize the intu
board
with
the device name
I8840A
assigned to the GPIBO board.
m*
program selects MC
@I),
Autorange
0,
Slow rdte (SO), Continuous
trigger
(TO)
and sufl5xes enabled
el).
All
readings
appear simultaneourly on the instnunent
display
and
the
PC
screen
with
suffixes enabled for function readout.
Full
local
cone01 is
given
to the
8840A
Note the local mntml m*t be givenento,rhe board
and not the device. Press
<tTRL>
C to turninate
this
program.
Microsoft C Version 6.0 on
IBM
PC-AT
Link
&is program
with
appropriate mcib*.obj.
#include <stdio.h>
#include "decl.h"
char
rd[5 121;
/*
read data bder
int
brd0;
/*
interface board number
int
dmm;
/*
device number
int x;
brd0
=
ibfind("GPIBOn)
;
/*
initialize boand
*/
dmrn
=
ibfindfl8840AW);
/*
initialize devike
*/
ibclr(dmm);
/*
clear device
'
*/
ibwrt(dmm,"F1ROSOTOY1",10);
/*
write functio* to instrument
*/
ibloc (dm)
;
/*
local the device
ibsre (brd0,O)
;
/*
de-assert the remote enable
(FEN)
signal so the
*/
*/
/*
8840A stays in local
when
an
ibrd call
is
made
*/
x=q
in:
ibrd(dmm,rd);
x
=
x+l;
prind("%d %sn,x,rd)
;
goto
in;
1
/*
get data
*/
/*
increment reaping count
*/
/*
display readmgs
*/
@
Figure
3-14.
Example Programs: Using
the
IBM
PC
(cont)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com