I have been able to successfully communicate to the 6608 timer aboard my PXI-1000B chassis using the following code:
void CTrial3Dlg::OnStart()
{
m_device_name = m_CWAI.GetDeviceName();
m_device = m_CWAI.GetDevice();
UpdateData(FALSE);
}
However, I cannot communicate with the other devices aboard the PXI-1000B chassis, such as the 6040E Multifunction I/O or the 6533 Digital I/O. I used the following code, but I always get the message "The specified attribute is not relevant".
void CTrial1Dlg::OnGetinfo()
{
COleVariant Info;
long Status;
long DeviceNumber = 3;
long InfoType = ND_DEVICE_NAME;
Status = m_CWDaqTools.GetDAQDeviceInfo(DeviceNumber, InfoType, Info);
}
I was told that I was using
the incorrect Info Type, and I should be using the CW info type (cwGetDeviceName) rather than the NIDAQ Info Type above (ND_DEVICE_NAME). However I know the NIDAQ Info Type prototype is stored in the NIDAQCNS.H header file, but I don't know where the prototype CW Info Type is stored.
I would like to get either one to work. I already checked the device number using Measurement Explorer, and it is correct. I have also inserted the correct ActiveX control (CWDAQTools) as well as verified that the nidaq head files and libraries are included in the project. Any help would be appreciated.
Rodney 😃