Open Cash Drawer problem

Hi, I have problem open cash drawer attached to EPSON TM-300A Full Cut POS on LPT1 port. All escape sequences works well, but open/close cash drawer doesn’t work. I thought, it could be bad cable, but doesn’t. Orginal Code in EPSON Manual: >The following is an example program used when the drawer connected >to drawer drive signal 1 is driven using an ON time of 200 ms. >PRINT #1,CHR$(&H1B);“p”;CHR$(0);CHR$(100);CHR$(250); >GOSUB *WAIT300MS >WAIT300MS > 300 ms wait routine >RETURN My Code is something like this: txtTempFileName := ‘LPT1’; fFileHandler.TEXTMODE(FALSE); fFileHandler.WRITEMODE(TRUE); fFileHandler.OPEN(txtTempFileName); FOR i := 1 TO 4 DO BEGIN cByte := 27; //ESC fFileHandler.WRITE(cByte); CASE i OF 1: cByte := ‘p’; 2: cByte := 0; 3: cByte := 100; 4: cByte := 250; END; fFileHandler.WRITE(cByte); END; My code (a little bit modified in other operations of course) works well. Could anybody help me ? Best Regards

Jozef, The example you quoted from the Epson manual sends 5 characters to the printer, and then waits 300 ms… Your C/AL code, however:

  • writes 8 characters…
  • does not SLEEP(300)…
  • maybe needs to CLOSE the file to flush the output???

Hi, some EPSON Cash-Drawer can be openend with the EPSON Control-Font. Create a new Report with only one Section and a Label or Text Box with the Character ‘c’, this Lable must be printed in the Control-Font (thsi Font will be installed when you install a EPSON POS Printer Driver). You can also place this Label in your existing Inoive Report which will printed on the Epson printer. regards