毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

VC++单片机虚拟仪器测试系统 第6页

更新时间:2010-5-5:  来源:毕业论文
VC++单片机虚拟仪器测试系统 第6页
 {    case IDC_RADIO_VOLTAGE:
  viPrintf(/*multimeter*/theApp.m_Session,"CONF:VOLT:%s %s,%s\n",SetParam.m_nParam_Type,SetParam.m_nParam_Range,SetParam.m_nParam_Resolution);
  if("DC"==SetParam.m_nParam_Type)
  {   viPrintf(/*multimeter*/theApp.m_Session,"INP:IMP:AUTO %s\n",m_nStr_Input);
 viPrintf(/*multimeter*/theApp.m_Session,"VOLT:DC:%s\n",SetParam.m_nParam_Aper);
 viPrintf(/*multimeter*/theApp.m_Session,"VOLT:DC:%s\n",SetParam.m_nParam_NPLC);  }
  pRB=(CButton*)GetDlgItem(IDC_RADIO_VOLTAGE);
  pRB->SetCheck(0);
  break;
 case IDC_RADIO_CURRENT:
  viPrintf(/*multimeter*/theApp.m_Session,"CONF:CURR:%s %s,%s\n",SetParam.m_nParam_Type,SetParam.m_nParam_Range,SetParam.m_nParam_Resolution);
  if("DC"==SetParam.m_nParam_Type)
  {  viPrintf(/*multimeter*/theApp.m_Session,"CURR:DC:%s\n",SetParam.m_nParam_Aper);
 viPrintf(/*multimeter*/theApp.m_Session,"CURR:DC:%s\n",SetParam.m_nParam_NPLC);  }
  pRB=(CButton*)GetDlgItem(IDC_RADIO_CURRENT);
  pRB->SetCheck(0);
  break;
 case IDC_RADIO_RESISTANCE:
  if("FRES"==SetParam.m_nParam_Resistance_Type)
  {   viPrintf(/*multimeter*/theApp.m_Session,"CONF:FRES %s,%s\n",SetParam.m_nParam_Resistance_Range,SetParam.m_nParam_Resistance_Resolution);
    viPrintf(/*multimeter*/theApp.m_Session,"FRES:APER %s\n",SetParam.m_nParam_Aper);
   viPrintf(/*multimeter*/theApp.m_Session,"FRES:NPLC %s\n",SetParam.m_nParam_NPLC);
  }
  else
  {  viPrintf(/*multimeter*/theApp.m_Session,"CONF:RES %s,%s\n",SetParam.m_nParam_Resistance_Range,SetParam.m_nParam_Resistance_Resolution);
   viPrintf(/*multimeter*/theApp.m_Session,"RES:APER %s\n",SetParam.m_nParam_Aper);
   viPrintf(/*multimeter*/theApp.m_Session,"RES:NPLC %s\n",SetParam.m_nParam_NPLC);
  }
  pRB=(CButton*)GetDlgItem(IDC_RADIO_RESISTANCE);
  pRB->SetCheck(0);
  break;
 case IDC_RADIO_FREQUENCY:
  viPrintf(/*multimeter*/theApp.m_Session,"CONF:FREQ %s,%s\n",SetParam.m_nParam_Peri_Freq_Range,SetParam.m_nParam_Peri_Freq_Resolution);
  viPrintf(/*multimeter*/theApp.m_Session,"FREQ:APER %s\n",SetParam.m_nParam_Peri_Freq_Aper); 
  pRB=(CButton*)GetDlgItem(IDC_RADIO_FREQUENCY);
  pRB->SetCheck(0);
  break;
 case IDC_RADIO_PERIOD:
  viPrintf(/*multimeter*/theApp.m_Session,"CONF:PER %s,%s\n",SetParam.m_nParam_Peri_Freq_Range,SetParam.m_nParam_Peri_Freq_Resolution); 
  viPrintf(/*multimeter*/theApp.m_Session,"PER:APER %s\n",SetParam.m_nParam_Peri_Freq_Aper);  
  pRB=(CButton*)GetDlgItem(IDC_RADIO_PERIOD);
  pRB->SetCheck(0);
  break;
 }// viPrintf(theApp.m_Session,"CONF:FREQ AUTO,MIN\n");
//****************************************启动测量
 viPrintf(/*multimeter*/theApp.m_Session,"READ?\n");
//****************************************读取数据
 float temp=0;

// ZeroMemory(buff,100);//初始化数据为零
    ViStatus error;
 error=viScanf(/*multimeter*/theApp.m_Session,"%f",&temp);
 if(error!=VI_SUCCESS)
 { error_handler(/*multimeter*/theApp.m_Session,error);
  return;}

 CString str;
 str.Format("Result is %f",temp);
 MessageBox(str,"测量结果显示",MB_OK);}

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

VC++单片机虚拟仪器测试系统 第6页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。