• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 492
  • Last Modified:

Printing from tray2 PLC code's

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?
  • 2
1 Solution
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
d_rijkenAuthor Commented:
Yeah ok i get that, but the {esc} is that the same as CHR(27) ? and should there be an + after it?
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.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now