Stat = vifindnext (flist, rsrcname), Setting process timeout, Send reset command '*rst' -- reset model 1105 – BNC 1105 Universal Counter User Manual
Page 187: Send commands befor measure (required), Ch1 input condition, Ch2 input condition
![background image](/manuals/545985/187/background.png)
187
187
187
187
{
stat = viGetAttribute (sesn, VI_ATTR_INTF_INST_NAME, intfDesc);
printf ("Resource %s, Description %s\n", rsrcName, intfDesc);
}
stat = viFindNext (flist, rsrcName);
//Setting Process Timeout
stat = viGetAttribute(sesn, VI_ATTR_TMO_VALUE, &tmo);
stat = viSetAttribute(sesn, VI_ATTR_TMO_VALUE, 30000);
//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);