For Programmers: Free Programming Magazines  


Home > Archive > Clipper > January 2007 > 20 second Pause in Printing !









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 20 second Pause in Printing !
prakashwadhwani@gmail.com

2007-01-06, 6:55 pm

Hi !

I developed a small POS system a few years back and its been running on
a Win98 PC with no problems.

Recently I sold it to a client using it on a WinXP PC and while
printing bills say somewhere around half way down the page, there is a
20 second gap after which the printer resumes printing automatically.
This happens for each & every bill.

I checked the source code & recompiled to no avail.

Has anyone faced this problem ?

Thx & Best Rgds,
Prakash.

prakashwadhwani@gmail.com

2007-01-06, 6:55 pm

Sorry ... I forgot to mention that I'm printing to an Epson dot matrix
LQ-300 & that I have given the eject command as the last print
statement.

My printing style is: set print on - series of ? (print statements) -
set print off.

However, if I want to avoid the 20 second delay, i just exit the
clipper app & bingo ... printing resumes INSTANTLY !!

Any ideas anyone ?

Thx & Best Rgds,
Prakash.




prakashwadhwani@gmail.com wrote:
> Hi !
>
> I developed a small POS system a few years back and its been running on
> a Win98 PC with no problems.
>
> Recently I sold it to a client using it on a WinXP PC and while
> printing bills say somewhere around half way down the page, there is a
> 20 second gap after which the printer resumes printing automatically.
> This happens for each & every bill.
>
> I checked the source code & recompiled to no avail.
>
> Has anyone faced this problem ?
>
> Thx & Best Rgds,
> Prakash.


dlzc

2007-01-06, 6:55 pm

Dear prakashwadhwani:

prakashwadhwani@gmail.com wrote:
....
> Recently I sold it to a client using it on a WinXP
> PC and while printing bills say somewhere around
> half way down the page, there is a 20 second gap
> after which the printer resumes printing automatically.
> This happens for each & every bill.


How is the printer connected to the user's PC... direct via LPT, direct
via USB, or networked?
Is "[x] Enable Printer Spooling" checked on it's port? It shouldn't
be.
Is "(*) Print Directly To Printer" selected in it's Advanced settings?
It should be.

Is there some feature located "half way" down the bill, such that you
are accessing data from a different source to print there?

If you put diagnostic information onscreen, does the program think it
has finished printing, even though the printer is hung up on earlier
stuff?

Just some stuff to check...

David A. Smith

dlzc

2007-01-06, 6:55 pm

Dear prakashwadhwani:

prakashwadhwani@gmail.com wrote:
> Sorry ... I forgot to mention that I'm printing to an
> Epson dot matrix LQ-300 & that I have given the
> eject command as the last print statement.
>
> My printing style is:


set printer to <LPT1/LPT2> (or similar)

> set print on
> series of ? (print statements) -

eject (based on what you say above)
> set print off.


set printer to (intentionally left blank)

> However, if I want to avoid the 20 second delay,
> i just exit the clipper app & bingo ... printing
> resumes INSTANTLY !!
>
> Any ideas anyone ?


The set printer to and set print on force a "file" open, think of it as
"stdprn". Unless you close the "file" the operating system has to
guess about when to send more stuff to the printer... it is queueing,
and only periodically services the queue. The printer's internal
buffer is likely filled, then Windoze ignores it until it "feels like"
checking for printer (buffer) status again. If you close the file,
Windoze makes it a priority to empty its buffer.

David A. Smith

kudlaty@proscan.com.pl

2007-01-06, 6:55 pm

Hi

My solving this problem is:

set print on
set console off
set device to print
set printer to ("temp.prn" )

***********************************
*** Something to print
*********************************

set printer to
set print off
set console on
set device to screen

text := "TYPE temp.prn > PRN"
__RUN( text )
FErase( "temp.prn" )


Blazej Powroznik

Markus Wiederstein

2007-01-06, 6:55 pm

Hi Prakash,

simply call the Procedure "prcommit" after your print job.

Markus


#include "set.ch"
PROCEDURE PRCOMMIT()
local cPrinter := set( _SET_PRINTFILE, "LPT3" )
set( _SET_PRINTFILE, "LPT2" )
set( _SET_PRINTFILE, "LPT1" )
set( _SET_PRINTFILE, "" )

// restores the original printer-port!
set(_SET_PRINTFILE, cPrinter, .t.)
return


Am Wed, 03 Jan 2007 20:33:23 +0100 hat <prakashwadhwani@gmail.com>
geschrieben:

