Alaska Software Inc. - serial printer
Username: Password:
AuthorTopic: serial printer
rousseau alainserial printer
on Wed, 12 Dec 2012 20:43:43 +0100
hello folks

I would like convert a program
Now i use a receipt printer to lpt1
and I would like to use this on a serial (com )

in my program i use this statement :

imp_fich = "c:\bidon.prn"
if t_oui
   set printer  to lpt1
else
   set printer to (imp_fich)
endif
set printer on
set console off
? CHR( 27 ) + CHR( 07 ) + CHR( 20 ) + CHR( 20 )
SET PRINT OFF
SET PRINTER TO
SET CONSOLE ON

How I can translate this

I will use an epson tm-h6000 serial printer

thanks a lot
James LoughnerRe: serial printer
on Wed, 12 Dec 2012 14:44:05 -0500
That should work. If you are pure GUI though eliminate the set console 
commands.

Jim


On 12/12/2012 02:43 PM, rousseau alain wrote:
> hello folks
>
> I would like convert a program
> Now i use a receipt printer to lpt1
> and I would like to use this on a serial (com )
>
> in my program i use this statement :
>
> imp_fich = "c:\bidon.prn"
> if t_oui
>    set printer  to lpt1
> else
>    set printer to (imp_fich)
> endif
> set printer on
> set console off
> ? CHR( 27 ) + CHR( 07 ) + CHR( 20 ) + CHR( 20 )
> SET PRINT OFF
> SET PRINTER TO
> SET CONSOLE ON
>
> How I can translate this
>
> I will use an epson tm-h6000 serial printer
>
> thanks a lot
>
>
Jorge LRe: serial printer
on Thu, 13 Dec 2012 13:08:07 -0300
Hi Alain

if the new printer use the same commands that the old printer, only you need 
change set printer to lt1 to set printer to com1 or set printer to 
(xbpprinter..... object)

regards

"rousseau alain" escribió en el mensaje de 
noticias:bd95d5f$46b6c327$2de76@news.alaska-software.com...

hello folks

I would like convert a program
Now i use a receipt printer to lpt1
and I would like to use this on a serial (com )

in my program i use this statement :

imp_fich = "c:\bidon.prn"
if t_oui
   set printer  to lpt1
else
   set printer to (imp_fich)
endif
set printer on
set console off
? CHR( 27 ) + CHR( 07 ) + CHR( 20 ) + CHR( 20 )
SET PRINT OFF
SET PRINTER TO
SET CONSOLE ON

How I can translate this

I will use an epson tm-h6000 serial printer

thanks a lot
Hubert BrandelRe: serial printer
on Tue, 18 Dec 2012 23:49:45 +0100
Hi,

serial printers do have to have the correct speed and baud rate.
Serial printers are much slower over the COM than the LPT1 was and 
Windows may cut the connection when it takes to long.

I personaly always created strings inside without SET PRINTER ...

#define CRLF chr(13)+chr(10)
cBuffer := cPrinterInit +CRLF+CRLF
cBuffer += ...line to print + CRLF

after this was done, I saved it to a file or wrote it to the COM ...
If you use the low level functions to save it you can easy test the 
printing with copy xxx.buf COM1 ...

But today I only print with XbpPrint() or with my class HBPrintX.
Rousseau AlainRe: serial printer
on Sat, 22 Dec 2012 12:25:27 +0100
HI ALL

thanks for your answer

the solution 'set printer to com1'
is  working
now.
an other program writen in foxpro run in same time and
i dont now why it takes the com1 exclusively
i have simply created and new printer
generic

I use 2 different printers
epson tmu950 et
epson tmh6000 thermic

I haven't corrected manual to programming the command printer

i use this like function :

   imp_epson_st("ECHANGE ENDEANS LES 15 JOURS SUR")

function imp_epson_st(donnees)
  LIGNE_IMP = replicate(" ",(40 - len(donnees)) / 2) + donnees
  ? ligne_imp
