|
运行源程序,提示出错: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 [0xffffd75f]). 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的源程序 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|