Board index » cppbuilder » Problem with printing text using RS232
Jan
![]() CBuilder Developer |
Problem with printing text using RS2322005-02-26 05:12:17 AM cppbuilder67 Can anyone help me with this: I purchased an order printer (Epson TM200) with the following specifications: Baud Rate 19200 bps Data Bits 8 Bits Handshaking Hardware Parity Check Disabled, More specifications can be found on: www.star-micronics.co.jp/eng/service/usermanual/tsp600sm.pdf I downloaded a class that handel the serial communications from: www.ciemmesoft.com/componenti/ and I wrote this code: TCommPort *port = new TCommPort(); AnsiString com = Edit6->Text; port->SetCommPort("COM1"); port->OpenCommPort(); port->SetBaudRate(19200); port->SetParity(2); port->SetStopBits(2); port->SetByteSize(8); String message = "Print this"; char *ch = message.c_str(); port->WriteString(ch); port->CloseCommPort(); delete port; When I execute the code I don't get anything on paper. But when I change the String message to message = "Print this message \n"; I get some other funny characters printed on the paper (not Print this) Can anyone see what I am doing wrong? The paper is almost finished because I am trying from this morning. Thanks |