Receivesetup(0,13);
/* Fast mode, there fore do not send ‘O 1’ for data, just read.*/
for( i=0; i<10; i++)
RcvRespMsg(0,buffer,STOPend);
Power Level (dBm) Read ings/Sec ond
0 240
–30 240
AN EX AM PLE
PRO GRAM IN C
#in clude < stdio .h>
/* in clude the NI 488.2 GPIB in clude file */
#in clude “ DECL .H”
/* LINK with MCIB .LIB */
/* Com piled with Bor landC ++ 2.0 */
void main()
{
int i;
char buffer[10][20];
/* clear buffer */
mem set (buffer,0,200);
Sen dIFC (0);
if ( ib sta & ERR )
{
printf (“GPIB er ror\ nib sta : %0x\ nib err : % i\n\n”, ib sta ,
iberr );
exit(1);
}
/* Setup ML2400A at ad dress 13 */
/* FAST mode (out put read out chan nel 1)
Send(0, 13, “* RST ; FAST ON”, 13L, NLend );
/* Loop 10 times and store read ings */
for( i=0; i<10; i++)
Re ceive(0, 13, buffer[ i], 20, STOPend );
/* dis play read ings.. */
for( i=0; i<10; i++)
printf (“Read ing % i = %s”, i+1, buffer[ i]);
}
5 24 ML2400A OM
PROCEDURES