EasyManuals Logo

Agilent Technologies 75000 Series B User Manual

Agilent Technologies 75000 Series B
78 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #40 background imageLoading...
Page #40 background image
Using Single Function to Send and Receive Data
The ipromptf function sends formatted SCPI commands and immediately reads the returned data as
formatted data. This function is a combination of the
iprintf and iscanf functions.
Program Example to Send and Read Unformatted Data
The following program example uses the iread function to read unformatted raw data.
#include < stdio.h>
#include < string.h>
#include < sicl.h> /* Included with SICL * /
#defineDEV_ADDR "hpib7,9,0" /* Assign the instrument GPIB address * /
/*****************************************************************/
void main(void)
{
INST addr;
unsigned long actual;
int length = 256;
char into[256],
* cmd = SYSTem:ERRor?\n” ; /* SCPI command * /
#if defined(__BORLANDC__) && !defined(__WIN_32)
_InitEasyWin(); /* Required for Borland EasyWin program * /
#endif
/* Enable communication path to the instrument * /
addr= iopen(DEV_ADDR);
/* Send SCPI command */
iwrite(addr, cmd, strlen(cmd), 1, NULL);
Continued on Next Page
Sending/Receiving Formatted Data
ipromptf(addr, *OPC?\n , %i”, &into);
Function
Session ID
SCPI Command
plus Line Feed
Variable to received returned data
Returned data format specifier
2-8 Sending SCPI Commands

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 75000 Series B and is the answer not in the manual?

Agilent Technologies 75000 Series B Specifications

General IconGeneral
BrandAgilent Technologies
Model75000 Series B
CategoryControl Unit
LanguageEnglish

Related product manuals