07-08-2020 07:54 AM
I have an application where data entered into a text box on the UIR becomes very slow over time. The operator scans a bar code with a 56 character long string. When the application is first started, there is no delay when scanning into the text box. Over time, characters entry from the scan becomes very slow, to the point where it appears someone is typing manually. Has anyone run into this before?
The only thing that is running when the operator enters data into the text box is a timer. The timer callback is querying a USB device every 0.5 seconds to check a digital input (start button). Execution time of the program itself remains unaffected and is the same over time. Any memory leaks have been found and corrected (as far as I can tell). I have tried all three settings of the SleepPolicy with no change to the text box issue.
The application controls some Visual Builder AI 2019 (x64) inspections.
CVI is version 19.0.
Application is complied as a 64 bit executable.
07-09-2020 03:38 AM
If you are using a textbox control the way you set text to the control can be relevant in that the textbox is additive: I mean that using SetCtrlVal adds a new text to the control. Even if you have set a single line control, this defines only the visible part of the whole text set in the control: if you continue adding new text to the textbox the response of the control may progressively deteriorate.
If this is your case, you can either use ResetTextBox or use a simple string control to have only one string in the control in every moment.
07-09-2020 08:47 AM
Sorry, it's a String box, not a Text Box. The String box has a character limit set and is reset with DefaultCtrl at the end of every test run. The bar code scanner is acting the same as a keyboard input to the String box. Data to the String box is not entered by the application.
I would assume that DefaultCtrl will clear any text in the buffer of a Text Box or String box that could gather up over time.
07-10-2020 02:47 AM
I'm afraid I have no additional clues on this subject...
Can you discriminat whether the delay is in the input from the barcode scanner or the output to the string control?
07-10-2020 09:43 AM
Hay Roberto,
The delay can be seen from the input of the bar code scanner. My suspicion is that there is something else going on that is causing this delay. The bar code scanner works fine when scanning into notepad. I was going to try an external compiler to see if that has anything to do with it.
I have been using CVI for quite some time and have never run into this issue before. I'm starting to pull my hair out!