Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

i need to Read Barcode using NI visa and store it in .text file

Solved!
Go to solution

Hi all ,,

 

 i need to read to Barcdode using serial communication (NI visa) and store it in .txt ) file .. 

 

( i have attached serial read vi file.. here i can able to read barcode but quickly it going to zero ..)

0 Kudos
Message 1 of 3
(4,692 Views)
Solution
Accepted by SaranVenkateshS

Hello,

 

did you check out the serial communication examples shipped with Labview?

 

Additionally, if you want to send the data over the seral port reliably, I suggest using a more clean approach - pack your barcode data into a meaningful data structure. The data structure would look omething like this: 1a. data start (describes the start of the data packet),  2. barcode data, 1b. data end (describes the end of the data packet) and 4. data checksum (implement only 1a or 1b, whatever you prefer). If you plan to add additional information to your data packet later on, this would make it really simple to modify. This way you can also check if some data got lost during the transfer, notifying the user.

 

You can take a look on how to read such data packet here (implemented as a producer-consumer loop, although not neccessary):

 

https://decibel.ni.com/content/blogs/kl3m3n/2014/10/17/serial-data-send-with-crc-cyclic-redundancy-c...

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 3
(4,685 Views)
Hi, Thanks for your sharing. I will check it later. Best regards, Arron
0 Kudos
Message 3 of 3
(4,105 Views)