![Krohn-Hite 3945 Operating Manual Download Page 38](http://html1.mh-extra.com/html/krohn-hite/3945/3945_operating-manual_2004086038.webp)
*
IBONL is zero, the software and hardware are disabled.
*
Execution of this program is terminated after the call to the function
*
IBONL to disable the software and hardware.
*
*
The function EXIT is used to terminate this program within the function
*
GPIBERR. The exit status is set to 1 to indicate an error has occurred.
*
*/=======================================================================
*/
#include <stdio.h>
#include <stdib.h>
#include <string.h>
/*
DECL.H contains constants, declarations, and function prototypes. */
#include “decl.h”
#define DEVNUM “devl” /* Set instrument to GPIB address 1 */
/ *
GPIBERR is an error function that is called when a NI-488 function fails. */
void gpiberr(char *msg);
char
rd[255];
/* read data buffer */
int
GpibDev, GpibBoard;
* device handles */
void main() {
printf(“\nSending data to the Krohn-Hite model 39xx…\n”);
printf(“\n”);
/ *
*
Assign a unique identifier (a ‘handle’) to the K-H 39XX and store it in the
*
variable GpibDev. If BpibDev is less than zero, call GPIBERR with an error
*
message.
*/
GpibDev = ibfind (DEVNUM);
if (GpibDev ,0) gpiberr(“ibfind Error”);
/ *
*
Assign a handle to the GPIB board so we can use IBCMD to send board
*
level commands such as UNL and UNT.
*/
GpibBoard = ibfind (“gpib0”);
if (GpibBoard <0) gpiberr(“ibfind Error”);
/*
*
Clear the K-H 39XX to its default state. The settings vary depending on the
*
type of board in each channel. These settings are listed in the GPIB
Section 3 - GPIB Programming
3-13
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com