Agilent Technologies E1300B Especificações Página 40

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 78
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 página 39
1 2 ... 35 36 37 38 39 40 41 42 43 44 45 ... 77 78

Comentários a estes Manuais

Sem comentários