Print to POS Printer on serial port
-
Hi, I have an application where I print bills to POS printer connected to serial port COM1. How can I check if printer in turned on and printer status is ok. When I do serialPort.Write(myString) I do not get any error. How can I check printer or serial port status? Thank, Jure
-
Hi, I have an application where I print bills to POS printer connected to serial port COM1. How can I check if printer in turned on and printer status is ok. When I do serialPort.Write(myString) I do not get any error. How can I check printer or serial port status? Thank, Jure
Most POS printers have a driver/api so that you can do these things more easily. THe most common printers (in the UK anyway) are the epson TM80's which can use the epson unified stuff: http://www.pos.epson-europe.com/support/drivers.htm[^] If yours is a different manufacturer I'd suggesting checking with them.
-
Hi, I have an application where I print bills to POS printer connected to serial port COM1. How can I check if printer in turned on and printer status is ok. When I do serialPort.Write(myString) I do not get any error. How can I check printer or serial port status? Thank, Jure
In addition to what originSH said, a lot of serial type devices also support a control set, where by you send off some command sequence to the device and expect a response. If you don't get a response (or it times out or whatever), then you know something's up.
"It was the day before today.... I remember it like it was yesterday." -Moleman
-
Most POS printers have a driver/api so that you can do these things more easily. THe most common printers (in the UK anyway) are the epson TM80's which can use the epson unified stuff: http://www.pos.epson-europe.com/support/drivers.htm[^] If yours is a different manufacturer I'd suggesting checking with them.
Hi, I am not using any drivers for my printer because I don't use graphical printing. I send text directly to serial port.
SerialPort serialPort=new SerialPort("COM1",9600,Parity.None,8,StopBits.One); serialPort.Open(); serialPort.Encoding = Encoding.GetEncoding(852); serialPort.Write(stringToPrint); serialPort.Close();
So I must urgently install driver if I completely understand you. -
In addition to what originSH said, a lot of serial type devices also support a control set, where by you send off some command sequence to the device and expect a response. If you don't get a response (or it times out or whatever), then you know something's up.
"It was the day before today.... I remember it like it was yesterday." -Moleman