• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
March 28, 2024, 07:00:47 pm

News:

SMF - Just Installed!


LPT performance issues.

Started by chedges, March 08, 2010, 07:36:02 am

Previous topic - Next topic

chedges

March 08, 2010, 07:36:02 am Last Edit: March 08, 2010, 10:02:30 am by chedges
Hi,

I've been using the LPT port component from 8.22 for some time for sending data to a ticket printer as a string but I have recently noticed some
performance issues when sending the data to the printer.

To compare, I created a small text file which contains data for 10 tickets and send it to the LPT port via a DOS command
e.g. TYPE PrnData.txt > LPT1

Each ticket takes less than one second each to print.

I then created a very simple test app which simply sends the data as a string to the nrLPT port e.g

  if not fLPT1.Active then
   begin
     fLPT1.LptPortNo := 1;
     fLPT1.LptIOBase := StrToInt('$' + edtPortAddr.Text);

     fLPT1.Active := True;
   end;

   fLPT1.SendString(Ticket); //Ticket is a string containing the ticket data for all 10 tickets..

when printing, each ticket takes over 4 seconds to print :(  Is there any way I can speed this up as this is far to slow to be usable for us.

Thanks

Chris Hedges,