Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I find whether a daq card is present using measurement studio .NET?

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

0 Kudos
Message 1 of 4
(5,685 Views)

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!

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(5,672 Views)

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

0 Kudos
Message 3 of 4
(5,669 Views)

Hi WRB,

 

No that sounds like the proper way to do it!

 

Happy coding 🙂 

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(5,650 Views)