11-03-2023 06:39 AM - edited 11-03-2023 06:40 AM
Hi milan,
@milan87 wrote:
Why is a problem, if i have many property nodes?
As you notice with your VI sometimes the property nodes read stale values, especially in your case when you call them repeatedly because the scanner sends new chars each millisecond…
Btw. there is a "Append to String" method so you don't need to read&write the "value" property with each char:
@milan87 wrote:
Also what is problem if i concat char by char?
You will have a lot of actions/events for a simple string.
Our barcode scanners are set to append CR/LF: we handle a single "value change" event once the full string is received…
11-03-2023 08:12 AM
Thanks.
Can you please tell, how you detect value change in event structure, after all characters are received, and then CR.
I can only use key down, so not sure how to wait until CR is received.
I can only add consumer loop, so i can store to string, until i received CR.
Thanks
11-03-2023 08:20 AM
Hi milan,
@milan87 wrote:
Can you please tell, how you detect value change in event structure, after all characters are received, and then CR.
I can only use key down, so not sure how to wait until CR is received.
Select the "String" control, then select its "Value change" event…
When the string control receives a CR or LF char then it will generate the value change event (as long as you set to "DON'T update while typing"). It's the same as when the user uses <ENTER>/<RETURN> key while typing in the string control…
11-10-2023 02:39 AM
Additional what i noticed, is when i slow down barcode scanner (to have short delay between characters), then everything works just fine.
11-10-2023 02:46 AM
Hi milan,
@milan87 wrote:
Additional what i noticed, is when i slow down barcode scanner (to have short delay between characters), then everything works just fine.
That seems to fit with your (kind of) overuse of property nodes: there are less chances of race conditions when the chars are received more "seldomly"…