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!

MICROS 3700 Sending ESC/POS commands to printer

Status
Not open for further replies.

alex s

Technical User
Nov 20, 2018
1
US
Hi-

Some Epson printers support the ability to encode and print QR codes with ESC/POS commands.

I created a SIM to attempt to do this when printing a receipt trailer, but it doesn't work.

Searching around the forums, I've seen a few post that mention chr(0) might be the culprit as chr(0) is being stripped out.

I was wondering if anyone else had any luck sending ESC/POS commands in MICROS 3700 SIM or have any suggestion on how to resolve the issue.

Code:
event print_trailer : QRCODE

    var qrcode: A100
    var url: A50
    var urlLen: N2

    format url as "[URL unfurl="true"]https://example.com"[/URL]
    
    urlLen = len(url) + 3

    format qrCode as chr(13), chr(10), chr(27), chr(97), chr(1), chr(29), chr(40), chr(107), chr(4), chr(0), chr(49), chr(65), chr(50), chr(0), chr(29),chr(40), chr(107), chr(3), chr(0), chr(49), chr(67), chr(5), chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(69), chr(48),chr(29), chr(40), chr(107), chr(urlLen), chr(0), chr(49), chr(80), chr(48), url, chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(81), chr(48), chr(27), chr(64)
        
    @trailer [1] = qrCode

endevent
 
Hi,

Sending ESC/POS is not an issue, the issue is sending ESC/POS with chr(0). All other commands working good.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top