return

I would like to find one other function or a description of commun command
to change
cpi emphasied cut semi cut ...

function truc_machin(texte,w_cpi,t_f_emphasied)  and so on


thanks a lot



Annick & Alain Rousseau
JouéClub Perpignan
Espace Roussillon EST (RD83)
Route de Barcarès
66530 Claira (Perpignan)
Tél : 04 68 08 20 00
http://www.joueclub-perpignan.fr
http://www.facebook.com/joueclub.perpignan


"rousseau alain" a écrit dans le message de groupe de discussion : 
bd95d5f$46b6c327$2de76@news.alaska-software.com...

hello folks

I would like convert a program
Now i use a receipt printer to lpt1
and I would like to use this on a serial (com )

in my program i use this statement :

imp_fich = "c:\bidon.prn"
if t_oui
   set printer  to lpt1
else
   set printer to (imp_fich)
endif
set printer on
set console off
? CHR( 27 ) + CHR( 07 ) + CHR( 20 ) + CHR( 20 )
SET PRINT OFF
SET PRINTER TO
SET CONSOLE ON

How I can translate this

I will use an epson tm-h6000 serial printer

thanks a lot
James LoughnerRe: serial printer
on Sat, 22 Dec 2012 18:58:17 -0500
You need to check the printer documentation to see the command sequence 
for special functions. It usually starts with an esc character plus 
command character(s) plus parameters.

Jim



On 12/22/2012 06:25 AM, Rousseau Alain wrote:
> HI ALL
>
> thanks for your answer
>
> the solution 'set printer to com1'
> is  working
> now.
> an other program writen in foxpro run in same time and
> i dont now why it takes the com1 exclusively
> i have simply created and new printer
> generic
>
> I use 2 different printers
> epson tmu950 et
> epson tmh6000 thermic
>
> I haven't corrected manual to programming the command printer
>
> i use this like function :
>
>    imp_epson_st("ECHANGE ENDEANS LES 15 JOURS SUR")
>
> function imp_epson_st(donnees)
>   LIGNE_IMP = replicate(" ",(40 - len(donnees)) / 2) + donnees
>   ? ligne_imp
> return
>
> I would like to find one other function or a description of commun command
> to change
> cpi emphasied cut semi cut ...
>
> function truc_machin(texte,w_cpi,t_f_emphasied)  and so on
>
>
> thanks a lot
>
>
>
> Annick & Alain Rousseau
> JouéClub Perpignan
> Espace Roussillon EST (RD83)
> Route de Barcarès
> 66530 Claira (Perpignan)
> Tél : 04 68 08 20 00
> http://www.joueclub-perpignan.fr
> http://www.facebook.com/joueclub.perpignan
>
>
> "rousseau alain" a écrit dans le message de groupe de discussion :
> bd95d5f$46b6c327$2de76@news.alaska-software.com...
>
> hello folks
>
> I would like convert a program
> Now i use a receipt printer to lpt1
> and I would like to use this on a serial (com )
>
> in my program i use this statement :
>
> imp_fich = "c:\bidon.prn"
> if t_oui
>    set printer  to lpt1
> else
>    set printer to (imp_fich)
> endif
> set printer on
> set console off
> ? CHR( 27 ) + CHR( 07 ) + CHR( 20 ) + CHR( 20 )
> SET PRINT OFF
> SET PRINTER TO
> SET CONSOLE ON
>
> How I can translate this
>
> I will use an epson tm-h6000 serial printer
>
> thanks a lot
>
Hubert BrandelRe: serial printer
on Sun, 23 Dec 2012 16:57:26 +0100
> an other program writen in foxpro run in same time and
> i dont now why it takes the com1 exclusively

you can NOT share a com printer to two programs.
SET PRINTER TO COM will open an exclusively printing chanel.

If it is a Epson printer or compatible you can use ESC/P Commands.
Most of them work on every Epson compatile printer, while others (color) 
only works on special printers.