求助:关于利用CVI做频谱分析仪提示的一个错误
运行源程序,提示出错:void board(void){
unsigned long type;
unsigned short choice; // User's board device number
GetCtrlVal (panelHandle, PANEL_DEVICE, &choice);
Get_DAQ_Device_Info (choice, ND_DEVICE_TYPE_CODE, &type);
/* If user is using a 2 channel input board, then remove the options for
the third and fourth channel. */
switch (type) // find the model
{
case 233:
SetCtrlVal (panelHandle, PANEL_BOARD, "PCI-4451");
break;
case 234:
SetCtrlVal (panelHandle, PANEL_BOARD, "PCI-4452");
break;
case 235:
SetCtrlVal (panelHandle, PANEL_BOARD, "NI-4551");
break;
case 236:
SetCtrlVal (panelHandle, PANEL_BOARD, "NI-4552");
break;
default:
SetCtrlVal (panelHandle, PANEL_BOARD, "Not DSA Device");
}
switch (type)
{
case 233:
case 235:
SetCtrlVal (panelHandle, PANEL_CH2, 0);
SetCtrlVal (panelHandle, PANEL_CH3, 0);
SetCtrlAttribute (panelHandle, PANEL_CH2, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_CH3, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_GAIN2, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_GAIN3, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_COUPLING2, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_COUPLING3, ATTR_VISIBLE, 0);
break;
case 234:
case 236:
SetCtrlAttribute (panelHandle, PANEL_CH2, ATTR_VISIBLE, 1);
SetCtrlAttribute (panelHandle, PANEL_CH3, ATTR_VISIBLE, 1);
SetCtrlAttribute (panelHandle, PANEL_GAIN2, ATTR_VISIBLE, 1);
SetCtrlAttribute (panelHandle, PANEL_GAIN3, ATTR_VISIBLE, 1);
SetCtrlAttribute (panelHandle, PANEL_COUPLING2, ATTR_VISIBLE, 1);
SetCtrlAttribute (panelHandle, PANEL_COUPLING3, ATTR_VISIBLE, 1);
break;
default:
SetCtrlVal (panelHandle, PANEL_CH0, 0);
SetCtrlVal (panelHandle, PANEL_CH1, 0);
SetCtrlVal (panelHandle, PANEL_CH2, 0);
SetCtrlVal (panelHandle, PANEL_CH3, 0);
SetCtrlAttribute (panelHandle, PANEL_CH0, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_CH1, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_GAIN0, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_GAIN1, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_COUPLING0, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_COUPLING1, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_CH2, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_CH3, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_GAIN2, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_GAIN3, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_COUPLING2, ATTR_VISIBLE, 0);
SetCtrlAttribute (panelHandle, PANEL_COUPLING3, ATTR_VISIBLE, 0);
}
}
---------------------------------------------------------------------------------------------------------------------------------------------------
NON-FATAL RUN-TIME ERROR: "setup.c", line 515, col 13, thread id 0x00000958: Function Get_DAQ_Device_Info: (return value == -10401 ). unknownDeviceError: The specified device is not a National Instruments product, the driver does not support the device (for example, the driver was released before the device was supported), or the device has not been configured using the Measurement & Automation Explorer.
小弟还是新手,还请各位大大帮忙解答下是什么问题``感谢
源程序在此:
--------------------------------------------------------------
小弟收集了些关于labwindows的源程序 您这个不是NI的卡吗?如果不是的话就不能用DAQ的,您的错误提示是这样说的! 它这个程序好像是NI的卡的! 哦,多谢提醒,小弟原本是想弄成实际信号或仿真信号的都能进行采样,应该如何将程序进行修改?多谢帮忙` 这些资料不错,我收录到精华中,让后面学习的朋友有资料可以学习,非常感谢兄弟!兄弟看看这个第5点!谢谢!
http://www.cpubbs.com/bbs/thread-54347-1-1.html 恩,小弟打算把这个程序改成实际信号或仿真信号的都能进行采样,应该如何将程序进行修改?多谢帮忙` 加一个CHECKBOX,如果是采集的就用函数发生的节点来产生信号!在CVI中没有用过NI的卡,不知道能不能像LV里面一样,可以用DAQ助手一样,可以用虚拟的采集卡,估计应该可以! 如果有的话就可以更简单了! 一群SB,就知道把specturm那个例子反反复复发。那例子有问题的
页:
[1]