01-23-2014 08:21 PM
My daq card is working - but I'd like to determine if the daq card is present on program startup. I am using Measurement Studio 2013 in C# 2008.
Thank you
01-24-2014 03:27 PM
Hi WRB,
Can you please clarify what you're asking? Are you wanting to know if you can programmatically determine what DAQ cards are present? Or if there is some sort of popup that occurs when you open Visual Studio?
To determine what devices are present programmatically, use the command DaqSystem.Devices. The following Knowledge Base article shows how to do this in other environments as well as in Measurement Studio: http://digital.ni.com/public.nsf/allkb/AE521D8AEFD27E1E86256F9F007DF570
Let me know if this answers your question!
01-24-2014 03:55 PM
Hi Kelsey,
Yes - I want to determine if a particular daq card is present (I gave this card the name "system" in MAX).
I checked the link you provided -- I think this will work.
My problem was that I couldn't get past the following line of code:
"string[] devices = DaqSystem.Devices;"
since DaqSystem is not a static class and it has no constructors.
But then I saw the Local method - now I'm using:
"string[] devices = DaqSystem.Local.Devices;"
and it appears to work.
Please tell me if I'm making this over-complicated.
Thank you for your help.
WRB
01-27-2014 04:42 PM
Hi WRB,
No that sounds like the proper way to do it!
Happy coding 🙂