Remote
Prog
EXAMPLE
The following application program
is
written in C for the
IBM
PC-AT. The National Instrun
Model AT-GPIB board provides the interface between the PC and the Fluke
884OA
DMU
program assumes that the configuration program IBCONF
has
been
run
to initialize the inte:
board
with
the device name I8840A assigned to the
GPI~O
board.
This program illusmtes a method of recording any
errors
produced by the 8840A selfrest func
It should be noted that:
1.
If more than one digital error occurs, only the last one
will
be reported.
2. The response to a Get Insaument Config. (GO) comxhnd during sekftar
is
"9xxx".
3.
The response to a Get
Em
Status
(G7)
command
4th
no
umrs
present
is
"1000".
Microsoft
C
Version 6.0 on
IBM
PC-AT
*/
Link
this
program
with
appropriate mcibf.obj.
*/
char
rd[S12];
/*
read data buker
int brd0;
/*
interface board number
*/
int
dmm;
/*
device number
*/
*/
char selfrest-active
[l]
;
/*
selfrest active flag
*/
char errcode
[4];
/*
emor code buffer
*/
main(
)
{
brdO
=
ibfindPGPIBO9;
/*
initialize int ce board
dmrn
=
ibfindPIWOA9;
/*
initialize
884
%"
A
*/
ibclr(dmrn)
;
/*
clear device
*/
ibwrt(dmm,"Z0",2);
/*
start
8840A
delf
test
*/
do{
*/
/*
do while self test active
*/
ibwrt(dmm,"G7",2);
/*
get
emor status
ibrd(dmm,rd,
16);
*/
stmcpy(errcode,rd,4);
if
(s~cmp(errcode,"1000")
!
=0)
/*
test for error
*/
{ibwrt(dmm,"XO",2);
prinrf("Error
%s
occ~~~edIrW,emde);
1
J
ibwrt(dmm,"GOn,2);
/*
get instrument configuration
ibrd(dmm,rd,l6);
stmcpy(selftest~active,rd,l);
1
while
(sucmp(selftest~active).9")
=
=0);
/*
check for sielf test acrive
*/
ibwrt(dmm,"GT,2);
/*
get error status
ibrd(drnm,rd, 16);
*/
strncpy(errcode,rd,4);
if
(suunp (errcode,"1000")
!
=0)
/*
test for last digital error
*/
printf("Error %s occun-ed\T\n",errcode);
printf(Ir\nSelftest complete\r\n");
1
-
nts
'he
Ice
m.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com