As Jim indicates, if the printer were PCL6 only, then generating a PCL6 print stream is much harder than generating an equivalent one with PCL5.
[PCL6 is a highly structured language, using a binary post-fix notation, whilst PCL5 is an escape based system using (mainly) ASCII characters.]
However (as you have discovered) most (current) printers (except for the cheap 'host-based' ones) support both Page Description Languages.
I realise that you are trying to generate the print stream on a *n*x system - but do you have access to a Windows system?
If you do, install the relevant Windows PCL5 driver for the printer, and you may be able to discover the required PCL identifiers for the Paper Source ({esc}&l#H) and Output Bin ({esc}&l#G) escape sequences relevant to that printer model, as follows:
(a) If the driver follows the standard Windows driver model, the installation will probably have placed one or more .GPD files in the %WinDir%\System32\Spool\Drivers folder tree.
Examination (use NotePad) of these files (the names aren't necessarily obvious) may yield entries of the form:
Code:
*Option: Tray5
{
*rcNameID: =IDS_TRAY5
*Command: CmdSelect
{
*Order: DOC_SETUP.40
*Cmd: "<1B>&l9H"
}
}
(b) If that doesn't provide the answer, use the Windows driver to print ('to file') a small sample document, having first selected the required paper source and/or output bin via the driver Properties dialogue.
Then examine the generated print file to determine what PCL escape sequences (or PJL statements?) were used to select the tray/bin.