HP BASIC

10 DIM Setting$[1000]

20 OUTPUT 70905;"CONF?" !query CONFigure command

30ENTER 70905;Setting$

40PRINT Setting$

50END

QUERY.C

/* This program queries HP E1429 settings */

/* Include the necessary header files */

#include

<stdio.h>

 

#include

<string.h>

 

#include

<cfunc.h>

/* from HP-IB command library */

/* Define E1429 HP-IB address macro */

#define

ADDR 70905L

/* I/O path between the PC and the digitizer */

/* Function prototypes */

void query(void);

 

void main(void)

 

{

 

query();

/* function call to query HP E1429 parameters */

}

 

/****************************************************************************/ void query(void)

{

char *gets();

char qry_cmd[80]; char qry_resp[80]; int length = 80;

/* query command array */ /* query response array */

/* Query user for digitizer query command */

printf("\nEnter query command: ");

gets(qry_cmd);

/* get input string (query command) */

Continued on Next Page

44 Getting Started

Chapter 1

Page 44
Image 44
HP E1429A manual Query.C