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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM port not available ???

Status
Not open for further replies.

agedoorn

Programmer
Nov 7, 2000
28
BE
The COM1 port remains occupied after a print seccion.
The only way is to remove the COM1 port (hardware) in the device table and have them installed again.

Since I send an escape code "0RE" to a labelprinter TLP2742 (ZEBRA - ELTRON) in order to generate an EURO sign, after the seccion the COM port remains occupied.

The following is foreseen to initialise the COM port
nCOMPOORT=1
COM_FLUSH(ncompoort)
COM_OPEN(ncompoort,300,300,.T.)
COM_INIT(ncompoort,9600,"N",8,1)

Is there a solution to prevent this problem

Wim


Agedoorn - Belgium
 
Try a COM_CLOSE() at the end of the code or send all of the data to the printer with com_send(). Ian Boys
DTE Systems Ltd
 
Taking another look at your code, the COM_FLUSH()is probably irrelevant as the com port is not open yet. I have always been a bit lasy with making sure com ports are always closed and, just in Clipper, it does not seem to cause problems.

What is it that says the port is occupied, Clipper or Windows?

Do you know if the printer uses hardware or XON/XOFF handshaking, both are availabe in Tools.

You have not started using a Windows 98 PC? They can have a power saving problems, look at the FAQ's.

Good Luck. Ian Boys
DTE Systems Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top