07-20-2016 11:11 AM
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.
07-20-2016 11:13 AM
Could it be an indicator?
Please upload for LV 2012 and I can take a look.
07-20-2016 11:23 AM - edited 07-20-2016 11:30 AM
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!
07-21-2016 07:51 AM
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.
07-21-2016 07:59 AM
I've provided the state controls too...
07-21-2016 08:13 AM
07-21-2016 09:05 AM
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...
07-21-2016 03:00 PM
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.