VC++单片机虚拟仪器测试系统 第3页
%f\n",WaveForm.m_Freq);//这里输入调制波的频率
viPrintf(/*funcgen*/theApp.m_Session,"FM:DEV %f\n",WaveForm.m_F_Offset);//这里输入调制波的频偏
viPrintf(/*funcgen*/theApp.m_Session,"FM:STAT ON\n");
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut ON\n");
MessageBox("Successfully!");
break; }
else
{ break; }
case IDC_RADIO_FSK:
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut:LOAD %s\n",m_nResistance);//输出端的设置
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut:SYNC %s\n",m_nSignal);//设置同步信号
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut OFF\n");//是否必要???---有待核实---2005、4、28
CheckWaveRadioButton();//波形选择的判断--将波形的字符串存储在m_nBaseShape中
error=viPrintf(/*funcgen*/theApp.m_Session,"APPL:%s %f,%f,%f\n",m_nBaseShape,m_nFreq,m_nAmpl,m_nOffs);//这里的参数和基波一样--即是载波
if(error!=VI_SUCCESS)
{ error_handler(/*funcgen*/theApp.m_Session,error);
break; }
if("EXT"!=WaveForm.m_Source)
{ viPrintf(/*funcgen*/theApp.m_Session,"FSK:SOUR %s\n",WaveForm.m_Source);
viPrintf(/*funcgen*/theApp.m_Session,"FSK:FREQ %f\n",WaveForm.m_Freq);//这里输入调制波的频率
viPrintf(/*funcgen*/theApp.m_Session,"FSK:INT:RATE %f\n",WaveForm.m_FSK_Rate);
viPrintf(/*funcgen*/theApp.m_Session,"FM:STAT ON\n");
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut ON\n");
MessageBox("Successfully!");
break; }
else
{ MessageBox("The FSK'Source is external!");
break;
}
case IDC_RADIO_BM:
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut:LOAD %s\n",m_nResistance);//输出端的设置
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut:SYNC %s\n",m_nSignal);//设置同步信号
viPrintf(/*funcgen*/theApp.m_Session,"OUTPut OFF\n");//是否必要???---有待核实---2005、4、28
CheckWaveRadioButton();//波形选择的判断--将波形的字符串存储在m_nBaseShape中
error=viPrintf(/*funcgen*/theApp.m_Session,"APPL:%s %f,%f,%f\n",m_nBaseShape,m_nFreq,m_nAmpl,m_nOffs);//这里的参数和基波一样--即是载波
if(error!=VI_SUCCESS)
{ error_handler(/*funcgen*/theApp.m_Session,error);
break;
}
if("EXT"!=WaveForm.m_Source)
{ error=viPrintf(/*funcgen*/theApp.m_Session,"BM:MODE %s\n",WaveForm.m_BM_Mode);
if(error!=VI_SUCCESS)
{ error_handler(/*funcgen*/theApp.m_Session,error);
break;
} error=viPrintf(/*funcgen*/theApp.m_Session,"BM:NCYC %d\n",WaveForm.m_BM_Ncycle);
if(error!=VI_SUCCESS)
{ error_handler(/*funcgen*/theApp.m_Session,error);
break;
www.lwfree.com .m_Session,"BM:PHAS %f\n",WaveForm.m_BM_Phase);
if(error!=VI_SUCCESS)
{ error_handler(/*funcgen*/theApp.m_Session,error);
break;
} error=viPrintf(/*funcgen*/theApp.m_Session,"TRIG:SOUR %s\n",WaveForm.m_Source);
if(error!=VI_SUCCESS)
{ error_handler(/*funcgen*/theApp.m_Session,error);
break;
} error=viPrintf(/*funcgen*/theApp.m_Session,"BM:STAT ON\n");
if(error!=VI_SUCCESS)
{ error_handler(/*funcgen*/theApp.m_Session,error);
break;
} error=viPrintf(/*funcgen*/theApp.m_Session,"OUTPut ON\n");
if(error!=VI_SUCCESS)
{
error_handler(/*funcgen*/theApp.m_Session,error);
break;
}
MessageBox("Successfully!");
break;
} else
{ MessageBox("The FSK'Source is external!");
break;
}
break;
default: MessageBox("Sorry!some error happen!!");break;
} return;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>