LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change items in combo box while running in an executable

Solved!
Go to solution

Dear all,

 

I'm trying to change items in a combo box based on the selection of the previous combo box. While running in Labview everything works fine, but as soon as I've build the executable the list of items is no longer updated. I've been trying several options including the Invoke node with "Reinit To Default", but that will give me and error during exe mode.

Below a part of the code I'm currently using.

Combo-box.png

This code is inside the Event structure with "Valve.Type": Value Change trigger.

I do get the changed value from Valve.Type and this trigger is fired but the Valve.Size items just don't change!

 

Best regards,

Jeroen

0 Kudos
Message 1 of 11
(4,117 Views)

Hi Jeroen,

 

but that will give me and error during exe mode.

Do you get errors? Which errors do you get?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(4,114 Views)

Hello GerdW,

 

See the attached jpg for the error. This error only occured when I added the invoke node.

 

Regards,

Jeroen

0 Kudos
Message 3 of 11
(4,109 Views)

Hi Jeroen,

 

did you read the explanation for error 1129?

It seems there are two strings with the same numerical value…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(4,104 Views)

Hello GerdW,

 

Thank you for the replies, but that is not the issue. I tried the "Reinit To Default" to reset the combo box to be able to fill it again with the correct values. The real issue is the fact that when I run this in executable mode the combo box values don't change at all.

A little explanation:

The Valve.Type box has to values: Option A and Option B.

For Option A the Valve.Size box should have a list with numbers from 2 to 48 (with increments of 1)

For Option B the Valve.Size box should have a list with numbers from 1 to 10 (with increments of 0.5)

Now I only get the list from 2 to 48, no matter which option (A or B) I select.

How do I get the Valve.Sizes box to update to the correct list of numbers?

The "Reinit To Default" is trying to put both lists in the box, and therefor generating duplicate values.

0 Kudos
Message 5 of 11
(4,101 Views)

Hi Jeroen,

 

what happens when you dismiss "ReInitToDefault" and set the new value of the ring using a "Value (signalling)" property?

 

Btw. you are using a (text) ring  and not a combobox, do you?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(4,087 Views)

Hello GerdW,

 

Yes I'm using a text ring. The Value (signalling) property will only set one item as active/selected. I need to change all the items of the ring so the user can select the correct value.

 

Jeroen

0 Kudos
Message 7 of 11
(4,085 Views)

Hi Jeroen,

 

yes, first set the new ring items, then try to force a "value signalling" event…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(4,077 Views)
Solution
Accepted by topic author JeroenBK

Hello,

 

I found the issue! The source of the ring items is a text file from which I load the information. Within Labview I convert the text to doubles and there it went wrong. Labview sees the "." (dot) as the decimal separator while, I my case, Windows has the "," (comma) as decimal separator. Running the project in Labview gave no issues, running in Windows however did. Now the code is as below:

Ring solution.png

Notice the "False" on the conversion function, this ignores the Windows settings and handles the dot as decimal separator.

 

Regards,

Jeroen

0 Kudos
Message 9 of 11
(4,055 Views)

Hi Jeroen,

 

so the error message was right? ("two strings with same numerical value")

 

I my case, Windows has the "," (comma) as decimal separator.

This often gives problems!

I tend to configure all my computers to use the point as decimal separator. Additionally I prefer ScanFromString with "%.;" in the format string. (Or even try to guess the decimal separator from the input data and "correct" it to point in case of comma…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(4,048 Views)