Reading Barcode data

More
1 year 8 months ago #322403 by aluplastvz
Hello everyone
I have an idea to use Linuxcnc to process the outer edges of the board with the X and Y position, but I want to read the barcode that contains the X and Y values ​​and automatically start the processing, does anyone have an idea how to do it

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322414 by tommylight
Replied by tommylight on topic Reading Barcode data
Probably using OpenCV (not related to LinuxCNC, github project, open source), as there are already some examples of using it with LinuxCNC, see QtPlasmaC and how it uses it to skew the whole gcode to material.
The following user(s) said Thank You: aluplastvz

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322477 by rodw
Replied by rodw on topic Reading Barcode data
Yes, you would need to digitize the barcode and opencv sounds as good as any. It may have a barcode parser.
To do it yourself you would first need to determine the barcode symbology
There is a phone app called Barcode Data Decoder which will do this.
assuming a 2D symbology, barcodes usually have a start and a stop sequence. Barcode characters are made up of bars and spaces. These are defined as being multiples of the narrow bar width. If you are generating barcodes on a Zebra ZPL printer like I do, the narrow bar is defined as being 1,2 or 3 pixels wide (@203 dpi). Wider barcodes are easier to read. 1 pixel wide narrow bar is nearly impossible to read.

So then you can study up on your symbology and understand its structure.
If you are choosing the symbology, CODE39 is probably the easiest to parse at a low level but its not very compact. Code 128 is more compact but  harder to parse. ref:  en.wikipedia.org/wiki/Code_39
The following user(s) said Thank You: aluplastvz

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322478 by rodw
Replied by rodw on topic Reading Barcode data
An alternative could be to use a barcode scanner. These will plug into your computer as a HID keyboard device. There are some small barcode modules that are RS232 devices.  www.aliexpress.com/item/1005007002453623...OfpGuWBoClGYQAvD_BwE
The following user(s) said Thank You: aluplastvz

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322487 by Hastrh2o
Replied by Hastrh2o on topic Reading Barcode data
Forgot OpenCV, and use a barcode scanner.
I do this way to scan the worksheet and load the G-Code according to the type of part which I need to machine. The bar code scanner act as a keyboard, and I use a few python in the handler.py file to get what I need.
The following user(s) said Thank You: aluplastvz, rodw

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #323060 by noqui
Replied by noqui on topic Reading Barcode data
Hastrh2o Can you share and example? Thanks a lot. 

Please Log in or Create an account to join the conversation.

Time to create page: 0.446 seconds
Powered by Kunena Forum