Agilent Technologies E1300B Especificaciones Pagina 40

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 78
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 39
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
Vista de pagina 39
1 2 ... 35 36 37 38 39 40 41 42 43 44 45 ... 77 78

Comentarios a estos manuales

Sin comentarios