
2-19
Sample Programs
C Programming Examples
} /* end close_SICL ( ) */
National I/O Example
File: natl_IO.c
/* natl_IO.c */
#include <stdio.h> /* location of: printf ( ) */
#include <string.h> /* location of: strlen ( ) */
#include "hpibdecl.h"
/* This file contains IO and initialization routines for the NI488.2 commands. */
/*
* Function name: hpiberr
* Parameters: char* - string describing error
* Return value: none
* Description: This routine outputs error descriptions to an error file.
*/
void hpiberr( char *buffer )
{
printf ("Error string: %s\n",buffer );
} /* end hpiberr ( ) */
/*
* Function name: init_IO
* Parameters: none
* Return value: none
* Description: This routine initializes the NI environment. It sets up error
* handling, opens both an interface and device session, sets timeout values
* clears the interface by pulsing IFC, and clears the instrument by performing
* a Selected Device Clear.
*/
void init_IO ( )
{
bus = ibfind ( INTERFACE );
/* open and initialize GPIB board */
if ( ibsta & ERR )
hpiberr ("ibfind error");
ibconfig ( bus, IbcAUTOPOLL, 0);
/* turn off autopolling */
ibsic ( bus );
/* clear interface - pulse IFC */
if ( ibsta & ERR )
{
hpiberr ( "ibsic error" );
}
/* open device session */
scope = ibdev ( board_index, prim_addr, second_addr, timeout,
Содержание 86100A
Страница 18: ...1 14 Introduction Status Reporting Figure 1 4 Status Reporting Data Structures...
Страница 19: ...1 15 Introduction Status Reporting Status Reporting Data Structures continued...
Страница 94: ...2 40 Sample Programs BASIC Programming Examples...
Страница 124: ...4 16 Root Level Commands VIEW...
Страница 125: ...5 DATE 5 2 DSP 5 2 ERRor 5 3 HEADer 5 4 LONGform 5 5 MODE 5 6 SETup 5 7 TIME 5 7 System Commands...
Страница 132: ...5 8 System Commands TIME...
Страница 140: ...6 8 Acquire Commands SWAVeform RESet...
Страница 152: ...7 12 Calibration Commands STATus...
Страница 192: ...11 12 Display Commands SSAVer...
Страница 202: ...12 10 Function Commands VERTical RANGe...
Страница 203: ...13 AREA 13 2 DPRinter 13 2 FACTors 13 3 IMAGe 13 3 PRINters 13 4 Hardcopy Commands...
Страница 316: ...21 12 TDR TDT Commands Rev A 05 00 and Below STIMulus...
Страница 332: ......
Страница 353: ...26 DISPlay 26 2 LOAD 26 2 SAVE 26 3 XOFFset 26 3 XRANge 26 3 YOFFset 26 3 YRANge 26 4 Waveform Memory Commands...