JUDSON ROSA Posted June 12, 2023 Report Share Posted June 12, 2023 Boa tarde , Alguem ja fez alguma rotina para esse impressora de etiquetas ? em especial etiqueta de condolas. a instalação e porta estão corretas , mando teste de impressão e funciona normal , mas qd mando esses comando BPLA. N O D9 S3 JF Q1112,40 q832 A730,0,1,5,1,1,N,"NOME DA EMPRESA" A610,0,1,5,1,2,N,"NF: 2097272" A460,0,1,5,1,2,N,"ROTA: 451233" A300,0,1,5,1,2,N,"PEDIDO: 1234564" A160,0,1,5,1,2,N,"PALET: 1/1 " P1 Não funciona so da um avanço , alquem pode me dar uma ajuda ????? Quote Link to comment Share on other sites More sharing options...
Frazato Posted June 12, 2023 Report Share Posted June 12, 2023 Utilize o chr(002) no início para iniciar as configurações. Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted June 13, 2023 Author Report Share Posted June 13, 2023 nao , vejo amanha , obg Quote Link to comment Share on other sites More sharing options...
mkyx Posted June 13, 2023 Report Share Posted June 13, 2023 Eu faço assim, nessa impressora: Analisa aí, os comandos da impressora arq_file:="TPETI"+STRZERO(T_MAQ,3)+".TXT" oPrn:=TDosPrn():New(arq_file) oPrn:startpage() n_lin:=0 QT00=0 SELECT arq_esto ARQ_ESTO->(DBSETORDER(2)) ARQ_ESTO->(ORDSCOPE(0,"")) ARQ_ESTO->(ORDSCOPE(1,"")) IF CODI>0 SS=STRZERO(CODI,6) ARQ_ESTO->(DBSEEK(SS)) ENDIF IF CODI=0 .AND. CODF=0 ARQ_ESTO->(DBGOTOP()) ENDIF TPE:=TPETIQ COL02:={} A=1 QT1=QTI QT100=QTI AVANCOU:="N" // T_ETIQ:={""} if tpe=1 COL02:={} FOR I=1 TO LEN(COL01) select arq_esto ARQ_ESTO->(DBsetorder(2)) cod:=col01 if ARQ_ESTO->(DBseek(cod)) qt_1:=if("M2"$upper(arq_esto->unidade) .or. "M3"$upper(arq_esto->unidade) .or. "M "$upper(arq_esto->unidade) .or. "M. "$upper(arq_esto->unidade) .or. "METRO"$upper(arq_esto->unidade) .or. "KILO"$upper(arq_esto->unidade) .or. "KG"$upper(arq_esto->unidade) .or. "GR"$upper(arq_esto->unidade) .or. "GRANEL"$upper(arq_esto->unidade) .or. "G. "$upper(arq_esto->unidade),1,ARQ_ESTO->QUANTIDADE) qt100:=iif(qti=0,QT_1,qti) qt100:=if(qt100<=0,1,qt100) FOR Z=1 TO QT100 AADD(COL02,COD) NEXT ENDIF NEXT FOR I=1 TO LEN(COL03) select arq_esto ARQ_ESTO->(DBsetorder(2)) cod:=col03[i,1] qt100:=col03[i,4] if qt100>0 if ARQ_ESTO->(DBseek(cod)) qt100:=if(qt100<=0,1,qt100) FOR Z=1 TO QT100 AADD(COL02,COD) NEXT ENDIF endif NEXT qt100:=-10 N_QT:=0 CETIQ:=0 POS:=0 if len(col02)>0 ** oPrn:Say(0,0,CHR(2)+"e"+CHR(13)) oPrn:Say(0,0,CHR(2)+"KI70"+CHR(13)) oPrn:Say(0,0,CHR(2)+"m"+CHR(13)) oPrn:Say(0,0,CHR(2)+"M0300"+CHR(13)) oPrn:Say(0,0,CHR(2)+"L"+CHR(13)) oPrn:Say(0,0,"H16"+CHR(13)) oPrn:Say(0,0,"D11"+CHR(13)) ** oPrn:Say(0,0,"c0300"+CHR(13)) if etiqi=2 POS1:=30+537 POS2:=320+537 POS3:=420+537 POS4:=288+537 POS5:=400+537 POS6:=20+537 POS7:=30+537 else POS1:=30 POS2:=320 POS3:=420 POS4:=288 POS5:=400 POS6:=20 POS7:=30 endif for i_1:=1 to len(col02) select arq_esto set order to 2 cod:=col02[i_1] seek cod if ARQ_ESTO->(found()) qt100:=iif(qt100=0,int(arq_esto->quantidade),qt100) qt100:=if(qt100<=0,1,qt100) DE:=alltrim(left(ARQ_ESTO->DESCRICAO,35)) PU:=ARQ_ESTO->AVISTA LOTE:=ARQ_ESTO->COD_EAN13 IF VAL(ALLTRIM(LOTE))=0 LOTE:=ARQ_ESTO->CODIGO ENDIF IF LEN(ALLTRIM(STR(VAL(LOTE),13)))<=12 LOTE:=LEFT(LOTE,12) LOTE:=ALLTRIM(STR(VAL(LOTE),13)) LOTE:="789"+STRZERO(VAL(LOTE),9) DIGI:="131313131313" T=0 FOR I0=1 TO 12 T:=T+(VAL(SUBSTR(LOTE,I0,1))*VAL(SUBSTR(DIGI,I0,1))) NEXT I0 DIG="0" IF (T/10)>INT(T/10) DIG:=STR(((INT(T/10)+1)*10)-T,1) ENDIF LOTE:=LOTE+DIG ELSE LOTE:=COD_EAN13 ENDIF ** oPrn:Say(0,0,"19110030197"+STRZERO(POS1,4)+NO_E+CHR(13)) ** oPrn:Say(0,0,"1X1100001000200L200010") oPrn:Say(0,0,"19110000215"+STRZERO(POS1,4)+NO_E+CHR(13)) oPrn:Say(0,0,"19110020210"+STRZERO(POS5,4)+str(val(cod))+CHR(13)) ** oPrn:Say(0,0,"1 3 1 2 000 0160 0050"+DE+CHR(13)) clin3:="R$" oPrn:Say(0,0,"19110030165"+STRZERO(POS2+25,4)+cLin3+CHR(13)) IF AVI clin2:=TRANSFORM(AVISTA,"@E 999999.99") clin3:="Av" oPrn:Say(0,0,"19110030165"+STRZERO(POS3,4)+cLin3+CHR(13)) ELSE clin2:=TRANSFORM(APRAZO,"@E 999999.99") clin3:="Ap" oPrn:Say(0,0,"19110030165"+STRZERO(POS3,4)+cLin3+CHR(13)) ENDIF oPrn:Say(0,0,"19110050082"+STRZERO(POS4+20,4)+cLin2+CHR(13)) ** oPrn:Say(0,0,"19110010060"+STRZERO(POS5,4)+str(val(cod))+CHR(13)) CTIPBAR:="F" CBAR:=LOTE ** oPrn:Say(0,0,"1"+cTipBar+"3 2 060 0015"+STRZERO(POS1,4)+cBar+CHR(13)) oPrn:Say(0,0,"1"+cTipBar+"321000075"+STRZERO(POS6,4)+cBar+CHR(13)) ** oPrn:Say(0,0,"1 2 1 2 000 0030 0015"+DE+CHR(13)) oPrn:Say(0,0,"19110020012"+STRZERO(POS7,4)+DE+CHR(13)) oPrn:Say(0,0,"Q0001"+CHR(13)) POS1:=30+537 POS2:=320+537 POS3:=420+537 POS4:=288+537 POS5:=400+537 POS6:=20+537 POS7:=30+537 IF (INT(I_1/2)=I_1/2 .AND. I_1<LEN(COL02) .and. etiqi=1) .or. (etiqi=2 .and. INT(I_1/2)#I_1/2 .AND. I_1<LEN(COL02)) oPrn:Say(0,0,CHR(2)+"F"+CHR(13)) oPrn:Say(0,0,"E"+CHR(13)) oPrn:Say(0,0,CHR(2)+"m"+CHR(13)) oPrn:Say(0,0,CHR(2)+"M0500"+CHR(13)) oPrn:Say(0,0,CHR(2)+"L"+CHR(13)) oPrn:Say(0,0,"H10"+CHR(13)) oPrn:Say(0,0,"D11"+CHR(13)) POS1:=30 POS2:=320 POS3:=420 POS4:=288 POS5:=400 POS6:=20 POS7:=30 ENDIF endif next oPrn:Say(0,0,CHR(2)+"f220"+CHR(13)) oPrn:Say(0,0,"E"+CHR(13)) endif ENDIF oPrn:EndPage() oPrn:End() printfileraw(cprinter,TrueName(arq_file)) Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted June 13, 2023 Author Report Share Posted June 13, 2023 9 horas atrás, mkyx disse: Eu faço assim, nessa impressora: Analisa aí, os comandos da impressora arq_file:="TPETI"+STRZERO(T_MAQ,3)+".TXT" oPrn:=TDosPrn():New(arq_file) oPrn:startpage() n_lin:=0 QT00=0 SELECT arq_esto ARQ_ESTO->(DBSETORDER(2)) ARQ_ESTO->(ORDSCOPE(0,"")) ARQ_ESTO->(ORDSCOPE(1,"")) IF CODI>0 SS=STRZERO(CODI,6) ARQ_ESTO->(DBSEEK(SS)) ENDIF IF CODI=0 .AND. CODF=0 ARQ_ESTO->(DBGOTOP()) ENDIF TPE:=TPETIQ COL02:={} A=1 QT1=QTI QT100=QTI AVANCOU:="N" // T_ETIQ:={""} if tpe=1 COL02:={} FOR I=1 TO LEN(COL01) select arq_esto ARQ_ESTO->(DBsetorder(2)) cod:=col01 if ARQ_ESTO->(DBseek(cod)) qt_1:=if("M2"$upper(arq_esto->unidade) .or. "M3"$upper(arq_esto->unidade) .or. "M "$upper(arq_esto->unidade) .or. "M. "$upper(arq_esto->unidade) .or. "METRO"$upper(arq_esto->unidade) .or. "KILO"$upper(arq_esto->unidade) .or. "KG"$upper(arq_esto->unidade) .or. "GR"$upper(arq_esto->unidade) .or. "GRANEL"$upper(arq_esto->unidade) .or. "G. "$upper(arq_esto->unidade),1,ARQ_ESTO->QUANTIDADE) qt100:=iif(qti=0,QT_1,qti) qt100:=if(qt100<=0,1,qt100) FOR Z=1 TO QT100 AADD(COL02,COD) NEXT ENDIF NEXT FOR I=1 TO LEN(COL03) select arq_esto ARQ_ESTO->(DBsetorder(2)) cod:=col03[i,1] qt100:=col03[i,4] if qt100>0 if ARQ_ESTO->(DBseek(cod)) qt100:=if(qt100<=0,1,qt100) FOR Z=1 TO QT100 AADD(COL02,COD) NEXT ENDIF endif NEXT qt100:=-10 N_QT:=0 CETIQ:=0 POS:=0 if len(col02)>0 ** oPrn:Say(0,0,CHR(2)+"e"+CHR(13)) oPrn:Say(0,0,CHR(2)+"KI70"+CHR(13)) oPrn:Say(0,0,CHR(2)+"m"+CHR(13)) oPrn:Say(0,0,CHR(2)+"M0300"+CHR(13)) oPrn:Say(0,0,CHR(2)+"L"+CHR(13)) oPrn:Say(0,0,"H16"+CHR(13)) oPrn:Say(0,0,"D11"+CHR(13)) ** oPrn:Say(0,0,"c0300"+CHR(13)) if etiqi=2 POS1:=30+537 POS2:=320+537 POS3:=420+537 POS4:=288+537 POS5:=400+537 POS6:=20+537 POS7:=30+537 else POS1:=30 POS2:=320 POS3:=420 POS4:=288 POS5:=400 POS6:=20 POS7:=30 endif for i_1:=1 to len(col02) select arq_esto set order to 2 cod:=col02[i_1] seek cod if ARQ_ESTO->(found()) qt100:=iif(qt100=0,int(arq_esto->quantidade),qt100) qt100:=if(qt100<=0,1,qt100) DE:=alltrim(left(ARQ_ESTO->DESCRICAO,35)) PU:=ARQ_ESTO->AVISTA LOTE:=ARQ_ESTO->COD_EAN13 IF VAL(ALLTRIM(LOTE))=0 LOTE:=ARQ_ESTO->CODIGO ENDIF IF LEN(ALLTRIM(STR(VAL(LOTE),13)))<=12 LOTE:=LEFT(LOTE,12) LOTE:=ALLTRIM(STR(VAL(LOTE),13)) LOTE:="789"+STRZERO(VAL(LOTE),9) DIGI:="131313131313" T=0 FOR I0=1 TO 12 T:=T+(VAL(SUBSTR(LOTE,I0,1))*VAL(SUBSTR(DIGI,I0,1))) NEXT I0 DIG="0" IF (T/10)>INT(T/10) DIG:=STR(((INT(T/10)+1)*10)-T,1) ENDIF LOTE:=LOTE+DIG ELSE LOTE:=COD_EAN13 ENDIF ** oPrn:Say(0,0,"19110030197"+STRZERO(POS1,4)+NO_E+CHR(13)) ** oPrn:Say(0,0,"1X1100001000200L200010") oPrn:Say(0,0,"19110000215"+STRZERO(POS1,4)+NO_E+CHR(13)) oPrn:Say(0,0,"19110020210"+STRZERO(POS5,4)+str(val(cod))+CHR(13)) ** oPrn:Say(0,0,"1 3 1 2 000 0160 0050"+DE+CHR(13)) clin3:="R$" oPrn:Say(0,0,"19110030165"+STRZERO(POS2+25,4)+cLin3+CHR(13)) IF AVI clin2:=TRANSFORM(AVISTA,"@E 999999.99") clin3:="Av" oPrn:Say(0,0,"19110030165"+STRZERO(POS3,4)+cLin3+CHR(13)) ELSE clin2:=TRANSFORM(APRAZO,"@E 999999.99") clin3:="Ap" oPrn:Say(0,0,"19110030165"+STRZERO(POS3,4)+cLin3+CHR(13)) ENDIF oPrn:Say(0,0,"19110050082"+STRZERO(POS4+20,4)+cLin2+CHR(13)) ** oPrn:Say(0,0,"19110010060"+STRZERO(POS5,4)+str(val(cod))+CHR(13)) CTIPBAR:="F" CBAR:=LOTE ** oPrn:Say(0,0,"1"+cTipBar+"3 2 060 0015"+STRZERO(POS1,4)+cBar+CHR(13)) oPrn:Say(0,0,"1"+cTipBar+"321000075"+STRZERO(POS6,4)+cBar+CHR(13)) ** oPrn:Say(0,0,"1 2 1 2 000 0030 0015"+DE+CHR(13)) oPrn:Say(0,0,"19110020012"+STRZERO(POS7,4)+DE+CHR(13)) oPrn:Say(0,0,"Q0001"+CHR(13)) POS1:=30+537 POS2:=320+537 POS3:=420+537 POS4:=288+537 POS5:=400+537 POS6:=20+537 POS7:=30+537 IF (INT(I_1/2)=I_1/2 .AND. I_1<LEN(COL02) .and. etiqi=1) .or. (etiqi=2 .and. INT(I_1/2)#I_1/2 .AND. I_1<LEN(COL02)) oPrn:Say(0,0,CHR(2)+"F"+CHR(13)) oPrn:Say(0,0,"E"+CHR(13)) oPrn:Say(0,0,CHR(2)+"m"+CHR(13)) oPrn:Say(0,0,CHR(2)+"M0500"+CHR(13)) oPrn:Say(0,0,CHR(2)+"L"+CHR(13)) oPrn:Say(0,0,"H10"+CHR(13)) oPrn:Say(0,0,"D11"+CHR(13)) POS1:=30 POS2:=320 POS3:=420 POS4:=288 POS5:=400 POS6:=20 POS7:=30 ENDIF endif next oPrn:Say(0,0,CHR(2)+"f220"+CHR(13)) oPrn:Say(0,0,"E"+CHR(13)) endif ENDIF oPrn:EndPage() oPrn:End() printfileraw(cprinter,TrueName(arq_file)) fiz desse jeito e nao imprime . Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted June 13, 2023 Author Report Share Posted June 13, 2023 19 horas atrás, Frazato disse: Utilize o chr(002) no início para iniciar as configurações. Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted June 14, 2023 Author Report Share Posted June 14, 2023 Pessoal obrigado , como faz tempo nao programo para esses tipos de impressoras , pelos comandos q foram passados , vi q sao os mesmos q uso na ARGOX . agora é so adaptar . valeu Quote Link to comment Share on other sites More sharing options...
Ladinilson Posted June 14, 2023 Report Share Posted June 14, 2023 Desculpe a brincadeira mas olhando esses código me lembrei da minha vida antes de conhecer o FastReport, acertar e ajeitar isso era terrível, um castigo que nenhum programador merece kkkk Theotokos 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.