Author Topic: Sending large amounts of data to the LPT port?  (Read 2508 times)

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Sending large amounts of data to the LPT port?
« on: January 19, 2009, 09:33:53 am »
Hi,

I have a question about sending large amounts of data to the LPT port. I will be sending pages to a printer via the LPT component as strings
and I am wondering if the LPT component performs any buffering or should I split the print job into several chunks?

would I need to check the status of the port to see if it ready to recieve more data? how would this be done?

Thanks again for your help :)

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Sending large amounts of data to the LPT port?
« Reply #1 on: January 19, 2009, 11:45:00 am »
Hello

Unfortunately the current version of TnrLpt does not use a buffer for output operations.
It sends all data directly to port. You can try to create and use a separated thread for output large amount of data.

Roman
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Sending large amounts of data to the LPT port?
« Reply #2 on: January 19, 2009, 11:54:05 am »
Roman,

thanks again for taking time to answer my questions.

What should I be using on the component to see if the port is ready to recieve more data?
I presume I could check the BUSY pin is low? do you know what pins go high if the port
is busy but not in error, is it only the BUSY pin?

thanks

Chris

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Sending large amounts of data to the LPT port?
« Reply #3 on: January 19, 2009, 12:24:55 pm »
Hi Chris

The interpretation of LPT pins can be various.
It depends on the connected device or used data protocol.

Usual you should read data, if BUSY signal is low only.

But better if you will deep investigate the device specification.

Also you can start from here: http://en.wikipedia.org/wiki/Parallel_port

Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.