02-08-2018 03:21 AM - edited 02-08-2018 03:29 AM
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.
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
Solved! Go to Solution.
02-08-2018 03:28 AM
02-08-2018 03:31 AM
Hello GerdW,
See the attached jpg for the error. This error only occured when I added the invoke node.
Regards,
Jeroen
02-08-2018 03:35 AM
02-08-2018 03:44 AM
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.
02-08-2018 03:52 AM
02-08-2018 03:57 AM
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
02-08-2018 04:21 AM
02-08-2018 09:07 AM
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:
Notice the "False" on the conversion function, this ignores the Windows settings and handles the dot as decimal separator.
Regards,
Jeroen
02-08-2018 09:17 AM
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…)