EasyManua.ls Logo

Anritsu ML2437A - An Example Program in C

Anritsu ML2437A
314 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Procedures Optimizing Readings
ML2437A/38A OM/PM PN: 10585-00001 Rev. P 6-23
An Example Program in C
#include <stdio.h>
/* include the NI 488.2 GPIB include file */
#include “DECL.H”
/* LINK with MCIB.LIB */
/* Compiled with BorlandC++ 2.0 */
void main()
{
int i;
char buffer[10][20];
/* clear buffer */
memset(buffer,0,200);
SendIFC(0);
if ( ibsta & ERR )
{
printf(“GPIB error\nibsta: %0x\niberr: %i\n\n”, ibsta,
iberr);
exit(1);
}
/* Setup ML2430A at address 13 */
/* FAST mode (output readout channel 1)
Send(0, 13, “*RST; FAST ON”, 13L, NLend);
/* Loop 10 times and store readings */
for(i=0; i<10; i++)
Receive(0, 13, buffer[i], 20, STOPend);
/* display readings.. */
for(i=0; i<10; i++)
printf(“Reading %i = %s”, i+1, buffer[i]);
}

Table of Contents

Related product manuals