I just checked with my staff, and the new thermal printers we're using do
not require any delay after sending each line to be printed. I've always
made the delay value configurable outside the app, and on mobile devices
we
are still using 100ms over Bluetooth and 10ms with a cable I believe, but
those are different printers than the ones we use from the desktop. And in
the past we used other serial printers that required a still longer delay
value. You'll just have to experiment.
Ginny
<danijel.koprivnjak@[EMAIL PROTECTED]
> wrote in message
news:a34332ed-e433-4a0d-98f5-0072043a7c94@[EMAIL PROTECTED]
> Hi !
>
> Maybe anybody can help me .I must printing on serial pos printer and
> using SERIAL CLASS
> (trying FAB SERIAL CLASS also)
>
> in my print function
>
> IF lSerialPrint
> oSerial:=Serial{}
> oSerial:OPEN(pParams.cPrintFileName)
>
> ptrHandle:=FOpen(cTempPath+"SERIAL.TXT",FO_READ+FO_SHARED)
>
> WHILE Citaj(@[EMAIL PROTECTED]
)
>
> cLinija:=cLinija+CRLF
> oSerial:Write(cLinija)
> // Sleep(500)
> END
>
> oSerial:CLOSE()
> FClose(ptrHandle)
> FErase(String2Psz(cTempPath+"SERIAL.TXT") )
>
> ENDIF
>
> STATIC FUNCTION Citaj(Simbol,handle, zavrsetak )
>
> LOCAL ret_val := TRUE
> LOCAL buffer
> LOCAL bytes
> LOCAL bufsize := 512
> LOCAL tempstring
> LOCAL ptrValue
>
> buffer := Space(bufsize)
> Simbol:=""
> WHILE .T.
> bytes := FRead(handle, @[EMAIL PROTECTED]
bufsize)
> tempstring := Left(buffer, bytes)
> IF ( ptrValue := At(Zavrsetak, tempstring) ) > 0
> Simbol += SubStr(tempstring, 1, ptrValue - 1)
> FSeek(handle, -(bytes - (ptrValue+1 )), FS_RELATIVE)
> EXIT
> ELSE
> Simbol += tempstring
> IF bytes < bufsize
> ret_val := .F.
> EXIT
> ENDIF
> ENDIF
> END
>
> RETURN ret_val
>
>
> if not put SLEEP() printer stop printing after approx. 40 bytes but if
> put sleep(500) it is to slowly
>
> thank you
>
> Danijel
--
Ginny
www.wasteworks.com
Software for Waste Management


|