LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot enter/select value in cluster array

Solved!
Go to solution

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

0 Kudos
Message 1 of 10
(4,014 Views)

Without any code attached one can only guess...

E.g. is it possible, that you did not create a control but an indicator?

ʍolɟɐʇɐp ʞuıɥʇ
Message 2 of 10
(3,997 Views)

@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!"


"Should be" isn't "Is" -Jay
Message 3 of 10
(3,989 Views)

nope... its DEFINITELY A control. Triple checked that before putting up this thread!

0 Kudos
Message 4 of 10
(3,986 Views)

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. 


"Should be" isn't "Is" -Jay
Message 5 of 10
(3,983 Views)

As I said... I check all the elements, They all are controls.... I'll try again from scratch one more time....

 

untitled.png

0 Kudos
Message 6 of 10
(3,980 Views)

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!

0 Kudos
Message 7 of 10
(3,966 Views)

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. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 10
(3,961 Views)

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.Smiley Wink 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.

0 Kudos
Message 9 of 10
(3,955 Views)
Solution
Accepted by sherzaad

found the issue!

 

the array control strangely was initially 'disabled'! enabled it and it's working fine now! 🙂

Message 10 of 10
(3,949 Views)