LeAnnD
|
We're currently trying 2 different means of encoding to try to get something to work. The results of both we're applying the IDautomation font to.
1) First we started out using our high-volume document composition software, HP Exstream, which has a built-in module for encoding barcode data. This produced the scan with the FNC1 values as zero.
2) Secondly I'm now trying to bypass the use of the HP Exstream encoding routine, and trying to write my own routine in something similar to VB script....but so far that approach is yielding not being able to scan anything as I don't understand if the FNC1 is to be included in the mod103 calc or not, or in the pairing.
The below test module was one of the variations of encoding that I was trying, but it didn't work.
string tempBar
string start
string end
string AI3
string AI2
string FNCCode
integer CheckDigit
integer current
integer I
integer total
integer msgid
start = x'CD'
end = x'CE'
FNCCode = x'CA'
total = 0
//creating MOD103
integer n
integer j
integer pos
integer temp2
integer temp
integer position
integer field1
integer pair
integer remainder
string CheckSum
string BarCode
string BarCode1
string BarCode2
BarCode1 = '42023453'
BarCode2 = '92612901093110000000370282'
BarCode = BarCode1 & BarCode2
n = Len(BarCode)
pos = 2
//start total to include start (unweighted) and FNCCode weighted, so pos starts at 2 above (first //FNCCode)
total = 105 + 102
For j = 1 To n Step 2
//separate into pairs, taking the value of the substring of pairs, with subset C, Chart Value equals the //pair
pair = Val(Mid(BarCode, j, 2))
total = total + (pair * pos)
//increment position so next multiplication times new position
pos = pos + 1
NEXT j
field1 = Int(total / 103)
remainder = total - (field1 * 103)
CheckSum = Int(remainder)
integer k
string pairSet
string totalSet
String BarCodeSet
BarCodeSet = BarCode1
For k = 1 To len(BarCodeSet) Step 2
//separate into pairs, taking the value of the substring of pairs, with subset C, Chart Value equals the pair
pairSet = Label_MOD103 (Val(Mid(BarCodeSet, k, 2)) + 1)
totalSet = totalSet & pairSet
NEXT
integer s
string pairSet2
string totalSet2
String BarCodeSet2
BarCodeSet2 = BarCode2 & CheckSum
//s stars at 7 which is the first position following the 2nd occurrence of the FNCCode
For s = 7 To len(BarCodeSet2) Step 2
//separate into pairs, taking value of the substring of pairs, with subset C, Chart Value equals the pair
pairSet2 = Label_MOD103 (Val(Mid(BarCodeSet2, s, 2)) + 1)
totalSet2 = totalSet2 & pairSet2
NEXT
//final barcode
value = start & FNCCode & totalSet & FNCCode & totalSet2 & end
Posted 11.2 year(s) ago
|