LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to periodically update string control

Hello all, 

I am a relatively new Labview developer, so bear with me.

I am attempting to create something of a text editor as a plugin for a software product we use to control machines. I want to have a little "status bar" at the bottom of my string control that says what line/column the cursor is at in the string control.

 

When I use "Update Value While Typing" it causes the text display to become slow and lag behind what the user is doing, which is needless to say very annoying. 


So, I was wondering if there was some other way I could periodically update the value of the string control without using "Update Value While Typing." 

0 Kudos
Message 1 of 9
(3,823 Views)

You can write to the string control with a local variable. Your control must obviously be in a loop. Is there any kind of delay in the loop? If not try putting a wait(mS) node in and wire something like 100mS to it.

=====================
LabVIEW 2012


0 Kudos
Message 2 of 9
(3,812 Views)

After having made some changes, I no longer have the inital problem I posted. 

I am now using "Update Value while Typing" set to True. For the most part it types fine. Except when I hold down a key (or really mash the buttons but I'm not to worried about that). If I hold down a key (say a letter or Backspace) and then let go after a few seconds, it will continue to place or delete characters long after I let go of the key.

 

I had thought because I had some controls stacked on each other (most are hidden and only made visible when applicable) that may have been the cause, but I just moved all my controls so there are no controls on top of each other and I still have this problem. 


Does anyone know of any typical things that might cause this problem? My application uses a producer/consumer design with a queue, but all my program does for the most part is make controls visible and invisible and waits for button presses before performing what I would think are trivial tasks, such as reading or writing a text file. I am really out of ideas for what would cause this slow typing to occur with my string control.

 

Thanks in advance. 

0 Kudos
Message 3 of 9
(3,788 Views)
It is really hard to tell without seeing the code. Any chance you can post it?
=====================
LabVIEW 2012


0 Kudos
Message 4 of 9
(3,766 Views)
0 Kudos
Message 5 of 9
(3,750 Views)

I figured out what I was doing wrong and fixed it.

Thank you to those who replied. 

0 Kudos
Message 6 of 9
(3,734 Views)
What was the problem? If you reply with your solution someone else with the same problem might do a search and find the answer. If you do post what was wrong be sure to mark your post as the solution under options.
=====================
LabVIEW 2012


Message 7 of 9
(3,728 Views)

I only kind of half fixed this. 

It can still type a little slowly if you really mash the keys, but typing normally but quickly doesn't really cause an issue.

The problem is with needing to use Update Value While Typing and having to use a Key Down? event. All the events cause it to get slow. But it works fine enough for what I need it for I suppose.

Without using Key Down? events, I am not really sure how else to create my hotkey functionality for this VI to be run in a subpanel. I need to be able to throw out the key press, and I only know how to do that with Key Down? events.. 

0 Kudos
Message 8 of 9
(3,684 Views)

relate to this new query: http://forums.ni.com/t5/LabVIEW/Syntax-Coloring-in-String-Control/td-p/2050678

 

Or rather, the new query appears to be a descendant of this.

0 Kudos
Message 9 of 9
(3,669 Views)