LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Barcode input from scanner issue

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 15
(504 Views)

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.

milan87_0-1699017091613.png

I can only add consumer loop, so i can store to string, until i received CR.

 

Thanks

 

0 Kudos
Message 12 of 15
(477 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 15
(473 Views)

Additional what i noticed, is when i slow down barcode scanner (to have short delay between characters), then everything works just fine.

0 Kudos
Message 14 of 15
(434 Views)

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"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 15
(430 Views)