04-11-2019 04:01 AM
Hi,
Literary just created a cluster array control. cluster contains a String control and a combobox
I have nothing else so far except for a while loop and the control array cluster in my block diagram.
I then ran the VI as is to see if I could write and select items in the cluster array.
VI runs but I cannot enter anything into the String control or select an item from the combobox. (but can do that when NOT running)
any ideas why?
Sherzaad
Solved! Go to Solution.
04-11-2019 04:54 AM
Without any code attached one can only guess...
E.g. is it possible, that you did not create a control but an indicator?
04-11-2019 05:43 AM
@crabman wrote:
Without any code attached one can only guess...
E.g. is it possible, that you did not create a control but an indicator?
And my 8-Ball says....
"It is certain!"
04-11-2019 05:50 AM
nope... its DEFINITELY A control. Triple checked that before putting up this thread!
04-11-2019 05:57 AM - edited 04-11-2019 06:00 AM
The cluster may be a control. Now check the cluster elements.
And, while I am the rare person who can debug code I cannot see, the others here would need to look at your code.
04-11-2019 06:08 AM
As I said... I check all the elements, They all are controls.... I'll try again from scratch one more time....
04-11-2019 06:56 AM
That's a picture of a VI. While it is easy to see the code, and would be simple to recreate (but we shouldn't have to do more work to help you!), we can't actually help you with it. The problem is with YOUR VI we want to fix, not our recreation of what we see on a screenshot.
A screenshot doesn't show us all the things behind the screen. It is possible those controls are disabled? May be, but we can't see that from a picture.
ATTACH an actual VI!
04-11-2019 07:02 AM
Bill, it's a greedy loop. No time for the UI Thread. Strings and combo boxes need a human speed.
Add a 200ms wait and remember to avoid greedy loops in the future.
04-11-2019 07:16 AM
I do agree it is probably a greedy loop. I can't tell because there could be a wait function hiding behind that shortcut menu. but I doubt it.
Greedy loops are bad, but I just tried to replicate the code and assumed it was a greedy loop. It ran okay for me. But then I'm running on a multi-core processor. So being greedy doesn't necessarily cause the problem he is having.
Now if the OP's computer is an ancient over decade old PC with a single processor, then it is possible the greedy loop is stealing the show.
The last single core PC I had used (which was my bosses' old PC assigned to a test stand after he got his upgrade, so it was probably at least 2000 era), the program would freeze execution any time you grabbed the program window and moved it around. It didn't have greedy loops, but I think it did have a driver with a .dll running in the UI thread. That same program running on a modern PC with multiple cores does not have that problem.
04-11-2019 07:37 AM
found the issue!
the array control strangely was initially 'disabled'! enabled it and it's working fine now! 🙂