MultiValue Tech Tip!

The purpose of this tech tip is to illustrate a way to print from multiple trays on an HP2400 printer from a BASIC program by sending the appropriate escape sequences to the printer.  This Tech Tip was found on Kore Technologies Tech Tips page.

** PROGRAM : Z.HP2400.PRINT.TRAYS
** PURPOSE : Test sending escape command to printer to switch trays
** AUTHOR : pault,04-12-06, Kore Technologies, LLC
***************************************************************** **
* Note on Trays, 1 is the Manual feed, 2 & 3 are the storage ones.
* Here's the command: Ec&l#H
* Here are the Tray Options (#):
* 0 = Prints or ejects current page
* 1 = Tray 2
* 2 = Manual feed, paper
* 3 = Manual feed, envelope
* 4 = Tray 1
* 5 = Tray 3
* 6 = Optional envelop feeder
* 7 = Auto select
* 8 = Tray 4
* 20 to 69 = external trays
* So, to print from Tray 2 replace the # in Ec&l#H with a 1
* giving us Ec&l1H then convert that to hex for printing, 1B266C3148
***************************************************************** **
FF = CHAR(12) ;* Char 12 works for UniVerse (Pick flavor)
TRAY2 = "1B266C3148"
TRAY3 = "1B266C3548"
PRINT ICONV(TRAY2,'MX'):
PRINT "Printing from Tray 2"
PRINT FF
PRINT ICONV(TRAY3,'MX'):
PRINT "Printed from Tray 3"
PRINT FF
* Switch back to Tray 2 as we are assuming that is the default tray
PRINT ICONV(TRAY2,'MX')
END
menu
menu