Printing from tray2 PLC code's

Posted on 2009-04-24
Last Modified: 2013-12-15
In the manual from Syntess (sort of financial sofware) it says: Adding more paper trays. This code is exampled: CHR(27)+'&l1H'. But it aint working the printer still gets the paper from the default tray. Does anyone have any suggestions?
Question by:d_rijken
    LVL 16

    Expert Comment

    In the PCL5 escape sequence {esc}&l#H, the # represents the PCL tray identifier.

    The PCL tray identifier is rarely the same as  the (human visible) physical tray number, and, what's more, the identifiers vary between makes and even models within a make.

    Having said that, for a number of the modern HP 'departmental-level' LaserJet printers, the tray-ID to tray- number mapping is reasonably consistent:

    ID = 1 - tray 2
    ID = 2 - manual feed paper
    ID = 3 - manual feed envelope
    ID = 4 - tray 1 (drop-down  tray)
    ID = 5 - tray 3
    ID = 6 - optional envelope feeder
    ID = 7 - auto-select (uses Paper Size and Paper Type)
    ID = 8 - tray 4

    Author Comment

    Yeah ok i get that, but the {esc} is that the same as CHR(27) ? and should there be an + after it?
    LVL 16

    Accepted Solution

    I'm using {esc} to represent the (non-graphic) character with hexadecimal code 1B,  which is decimal 27.

    So, for example, the (five-character) escape sequence {esc}&l4H is hexadecimal 1B266C3448.

    The CHR(27) representation of the character with decimal code 27 is used in languages like Basic (and its derivatives).

    Whether or not you need a '+' depends on the syntax of the language you are using.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now