I have a little piece of code in VB6 that encodes EAN128 barcodes in the format I want.
There is for example DIM XYZ as BOOLEAN.
It passes the TRUE and FALSE values to XYZ in the module.
Never had to bother with this, but what would be the workaround in PB for "DIM XYZ AS BOOLEAN"??
You can use a LONG in place of BOOLEAN. Or better yet, a BYTE.
From the PBWin 10 help file, "Comparative Data Types Visual Basic 6":
VB Type Format PowerBASIC
Boolean signed 16-bit INTEGER
HA! I didnt read that!
Thanks!
Lets hope by the weekend i will have this translated!
Looking forward to finishing this entire project....
Keep your fingers crossed. Will test the actual scan tomorrow at work.
Great work Petrus!
I can't get a good decode from the screen copy but it looks like it comes out as this:
StartB FNC4 R FNC4 C SubsetC 12 34 56 78 SubsetB 9 FNC4 Z FNC4 A * Stop
(the * is the calculated check digit which currently decodes as "t" in SubsetB a value of 84)
I think it really needs to be constructed like this with all the FNC4 (value 100) removed and recalculating the check digit to replace the *
StartB R C SubsetC 12 34 56 78 SubsetB 9 Z A * Stop
I have attached a full verification report for you to look at but it only gives the basic detail of a pretty poor copy from screen.
Chris.
Thanks Chris
Yes, I compared the string i got to an online encoder and there are major differences.
Last night I started to strip away the garbage of this encoding and started to construct my own module.
Since I only require the B set of the Code128 I can do away with a pile of encoding.
That comes down to just [START]STRING[CHECK][STOP].
THE [FNC1] - [FNC4] are not required, so i am dumping that.
I am nearly done with the MOD103 Check digit in the barcode, which on the B set is not that tough.
I am not trying to make a module for all the character sets, just to encode the UPU barcodes into EAN128.
This is quite a challenging, but most interesting journey. I appreciate the help very much!
That's all good news.
Some of your original label samples were actually encoded just as CodeB, so you are correct, that must be ok to use too.
Often it is about just the space on the label and CodeC saves space once you get over the SubsetC/SubsetB overhead.
I suspect you have now done the hard part and so a bit more careful development and you will be there..
Good luck!
Chris.
Chris, I think i am getting closer...
I never saw that i had to add 32 to the check-digit to find the Ascii equivalent. Thats sorted.
Apparently, in code set B, the string doesnt have to be "encoded" as long as the [STARTB], [CHECK] & [STOP] characters are.
Hope i understood that correctly.
Back to work tomorrow to see if this scans....
;D ;D :D ;D :)
Cracked it this morning in the wee hours of the day.
Successful scans, Ean128 Encoding, UPU bar-codes on SUBSET B.
Chris and everyone else, thanks a million. Would not have been able to do this without you!!
Excellent!
I had a feeling you would beat it in the end.
I am travelling at the moment but will scan your codes when I return.
Well done..
Chris.
Thanks again so much!
There was no way in hell I would have been able to do this without all your advice!
:D