Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem In My Serial Printer when printing (2)

Status
Not open for further replies.

nadifa

Programmer
Jul 7, 2000
5
ID
Hi...<br><br>My Aplication run two printer together at the same time. They are Parallel Printer (I Use EPSON LX-300) and Serial Printer (I Use EPSON TM-300B With maximum buffer 1kb Without Driver from Manufactur). In My Parallel Printer I can print text completely but in Serial Printer can't print completely <br>and I print same text.<br><br>My code for Serial Printer like this:<br><br>Open &quot;Com1:&quot; for Output as #1<br><br>Do While Not EOF()<br>&nbsp;&nbsp;Print #1,Field Name<br>&nbsp;&nbsp;&nbsp;LOOP<br>end do<br><br><br>and My code for Paralle Printer like this<br><br>Open &quot;Lpt1:&quot; for Output as #2<br>&nbsp;&nbsp;&nbsp;Print #2,Field Name<br>&nbsp;&nbsp;&nbsp;Loop<br>End do<br><br>How to solve it so I can print text completely in serial printer ?&nbsp;&nbsp;<br><br><br><br>&nbsp;<br>&nbsp;<br>
 
It sounds like you're experiencing buffer overflows, despite your 1mb of RAM in the printer.&nbsp;&nbsp;There are two answers to this:<br><br>1) The &quot;correct&quot; answer would be to monitor the DTR line on the serial port and stop sending when the device indicates it's busy.&nbsp;&nbsp;Then start sending when the port is no longer busy.<br><br>2) The &quot;Easy&quot; answer would be to put a 1000 milli-second delay in your loop for every 500 or 1000 characters sent.&nbsp;&nbsp;Make this a configuration parameter so you can make it higher or lower, depending on what works best.<br><br>Chip H.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top