I have a PXI-1000B chassis, along with a 8330 MXI-3, a 6608 System Timer, a 6040E Multifunction I/O, and a 6533 Digital I/O.
Using Visual C++ vrsn 6.0, NIDAQ vrsn 6.9, and ComponentWorks vrsn 2.0.1, I am trying to build my first program to communicate with the devices listed above. I am starting out with the command 'Get Device Info'. However I can not retrieve any information from the devices. I keep getting the message "The specified attribute is not relevant" regardless of the attribute I try to retrieve. Can someone help me out please.
I have the proper include statements (nidaq.h, nidaqcns.h, nidaqerr.h, nidaqex.h), and I have added the two nidaq library files and header files to my project.
I have been told that
I should be using ComponentWorks++ and not ComponentWorks with Visual C++ 6.0. Is this true??? I should also note that I started out by altering the GetScxiInfo example provided on the NI website. Any help in solving my problem would be greatly appreciated.
I have included my function code below:
void CGetScxiInfoDlg::OnGetinfo()
{
COleVariant Info;
long Status;
CString cInfo="";
CString StringBuffer="";
long DeviceNumber = 1;
long InfoType = ND_DEVICE_SERIAL_NUMBER;
// Read the chassis string from the dialog box
// UpdateData(TRUE);
// cInfo = m_Info;
// Get information from Device
Status = m_CWDaqTools.GetDAQDeviceInfo (DeviceNumber, InfoType, Info);
// ...Code for displaying information...
}