FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para CA-Clipper IMPRESION EN TM-U220PA
Posts: 196
Joined: Tue Jul 01, 2008 06:34 PM
IMPRESION EN TM-U220PA
Posted: Tue Jul 01, 2008 06:40 PM

Hola

Neesito imprimir en una impresora ticketera, es la EPSON TM-U220PA, tengo problemas para hace funcinar el corte de papel, o existe alguna libreria adicional.

En Clipper para DOS solia hacerlo sin problemas con la TM-300c era CHR(27)+"i" y listo, pero en Five Win no me funciona.

De ante mano

Gracias
Att.

Luis Ponce

Luis Ponce
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
IMPRESION EN TM-U220PA
Posted: Tue Jul 01, 2008 09:20 PM

oPrn:Command("27","109") // corte de pagina para la TMU200D //
oPrn:Command("27","100","48") // corte de pagina para la STAR 2xxxxx

Salu2

Posts: 196
Joined: Tue Jul 01, 2008 06:34 PM
TM-U220PA
Posted: Wed Jul 02, 2008 01:29 PM

Gracias Willy, pero te comento que no funciono, lo probe antes del oPrn:End() y despues, con comillas y sin comillas... tampoco funciona ahi te paso mi codigo:

      nVer:=10
      nVerSon:=(nVer+nMaxDoc)
      nRow:=2

      oPrnCmp:=TDosPrn():New(cLptDoc)
      oPrnCmp:Command( { 27, 64 } )

      IF lCabecera         // imprime cabecera ??
         oPrnCmp:Say( nRow, 00, PADC(cMiCia,40) )
          nRow++
         oPrnCmp:Say( nRow, 00, Repl('-',40), nCompress )
          nRow++
         oPrnCmp:Say( nRow, 00, PADC('R.U.C. '+IMPRUC,40), nCompress )
          nRow++
         oPrnCmp:Say( nRow, 00, PADC('N/s '+TRIM(IMPSIT),40), nCompress )
          nRow++
      ENDIF

      oPrnCmp:Say( nRow, 00, Repl('-',40), nCompress )
       nRow++
      oPrnCmp:Say( nRow, 00, PADR(TRIM(cDesDoc)+' N° '+cNroSer+'-'+cNroTik,40), nCompress )
      oPrnCmp:Say( nRow, 00, PADL("Vendedor : "+LEFT(cGrFero,5),40), nCompress )
       nRow++
      oPrnCmp:Say( nRow, 00, PADL(CFECHA(dFecAct,'E')+' '+TIME(),40), nCompress )
       nRow++
      oPrnCmp:Say( nRow, 01, "Cantidad Std Descripcion        Importe", { nItalic,nCompress } )

      Select("IFacturas")
      IF IFacturas->( DbSeek( cCodDoc+cNroSer+'-'+cNroTik ) )
         WHILE IFacturas->CARGO=cCodDoc.and.IFacturas->TIKET=cNroSer+'-'+cNroTik
           cCodSer :=IFacturas->CODSER
           nCanSer :=IFacturas->CANTIDAD
           nPrecio :=IFacturas->PRECIO
           nItmPre :=IFacturas->PREBSE

           Select("IItems")
           If IItems->( DbSeek( UPPER( cCodSer)  ) )
              cItmDes:=PADL(IItems->DESITM,15)
              cItmUnd:=IItems->UNDITM
           ELSE
              cItmDes:=PADL('NO EXISTE...',15)
              cItmUnd:='XXX'
           ENDIF

           Select("IFacturas")

           oPrnCmp:Say( nVer,00, TRANS(IFacturas->CANTIDAD,MA53)+" "+cCodSur+" "+cItmDes, nCompress )
           oPrnCmp:Say( nVer,29, TRANS(IFacturas->IMPORTE,MA72C), nCompress )

            nVer ++

           nTotIgv+=IFacturas->IGV
           nTotFac+=IFacturas->IMPORTE
           nTotBse+=IFacturas->BSEIMP

           * Continua con otro item

           IFacturas->(DbSKIP())

         END
      ENDIF

      * a pagar

       nVer ++
      oPrnCmp:Say( nVer, 00, PADL("TOTAL"+cMoneda+" "+TRANS(nTotFac,MA72C),40), nCompress )
       nVer ++
       nVer ++
      oPrnCmp:Say( nVer, 00, "FW "+mmINICIAL+' '+LEFT(cCancela,3)+" "+AUT, nCompress )
      nVer+=8
      oPrnCmp:Say( nVer, 00, " ", nCompress )
      oPrnCmp:Command( { 27, 109 } )
      oPrnCmp:End()
Luis Ponce
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
IMPRESION EN TM-U220PA
Posted: Thu Jul 03, 2008 12:42 AM

