LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Control disabled on startup

I've developed a program that works quite well (still has some bugs that I am working out) but the main thing that is driven me mad is that when the program first starts (DefelctionMain_MARK10.vi) it appears that the string control called Sample Comments is disabled and I can never get this to enable. I've tried looking at the VI properties and set it to enable on the BD and within the menu list but it still acts like it's disabled.

 

Can someone take a look? All the SubVIs are within the ZIP file and it is written in 2014.

0 Kudos
Message 1 of 8
(3,573 Views)

Could it be an indicator?

 

Please upload for LV 2012 and I can take a look.

0 Kudos
Message 2 of 8
(3,572 Views)

Hi Eric,

 

your Main VI shows a broken run arrow due to missing subVIs/typedefs. When you attach a project you should attach the whole project (including the project file itself)!

 

On your problem:

When I open the MainVI the "sample comment" isn't disabled. In your code there are 3 places where you change the enabled state of this control.

Did you try to debug if/why your VI sets this control to disabled?

 

Edit:

Why do you use this state machine in "Deflection test parameters"? Instead of calling a different state to set parameters you could do this in the event cases related to the controls…

Why do you use so many local variables and controls hidden behind decorations in your MainVI? Use a shift register with a cluster to store data!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 8
(3,567 Views)

Yes, I've tried to debug it. I can't find anywhere where I disable this control. I took out the property nodes to try and enable that control but it seems to not be working. That's has me dumbfounded. The Enabled state is Enabled on the control within the Front Panel but once the VI is started, I cannot type anything into this control. The control works as expected if the VI is up but not running.

0 Kudos
Message 4 of 8
(3,521 Views)

I've provided the state controls too...

0 Kudos
Message 5 of 8
(3,517 Views)

Hi Eric,

 

there are still missing typedefs!

 

"Save as" your MainVI with all it's hierarchy into a new folder, zip that folder and attach it…

Best regards,
GerdW


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

Hi Eric1977,

 

I tried to disconnect all your typedef and replace all the missing SubVI, and finally run the VI.

But the Sample Command isn't disable... I have no idea why I can't see your situation...

0 Kudos
Message 7 of 8
(3,503 Views)

I figured out what it was on my own. In my Event Structure, I had a Key Down? event that had a True constant wired to the Discard? event filter. This caused any key pressed down to be discarded which, obviously, I did not want. I have since updated the BD to discover if only certain keys are pressed.

0 Kudos
Message 8 of 8
(3,484 Views)