LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDAQmx_NewPhysChanDILineCtrl

NIDAQmx_NewPhysChanDILineCtrl() apparently modifies a string control, creating a drop down list of strings representing digital i/o lines available.  I want to create such a list as a data object I can manipulate (e.g. an array of strings).  Can I use this function in conjunction with some sort of GetCtrlAttribute() function to build my list?  Or is there a better way?
 
Thanks
0 Kudos
Message 1 of 5
(3,859 Views)

Hi andgate,

I don't see any way to get the list if physical channels into an object.  GetCtrlVal() will retrieve the selected channel only.  Perhaps if you provide more information as to what you would like to do with the object, we can find another way to achieve the goal. 

Here is one reference that may be helpful:  Getting the contents of the text box list from NIDAQmx_NewPhysChanAICtrl(...) programatically

Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 2 of 5
(3,828 Views)

The user of my software will assign functions to the various digital i/o lines.  If the user attempts to assign an i/o line that has already been assigned, I want the program to prompt the user.  So the program must keep track of what i/o lines are provided by the daq cards, and which of these have already been assigned.

I guess I will have to probe each device number individually to see what card is there, and reference some look-up-table to see what dio lines each card provides, and build a matrix that way?

0 Kudos
Message 3 of 5
(3,816 Views)
Hi andgate,
 
That is a possibility.  Also, what about exposing the NIDAQmx_NewPhysChanDILineCtrl() control to the user, and then just keeping track of the channels they have previously assigned?
Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 4 of 5
(3,799 Views)

That seems a bit sloppy, but it looks like my best alternative.  Thanks for suggesting it.

0 Kudos
Message 5 of 5
(3,783 Views)