08-29-2008 11:15 AM
Hi,
I am using a PCI NI-CAN/2 series card on Win XP, with NI CAN drivers version 2.1.1. I need to programmatically detect this card in my LabVIEW application. I tried 'VISA Easy Find Resources.vi' for this purpose, but despite using 'All devices' and 'PCI/PXI' devices option with this VI, i have not been able to detect the card.
Could you please tell me how i could do this?
I am using LabVIEW 5.1.1 Is that the problem? Will the above method work in other versions?? My application is built in 5.1.1, and changing the version is a very high impact solution, even if it could work. Is there some work around this please??
Regards
Subhash
09-03-2008 09:43 AM
Subhash,
Since LabVIEW 5.1.1 is not officially supported, I'm not sure if this is the problem or not. However, a good way to check if it is a LabVIEW problem is to try that VI in a newer version. This way you wouldn't have to update your entire code, but simply the portion that you'd like to use to detect your CAN card. We can try to troubleshoot the reasons why it wouldn't work in LabVIEW 5.1.1 if it doesn't work in the later version of LabVIEW. Post back with the results!
09-08-2008 02:02 AM
Chris,
After you mentioned, I tried the same experiment with a different machine, having all new versions of software - visa 4.1 max 4.2 and LabVIEW 8.5. I can now see CAN instruments in my MAX, but still am not being able to detect the CAN cards in LabVIEW 8.5 using the VisaResource find.vi or Daqmx instrument detection VIs
What do I do now? Any other ideas?
Subhash
09-08-2008 05:12 PM
Hey Dasi,
Unfortunately you can not use VISA resource to detect any CAN card using the VISA Find Resource as it is not a VISA resource. With that being said I think that I have a VI that should work for you to detect what card is in a particular PC. You will only be concerned with the top part of the code, due to it being able to find you CAN card, the bottom two parts have been disabled to allow you to only see what you need!Let me know how this VI works for you and we can go from there!
Regards,
Nicholas K
09-15-2008 04:42 PM
Nicholas
Thanks for the help!
Since I needed to detect the CAN card for my application, which is on LV 5.1.1, I could not use your VI. But I found this vi ncGetHardwareInfo.vi from the CAN drivers 2.1.1 for Labview 6. I was able to save that VI, for version 5.0 and then use it in my application. (Detecting if the total number of CAN cards is >= 1, which was sufficient for me. Mission accomplished!
Thanks, all who replied!
dasi