Using the limit to measurement, Example 6 limit modes – BNC 1105 Universal Counter User Manual

Page 189

Advertising
background image

189

189

189

189

stat = viWrite(sesn, (unsigned char *)("TRAC:DATA OFFSET,5MHz"), 21,

&ret);

/*----------------------------------------------------------------------------------*/

/*------------------------------- Read From Device ------------------------------*/

stat = viWrite(sesn, (unsigned char *)("FETC?"), 5, &ret);

//

stat = viWrite(sesn, "READ?", 5, &ret);

//

stat = viWrite(sesn, "MEAS:FREQ?", 10, &ret);

//

stat = viWrite(sesn, "SENS:DATA?", 10, &ret);

/*----------------------------------------------------------------------------------*/

stat=viRead(sesn,(unsigned char *)readin,128,&ret);

printf ("Read : %s",readin);

stat = viSetAttribute(sesn, VI_ATTR_TMO_VALUE, tmo);

stat = viGpibControlREN(sesn, VI_GPIB_REN_ADDRESS_GTL);

viClose (flist);

viClose (defaultRM);

return 0;

}

Using the Limit to Measurement

Example 6 Limit Modes

// Limit.cpp : Defines the entry point for the console application.

#include "stdafx.h"

#include "visa.h"//include visa32.lib first to the probject.

#define MAX_COUNT 200

#include "stdio.h"

int main(int argc, char* argv[])

{

ViStatus stat; /* For checking errors */

ViSession defaultRM; /* Communication channels */

ViSession sesn; /* Communication channel */

ViChar rsrcName[VI_FIND_BUFLEN]; /* Serial resource name */

ViChar intfDesc[VI_FIND_BUFLEN]; /* Port binding description */

ViUInt32 ret; /* To hold number of resources */

Advertising