oPrn:Command("27","109") // corte de pagina para la

oPrn:Command("27","7") // NO SE QUE PARA LA EPSON RARA

oPrn:Command("27","110") // NO SE QUE PARA LA EPSON RARA

antes del oprn:end()

Salu2

Posts: 196
Joined: Tue Jul 01, 2008 06:34 PM
IMPRESION EN TM-U220PA
Posted: Thu Jul 03, 2008 01:12 PM

Willy

No pasa nada, de todos modos gracias, creo que mejor estaba con clipper para DOS ahi si funcionaba

Si de algo sirve esta printer tiene puerto paralelo

no tengo tus fonos

Luis Ponce
Posts: 196
Joined: Tue Jul 01, 2008 06:34 PM
IMPRESION EN TM-U220PA
Posted: Thu Jul 03, 2008 05:32 PM

Willy

Creo que lo que sucede es que no recibe ningun comando, le pongo con la tdosprn :

oPrnCmp:Say( nRow, 00, PADC(cMiCia,40),nBold )

y tampoco pasa nada. deberia imprimir el titulo en negrita y no hace nada, baje un pdf con los codigos de impresion y es el mismo que me dices 27,109 tendran algo que ver los swicht que estan debajo de la printer ???? por que no recibe los codigos ESC/POS

Luis Ponce
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
IMPRESION EN TM-U220PA
Posted: Thu Jul 03, 2008 05:40 PM

Asegurate que la TMU esta "suicheada" para el protocolo "EPSON ESC"

Salu2

Posts: 196
Joined: Tue Jul 01, 2008 06:34 PM
IMPRESION EN TM-U220PA
Posted: Thu Jul 03, 2008 05:42 PM

Sabes cual es la posicion de los swichts ???

no tengo su manual y no veo data al respecto

Luis Ponce
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
IMPRESION EN TM-U220PA
Posted: Thu Jul 03, 2008 05:49 PM

me parece que el manual esta en el internet,,, podrias bajarlo i zas,.,,,,
Salu2

PD. (984906626)

Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
IMPRESION EN TM-U220PA
Posted: Fri Jul 04, 2008 04:48 AM

Hola Luis:

Prueba lo siguiente:
oPrnCmp:Say( nRow,0, Chr( 27 ) + Chr( 109 ), nCompress ) //Corte completo

oPrnCmp:Say( nRow,0, Chr( 27 ) + Chr( 105 ), nCompress ) //medio corte

Saludos.

Manuel Mercado

manuelmercado at prodigy dot net dot mx
Posts: 196
Joined: Tue Jul 01, 2008 06:34 PM
IMPRESION EN TM-U220PA
Posted: Fri Jul 04, 2008 11:46 PM

Muchas Gracias Manuel,

Tenia que ser uno de los Masters... obviamente funciono de maravilla, en teoria el oPrn:Command() debe realizar esa tarea.

Saludos desde PERU

Att.

Luis Ponce
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
IMPRESION EN TM-U220PA
Posted: Sat Jul 05, 2008 12:37 AM

Talvez sea cuestion de versiones, yo trabajo asi: Salu2
...
nRow := nRow + 7
oPrn:Say(nRow,0,"") // vacia el buffers
oPrn:Command("27","50") //1/6 salto vertical

CutPaper(oPrn,nRow)
Return(Nil)

//----------------------------------------------------
Function CutPaper(oPrn,nRow,vModo)
DEFAULT vModo := 1
Do Case
Case vModo = 1
oPrn:Command("27","109") // corte de pagina para la TMU200D //oPrn:Command("27","100","48") // corte de pagina para la STAR 2000 / SP2520
Case vModo = 2
oPrn:Command("27","7") // NO SE QUE PARA LA EPSON RARA
oPrn:Command("27","110") // NO SE QUE PARA LA EPSON RARA
Case vModo = 3
oPrn:Say(nRow,0,Chr(29),Chr(86),Chr(1)) //oPrn:Write( Chr(29)+Chr(86)+Chr(1) )
oPrn:Say(nRow,0,Chr(7))
oPrn:Say(nRow,0,Chr(27),Chr(112),Chr(0),Chr(25),Chr(250))
Other
Return Nil
EndCase
Return Nil

Posts: 196
Joined: Tue Jul 01, 2008 06:34 PM
IMPRESION EN TM-U220PA
Posted: Sun Jul 06, 2008 12:44 AM

Y si la printer fuera una Serial conectada al COM1, como haria con la TDOSPRN, esta solo imprime en LPT1.

Esto alguna vez lo solucione utilizando la PRINT ... FROM USER, es la unica solucion ?, o hay forma de que la TDOSPRN imprima en puerto serial

Gracias

Luis Ponce

Continue the discussion