Page 1 of 1

Problem to open cash drawer, without printing ticket, therma

Posted: Wed May 02, 2018 7:00 pm
by Jose Marte2
Greetings, for all, I hope you are well. Please if anyone could help me with this issue, I have a 3nstar thermal printer everything works fine, print perfectly, open the cash drawer after printing, but I would like to know how to draw the money without having to print a document or a ticket . If someone has any idea or knows how to solve this, I would greatly appreciate it, the anticipated thanks.

Re: Problem to open cash drawer, without printing ticket, th

Posted: Wed May 02, 2018 8:39 pm
by Eugene Lutsenko
.

Re: Problem to open cash drawer, without printing ticket, th

Posted: Thu May 03, 2018 3:23 am
by c-tec
Hello,
you can send a special code to open it, look at the manual, there are also samples.
regards
Rudolf

Re: Problem to open cash drawer, without printing ticket, th

Posted: Thu May 03, 2018 5:06 am
by MIGUELON
Hello Jose, you should indicate the model of the printer and how you print the ticket:
1) with commands @ x, and dcprint say
2) with @ x, and say
3) With a form

You have to send a special chr () code sequence for each printer brand, these codes are in the manual.

regards
Miguel

Hola Jose deberias indicarme el modelo de la impresora y como imprimes el ticket:
1) con comandos @ x,y dcprint say
2) con @ x,y say
3) Con un formulario

Tienes que enviar una secuencia de codigos chr() especial para cada marca de impresora, estos codigos estan en el manual.

Saludos
Miguel

Re: Problem to open cash drawer, without printing ticket, th

Posted: Thu May 03, 2018 5:37 pm
by Jose Marte2
MIGUELON wrote:Hello Jose, you should indicate the model of the printer and how you print the ticket:
1) with commands @ x, and dcprint say
2) with @ x, and say
3) With a form

You have to send a special chr () code sequence for each printer brand, these codes are in the manual.

regards
Miguel

Hola Jose deberias indicarme el modelo de la impresora y como imprimes el ticket:
1) con comandos @ x,y dcprint say
2) con @ x,y say
3) Con un formulario

Tienes que enviar una secuencia de codigos chr() especial para cada marca de impresora, estos codigos estan en el manual.

Saludos
Miguel


The model of the printer is a thermal 3nStar connected by the usb port, when it prints it opens the cash drawer perfectly, the problem is that it wanted to append the drawer of money without having to print anything, with a command or something in Clipper and with a printer connected by the LPT1 port to the following:

// Open Gross Cash
// For Printer Star
Procedure OpenCaj1 ()
SET CONSOLE oFF
SET PRINTER oN
?? Chr (7)
SET PRINTER oFF
SET PRINTER TO
RETURN

// Open Box
// For Printer Epson and Other Brands
Procedure OpenCaj2 ()
SET CONSOLE oFF
SET DEVICE TO PRINTER
SET PRINTER oN
?? Chr (27) + Chr (112) + Chr (0) + Chr (50) + Chr (250)
SET PRINTER oFF
SET PRINTER TO
SET DEVICE TO SCREEN
Return

Re: Problem to open cash drawer, without printing ticket, th

Posted: Fri May 04, 2018 1:46 am
by skiman
Hi,

you can use almost the same code as in Clipper. You only need to know the name or part of the name for the printer.

Code: Select all

cModel := "3nstar"
o:=XbpPrinter():New()
aPrinters := o:list()
for x = 1 to len(aPrinters)
	if upper(cModel) $ upper(aPrinters[x])
		cModel := alltrim(aPrinters[x])
	       exit
        endif
next
o:Create(cModel)
set printer to OBJECT o
set console off
set print on
?? chr(27)+chr(112)+chr(0)+chr(40)+chr(250)
set print off
set printer to
set console on
o:destroy()

Re: Problem to open cash drawer, without printing ticket, th

Posted: Fri May 04, 2018 5:31 pm
by Jose Marte2
skiman wrote:Hi,

you can use almost the same code as in Clipper. You only need to know the name or part of the name for the printer.

Code: Select all

cModel := "3nstar"
o:=XbpPrinter():New()
aPrinters := o:list()
for x = 1 to len(aPrinters)
	if upper(cModel) $ upper(aPrinters[x])
		cModel := alltrim(aPrinters[x])
	       exit
        endif
next
o:Create(cModel)
set printer to OBJECT o
set console off
set print on
?? chr(27)+chr(112)+chr(0)+chr(40)+chr(250)
set print off
set printer to
set console on
o:destroy()
Excellent, Mr. Many many thanks