Internet PLC Forum

General => Technical support => Topic started by: Don on February 04, 2004, 07:57:43 AM

Title: thermal line printer
Post by: Don on February 04, 2004, 07:57:43 AM
I am having problem printing from T100MD+ to a thermal line printer. Printer uses Xon/Xoff control.
When simulating program box pops up as expected but will not work live. I suspect a protocol error.. ? Thanks.
Title: Re: thermal line printer
Post by: Don on February 04, 2004, 08:40:44 AM
I have narrowed it down to the cable pinning.
I am now trying to figure out the pinning need to go from a DB9 to a DB25. DB25 had only pins 2,3,6,7,and 20.
Title: Re: thermal line printer
Post by: support on February 04, 2004, 08:42:04 AM
Does your printer uses hardware handshaking as well? If so, then short the RTS to CTS (7 to 8 on DB9), DSR to DTR (pin 4 to 6 on DB9) on the PRINTER side if the printer uses DB9.

You mentioned that your printer uses DB25, then for DB9 to DB15 wiring, it depends on whether your printer is configured as DCE or DTE. So it may be 2-2, 3, 5-7 or 2-3, 3-2, 5-7.  

If your printer uses strictly XON/XOFF protocol for flow control, then please check with the printer's supplier on the protocol spec. My guess is that you may have to send an XON character to the Printer before sending the data. Find out what ASCII character they use as XON and you can use the CHR$(n) to send the character to the printer prior to the data.
Title: Re: thermal line printer
Post by: Don on February 04, 2004, 09:32:58 AM
Printer has dip sw for xon/xoff or for DTR/DSR handshaking. Xon/xoff is set on.
This printer is normall driven by a QNX PC with DB9 to DB25 cable. It is pinned out as 2-2, 3-3, 4-6, 5-7, and 6-20. Manual says to send Chr$(27);"@" to initialize the printer which I am. But until I get the cable fixed I won't know if it's working ok.

Thanks
Title: Re: thermal line printer
Post by: Don on February 05, 2004, 09:32:12 AM
I have tried many combos with no luck.
Maybe this will work. The printer has the following Pins/signals :

1/FG, 2/TXD, 3/RXD, 6/DSR, 7/GND, 20/DTR
Pin 1 is not used

What are comm signals from PLC DB9 ?

Thanks  
Title: Re: thermal line printer
Post by: support on February 06, 2004, 11:06:11 AM
Did you try sending some data to the printer from HyperTerminal "Direct to Com x" configuration? That give you a better idea of how to get the printer to print out what you want.

If there is a DIP switch for XON/XOFF, then disable the XON/XOFF to simply communication.

The cable from PLC to the printer will be opposite that of the cable pin out from PC to the printer. Assuming your description of the pin out from PC to printer is accurate, then you should connect the following:

  PLC              Printer
    2                   3
    3                   2
    5                   7
    
Also short pin 6 and 20 together on the printer side. No other connection is necessary on the T100MD+ PLC side.

(Note that T100MX+ is different because it requires pin 4 to be connected to a +10V power to operate properly, usually this is obtained from the DSR pin of the host PC).