Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DaqMX to read the switch state on a PXI-2503 or PXI-2527

Solved!
Go to solution

I was wondering if there was a way to non-destructively find out what state the switch is set to. I'm working on some diagnostic software to be run along side our tests, and it would be really usefull to be able to find out what channels each of are switches are currently connected to.

 

In C#, I use this to actually set the channel -

 

DaqSystem.Local.ConnectSwitchChannels(channel1, channel2, true);

 

 but haven't actually been able to find anything about reading back what channels are currently set. I have found this.

 

DaqSystem.Local.CreateSwitchScanTask

 

but I'm not sure that it is doing what I want it to be doing.

 

 

Any advice?

 

Thanks!

0 Kudos
Message 1 of 4
(2,869 Views)
Solution
Accepted by Joel Longanecker

Hi Joel,

 

I believe this is the function you are looking for.

 

switchstate.png

 

NI Switches help can be found under the start menu, National Instruments, NI-Switch, and Documentation.

 

Thanks for the question!

 

Lisa

Applications Engineer
National Instruments
Message 2 of 4
(2,861 Views)

Lisa, thank you. That was most helpfull. Your post lead me to discover this article.

 

http://zone.ni.com/devzone/cda/epd/p/id/1648

 

And from there I was able to adapt the source code for my own needs. I was previously unaware there was a module for using NISwitch with .NET.

 

Thank you Again.

 

-Joel

0 Kudos
Message 3 of 4
(2,858 Views)

Hi Joel,

 

I'm glad to be of help!

 

Have a great day,

 

Lisa

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,835 Views)