Post Reply 
HP-41 Barcode Scanner and Generator
08-29-2023, 04:16 PM
Post: #21
RE: HP-41 Barcode Scanner and Generator
Hi Paul,

thx for the good news.

Your good "beep" is really strange. The barcodes are protected by a checksum per row, so they should be safe. But... The checksum used is quite simple and not very safe when it is about multiple errors in a row. Single errors are handled perfectly. That means if more than one bar is wrongly read the checksum can still be correct. Nowadays there are better algorithms known (e.g. CRC, ...).

I don't hope that the printed barcodes are at a boundary of the specification (which might challenge the wand). I think especially of the minimum width of the narrow bars.

Michael
Find all posts by this user
Quote this message in a reply
08-29-2023, 05:04 PM
Post: #22
RE: HP-41 Barcode Scanner and Generator
Hey Michael, that is very interesting!!

I know for certain that each of the two failed attempts, I did have issues with one of the rows that I had to scan like 4-5 times!!! Maybe, the printer output is not very sharp or I go too fast. So, that is it. I learned something again :-)

Thank you!!!
Paul
Find all posts by this user
Quote this message in a reply
09-03-2023, 12:48 AM
Post: #23
RE: HP-41 Barcode Scanner and Generator
Hi Michael,

I have what I hope is a simple question. On the barcode pages that are generated, each line has a Row # and then a number range in parenthesis. I am pretty sure that the number in parenthesis are supposed to be FOCAL line numbers. If that is the case (not that it really matters) then the calculation is not always accurate.

For instance, I have a large program that is 1033 lines long, but on the last barcode sheet, the final barcode line (Row 158) has (1041 - 1044) which would imply there are 1044 lines but in reality there are only 1033 lines. Not really important but I am just curious if this is an "estimate" of line count or is it supposed to be the real line count?

Thanks!! Paul
Find all posts by this user
Quote this message in a reply
09-03-2023, 05:59 AM (This post was last modified: 09-03-2023 06:04 AM by gomi42.)
Post: #24
RE: HP-41 Barcode Scanner and Generator
Hi Paul,

well recognized! Your guess is correct the range refers to the FOCAL statement number (line number). Blank lines and comments do not count.

The code that counts the pure statements is quite trivial, I cannot identify a problem there. All the tests pass - even with extrem long programs.

My guess is that your program enforces the automatic addition of statements behind the scenes. Automatically added statements also count. There are two scenarios where statements are automatically added:

1: If you FOCAL program does not end with an END or .END. statement, the .END. is automatically appended --> you'll get one line more than expected.

2: You remember the problem with numbers in consecutive lines (link). A NULL statement needs to be inserted to separate the numbers. Each NULL statement also counts and increments the statement counter.

Do you see a chance to verify that in your program?

Michael
Find all posts by this user
Quote this message in a reply
09-03-2023, 12:51 PM (This post was last modified: 09-03-2023 01:01 PM by vervalin.)
Post: #25
RE: HP-41 Barcode Scanner and Generator
Hi Michael,

Yes, I did forget to count the NULL "lines". I have an official END statement which has a line number assigned so no problem there. I scanned my code and found 11 areas where consecutive numbers exist so that accounts for all 11 of the missing line count.

Thanks as always for a quick response and a great tool!! Paul
Find all posts by this user
Quote this message in a reply
09-06-2023, 07:10 AM
Post: #26
RE: HP-41 Barcode Scanner and Generator
Version 1.15 is released and available. This version is only about performance (nothing else changed). The barcode scanner now uses more than one CPU core. This speeds up the scanner up to factor 3. The factor is not constant and depends on the input images and on the available CPU cores. The bigger the images and the barcodes the higher the factor.

Michael
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)