Problem to open cash drawer, without printing ticket, therma

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Jose Marte2
Posts: 45
Joined: Thu Nov 16, 2017 2:19 pm
Location: República Dominicana

Problem to open cash drawer, without printing ticket, therma

#1 Post 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.
José Marte
Software & Servicios


User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

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

#2 Post by Eugene Lutsenko »

.
Last edited by Eugene Lutsenko on Thu May 03, 2018 11:57 am, edited 1 time in total.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

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

#3 Post by c-tec »

Hello,
you can send a special code to open it, look at the manual, there are also samples.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

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

#4 Post 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

User avatar
Jose Marte2
Posts: 45
Joined: Thu Nov 16, 2017 2:19 pm
Location: República Dominicana

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

#5 Post 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
José Marte
Software & Servicios


skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

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

#6 Post 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()
Best regards,

Chris.
www.aboservice.be

User avatar
Jose Marte2
Posts: 45
Joined: Thu Nov 16, 2017 2:19 pm
Location: República Dominicana

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

#7 Post 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
José Marte
Software & Servicios


Post Reply