|
今天用PC连安捷伦6位半34410A想要测电流,虽然每次电流值都能读出来,但是每次读取电流的时候仪器总是会报警,屏幕出现ERROR字样,请问怎样才能让它不报警?控制程序如图:
先初始化:
char buf[100];
memset(buf,0,100);
strcpy(buf,"*CLS\r\n");
com_3410A.write_scc(buf, strlen(buf),len);
Sleep(10);
//*RST
memset(buf,0,100);
strcpy(buf,"*RST\r\n");
com_3410A.write_scc(buf, strlen(buf),len);
Sleep(50);
//*CLS
memset(buf,0,100);
strcpy(buf,"*CLS\r\n");
com_3410A.write_scc(buf, strlen(buf),len);
Sleep(10);
//SYST:REM
memset(buf,0,100);
strcpy(buf,"SYST:REM\r\n");
com_3410A.write_scc(buf, strlen(buf),len);
Sleep(1000);
然后测量:(循环测量)
memset(buf,0,100);
strcpy(buf,"MEASure:VOLTage?\r\n");
com_3410A.write_scc(buf, strlen(buf),len);
Sleep(1000);
//read vol
char inbuf[100];
com_3410A.read_scc(inbuf,100,len);
麻烦各位大神!!!
|
|