beautypg.com

BNC 1105 Universal Counter User Manual

Page 191

background image

191

191

191

191

//send reset command '*RST' -- reset MODEL 1105

stat = viWrite(sesn, (unsigned char *)("*RST"), 4, &ret);

//send Clear command '*CLS'-- Clear MODEL 1105 status register

stat = viWrite(sesn, (unsigned char *)("*CLS"), 4, &ret);

//send reset command 'INIT:CONT ON' -- Initial MODEL 1105

stat = viWrite(sesn, (unsigned char *)("INIT:CONT ON"), 12, &ret);

//Send commands befor measure (required)

/*----------------------------- CH1 Input Condition -----------------------------*/

stat = viWrite(sesn, (unsigned char *)("INP1:IMP 1000000"), 16, &ret);

stat = viWrite(sesn, (unsigned char *)("INP1:COUP AC"), 12, &ret);

stat = viWrite(sesn, (unsigned char *)("INP1:ATT 1"), 10, &ret);

stat = viWrite(sesn, (unsigned char *)("INP1:FILT OFF"), 13, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN1:SLOP POS"), 14, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN1:HYST:REL 50"), 17, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN1:LEV:REL 50"), 16, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN1:LEV:ABS:AUTO ON"), 21,

&ret);

/*----------------------------- CH2 Input Condition -----------------------------*/

stat = viWrite(sesn, (unsigned char *)("INP2:IMP 1000000"), 16, &ret);

stat = viWrite(sesn, (unsigned char *)("INP2:COUP AC"), 12, &ret);

stat = viWrite(sesn, (unsigned char *)("INP2:ATT 1"), 10, &ret);

stat = viWrite(sesn, (unsigned char *)("INP2:FILT OFF"), 13, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN2:SLOP POS"), 14, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN2:HYST:REL 50"), 17, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN2:LEV:REL 50"), 16, &ret);

stat = viWrite(sesn, (unsigned char *)("EVEN2:LEV:ABS:AUTO ON"), 21,

&ret);

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

/*---------------------------- Freq & Ratio measure -----------------------------*/

stat = viWrite(sesn, (unsigned char *)("CONF:FREQ (@1)"), 14, &ret);

//

stat = viWrite(sesn, "CONF:FREQ (@2)", 14, &ret);

//

stat = viWrite(sesn, "CONF:FREQ (@3)", 14, &ret);