05-01-2008 12:00 PM - edited 05-01-2008 12:01 PM
05-02-2008 01:25 PM
Hi Alok,
Have you used your DAQ hardware with the Traditional NI-DAQ drivers recently? If you have you must reset the Traditional NI-DAQ drivers before using the card with NI-DAQmx. Sometimes if this reset has not been done it can cause the error you are seeing. To reset the Traditional NI-DAQ drivers, open Measurement and Automation Explorer (MAX). Under Devices and Interfaces, Right-click on Traditional NI-DAQ (Legacy) Devices and select Reset driver for Traditional NI-DAQ.
If this does not apply to you I have a few questions to help me get a better picture of what's going on.Let me know if you have any questions and have a great weekend.
Thanks,05-03-2008 01:49 PM
Hi Nathan,
It was a very silly mistake from my end.
The Task.AIChannel.Addchannel function takes two arguments. One is the physical channel and other is its name. In my earlier code i was passing "" as the channel name. whereas while copying the code to the new solution, i changed the parameter to be equal to the channel itself. Hence for channel Device1/ai0, the name was also Device1/ai0.
it seems that '/' is an invalid character for the name of the channel and hence the error. Whereas it is valid character for physical channel involved.
By the way, I am using C# VS2003 and NI DAQMx 7.3. Also the device is PXI 4461 whose channel I was trying to add.
Thanks for your time and apologies for this silly quest.
Regards,
Alok Damle.