*
section of the manual for each filter board (not the 39XX manual).
*
If the error bit ERR is set in IBSTA, call GPIBERR with an error message.
*/
ibclr (GpibDev);
if (ibsta & ERR) gpiberr(“ibclr’Error”);
/ *
*
Write a string out to the K-H 39XX.
*
If the error bit ERR is set in IBSTA, call GPIBERR with an error message.
*/
Ibwrt (GpibDev, “500HZ;0IG; 0OG;DC;F”,18L); /* the ‘F’ displays the frequency so when*/
if (ibsta & ERR) gpiberr (“ibwrt Error”); /* we read the unit we’ll see the freq */
/ *
*
Read the K-H 39XX. If the error bit ERR is set in IBSTA, call GPIBERR with
*
an error message.
*/
ibrd (GpibDev, rd, 30L);
if (ibsta & ERR) gpiberr (“ibrd Error”);
/* Append the null character to mark the end of the data*/
rd[ibcnt] = ‘\0’; /* do this BEFORE calling ibcmd because ibcnt will be */
printf(“Read: %s\n”, rd);
/* changed by any ‘ib’ calls. */
ibcmd(GpibBoard,”?_”,2L);
/* send unt, unl */
if (ibsta & ERR) gpiberr(“ibcmd Error”);
/ *
*
Change the K-H 39XX setting
*/
ibwrt (GpibDev), “333HZ;20IG;20OG;AC;F”, 20L); /* the ‘F’ displays the frequency so when */
if (ibsta & ERR) gpiberr(“ibwrt Error”); /* we read the unit we’ll see the freq */
/*
*
Read the K-H 39XX again like before.
*/
ibrd (GpibDev,rd,30L);
if (ibsta & ERR) gpiberr(“ibrd Error”);
rd[ibcnt] = ‘\0’;
printf(“Read: %s\n”, rd);
ibcmd(GpibBoard,”?_”,2L); /* send unt, unl */
if (ibsta & ERR) gpiberr(“ibcmd Error”);
/*
Call the ibonl function to disable the hardware and software. */
Section 3 - GPIB Programming
3-14
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com