> Hi !
>
> I developed a small POS system a few years back and its been running on
> a Win98 PC with no problems.
>
> Recently I sold it to a client using it on a WinXP PC and while
> printing bills say somewhere around half way down the page, there is a
> 20 second gap after which the printer resumes printing automatically.
> This happens for each & every bill.
>
> I checked the source code & recompiled to no avail.
>
> Has anyone faced this problem ?
>
> Thx & Best Rgds,
> Prakash.
>




--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
E. Fridman

2007-01-06, 6:55 pm

Prakash,

If it's your first Clipper implementation on a WinXP platform, make
sure you add CPU time slice release functionality as well.

HTH, Eugene
========================================
======
prakashwadhwani@gmail.com wrote:
> Hi !
>
> I developed a small POS system a few years back and its been running on
> a Win98 PC with no problems.
>
> Recently I sold it to a client using it on a WinXP PC and while
> printing bills say somewhere around half way down the page, there is a
> 20 second gap after which the printer resumes printing automatically.
> This happens for each & every bill.
>
> I checked the source code & recompiled to no avail.
>
> Has anyone faced this problem ?
>
> Thx & Best Rgds,
> Prakash.


Vitomir Cvitanovic

2007-01-06, 6:55 pm

Hi Prakash,

Problem is with WinXP (and Win2K). You can resolve it with small change in
registry

To decrease the time out use the steps below to edit the registry setting:
HKEY_LOCAL_MACHINE
SYSTEM
CurrentControlSet
Control
WOW
LPT_Timeout

Set LPT_Timeout to 3 seconds and you will be happy again. (Default is 15)
You have to apply this changes to any computer running DOS app on XP
computer (with LPT printing)

Best Regards,
Vito


<prakashwadhwani@gmail.com> wrote in message
news:1167852802.955175.207080@42g2000cwt.googlegroups.com...
> Hi !
>
> I developed a small POS system a few years back and its been running on
> a Win98 PC with no problems.
>
> Recently I sold it to a client using it on a WinXP PC and while
> printing bills say somewhere around half way down the page, there is a
> 20 second gap after which the printer resumes printing automatically.
> This happens for each & every bill.
>
> I checked the source code & recompiled to no avail.
>
> Has anyone faced this problem ?
>
> Thx & Best Rgds,
> Prakash.
>



diogenes

2007-01-06, 6:55 pm


If it's his first Clipper implementation on WinXP, maybe
he doesn't know how to add CPU time slice release.

In fact, I don't know either, and I wish I did because I've
wanted to do this. Is there a function or command in
Clipper to do this? (I am using CA Clipper 5.2).

Note, I write scripts that this application can run, and
in these scripts, I can call functions but I cannot use
Clipper "commands", so I need a function I can call,
if there is one.

This app also has pieces of the FiveWin library linked
in, and I discovered a FiveWin function called SysRefresh()
that does what I want. But if there is a "native" Clipper
function in 5.2 that does the same thing, I would like
to know about it. Thanks.

-- Jay
---------------------------------------------------------------

E. Fridman wrote:
> Prakash,
>
> If it's your first Clipper implementation on a WinXP platform, make
> sure you add CPU time slice release functionality as well.
>
> HTH, Eugene


Klas Engwall

2007-01-06, 6:55 pm

Jay,

>If it's his first Clipper implementation on WinXP, maybe
>he doesn't know how to add CPU time slice release.
>
>In fact, I don't know either, and I wish I did because I've
>wanted to do this. Is there a function or command in
>Clipper to do this? (I am using CA Clipper 5.2).


Not in Clipper itself, but in third party libraries such as the
Nanforum Toolkit and OsLib. Given what you have mentioned about your
application (no source code, just an exe with some scripting ability)
those solutions are of no use to you. Instead you will need something
external to the Clipper application. Search the newsgroup archive at
Google for Tamedos, which has been reported to help.

For Prakash, on the other hand, one of the libs I mentioned might work
(he didn't say which Clipper version he is using). I use the combined
FT_OnIdle() and FT_IAmIdle() with Clipper 5.2 and get the CPU hogging
down from 100% to one or two percent. The version of the Nanforum
Toolkit that is available for download at the Oasis MUST be patched to
work properly on NT/2K/XP. The patch, and instructions for use, can be
found at my web site at http://www.engwall.com/clipper/nfpat1a.htm

I believe these things are still mentioned in the VFAQ posted here
wly by Dave Pearson.

Regards,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com