Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Res 3700 5.5 Need help with barcode printing on idn printers

Status
Not open for further replies.

jcampos13

MIS
Mar 23, 2014
26
US
Need help with this. I have res 3700 5.5 mr3. When I use this the printer stops working altogether. Received this from an Ihop who uses the serial version. I've been trying to get this to work for another customer of mine that uses idn. The setup in pos configurator is correct. When I change it to the serial version it works with no issue.


event Print_Trailer : bcode_idn

var barcode1 : A40
var num1: N1 //the least significant digit in the check number
var num2: N1
var num3: N1
var num4: N1 //the most significant digit in the check number
var check_num_length: N1 //the number of digits in the check number

check_num_length = len(@cknum)

if check_num_length >= 1 //find the last digit in the check num
num1 = @cknum % 10 //check num is (1-9, or > 9)


if check_num_length >= 2 //find the second to last digit
num2 = (((@cknum - num1) / 10) % 10)//check num is (10-99,or >99)
else
num2 = 0
endif


if check_num_length >= 3 //find the third digit from the right
num3 = (((@cknum - num1 - (num2*10)) / 100) % 10)
else //check num is (100-999, or >999)
num3 = 0
endif


if check_num_length >= 4 //find the leading digit in the check num
num4 = (@cknum - num1 - (num2*10) - (num3*100)) / 1000
else //check num is (1000-9999)
num4 = 0
endif

endif

var check : A12 //12 places for the 12 strings sent to printer
format check as @cknum{8}

//Barcode1 printer commands for TM-T88 IDN printer
//chr(126), chr(33) - ~! - inform pcontrol to go into graphics mode
//chr(16), chr(15) - inform IDN driver to go into transparent mode
//chr(16), chr(155), chr(64) - Esc @ - Initialize printer
//chr(29), chr(72) - GS H - Select Printing position of HRI characters
//chr(3) - print HRI chars both above and below barcode
//chr(29), h - GS h - set barcode height
//chr(80) - 80 vertical dots x .14mm
//chr(29), w - GS w - set barcode width chr(3) - .423mm
//chr(27), a - Esc a - select justification - 1 - center
//chr(29), k - GS k - print barcode
//chr(67), chr(12) - EAN 13, 12 chars
//chr(48) - zero - pad check num with zeros
//num(4-1) - check digits
//chr(16), chr(155), chr(64) - clear printer buffer
//chr(16), chr(14) - exit transparent mode


//format barcode1 as chr(126), chr(33), chr(16), chr(15), chr(16), chr(155), chr(64), chr(29), chr(72), chr(3), chr(29), "h", chr(80), chr(29), "w", chr(3), chr(29), "k", chr(67), chr(12), chr(48),chr(48),chr(48),chr(48),chr(48),chr(48),chr(48),chr(48), num4,num3,num2,num1, chr(16), chr(155), chr(64), chr(16), chr(14)

//@trailer[1] = barcode1 //after trailer in descriptor print barcode

endevent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top