Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Nidaq Info Types versus CWGetDAQDevice Info Types

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 😃
0 Kudos
Message 1 of 3
(3,208 Views)
There is a header file with them that you may not have. I attached it below.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 3
(3,208 Views)
Thank you VERY much Chris 😃 I was beginning to think that I would NEVER be able to access the DAQ boards on my PXI-1000 chassis!!! I did NOT have that header file at all!!! Your help is appreciated.
0 Kudos
Message 3 of 3
(3,208 Views)