LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an Custom Combo Box Control with Auto-Update

Hi,

 

I am using combo boxes to map my pin names to device lines in order to improve the readability of my code.

 

For instance:

SCAN_DATA_IN => ni653x/port3/line4

SCAN_PHI => ni653x/port3/line1

 

I created a custom control with a combo box with these mappings, but I update the combo box control it doesn't update the controls that have already been instantiated.

 

My understanding from searching the forums is that the combo box items are considered data, and data isnt updated when a control is updated.

 

1. Is there a way to make it so that the combo boxes are fixed and are not considered so that the combo box works?

 

2. Is there an alternate way of accomplishing this mapping task so that auto-update does work?

 

Thanks

0 Kudos
Message 1 of 3
(2,695 Views)

It looks like all your values are DAQ channels. How about defining them as Global Virtual Channels in MAX and not worry about what the actual channel allocations are? The DAQmx Global Channel constant will automatically list all the channels you have defined.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(2,671 Views)

I don't have labview on this computer, but two things.  Have you made your custom control a Strict Type Def?  I know that will update items all the controls within a project that are connected to that typedef.  I"m not sure about filling combo boxes. 

 

I do know that if you make an enum a strict type def, then you can update your custom control and those new items will propogate to all all instaces of that control in a VI.  One issue with enums is that you can not update them at runtime.

0 Kudos
Message 3 of 3
(2,644 Views)