LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically get number of lines/channels for a generic module?

Dear all,

I have been trying to find a way to check how many channels/lines (terminals) are available in a module, but I can't really find a solution. I have checked many examples online in the discussion forum where people were using task to do the job. However I would like to know if it would be possible to check how many terminals are available in a module, regardless if they are analog, digital or counter type, and also not caring if they are input and/or output.

 

Basically something that we can do quickly with our eyes: a NI9239 has 4 terminals, a NI9361 has 8 terminals...

Thanks,

E

0 Kudos
Message 1 of 4
(784 Views)

You should be able to get this with a DAQmx Device property node:

 

Kyle97330_0-1703281156158.png

That's just a sample, there's plenty more properties that you can look through to get the actual information you want.

 

You can find it in the palettes under Measurement I/O -> NI-DAQmx -> Advanced -> System Setup -> Device Node

0 Kudos
Message 2 of 4
(758 Views)

Hi,

You are perfectly right, but my goal would be to get this information not knowing a priori if the module has analogue input (as in the example), digital or counter. I was able to get this information, but I would like to know if there's a way to make it general for different modules.

Thanks

E

0 Kudos
Message 3 of 4
(753 Views)

I had just assumed you would read all the properties for all types and process whatever you needed.

 

Do you have a specific goal for what to do with this information once you have it?  Sharing it might help with what you are trying to do in the end.

 

Depending on your goal, it might interest you to look at this file:

 

C:\Program Files (x86)\National Instruments\NI-DAQ\docs\Device_Pinouts.chm

 

That's a help file containing images of the pinouts of all supported devices.  While I don't think you could parse it to get a count of terminals, if your end goal was to assist the user in doing something with the device, adding the image from the help file might be useful.

0 Kudos
Message 4 of 4
(740 Views)