Help - Search - Members - Calendar
Full Version: CLX to a Serial Printer
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
Lee Howard
Hello chaps...

Now....printing to a Panasonic XK-P3196 from a ControlLogix 5550/L1

Any idea's spoke to Rockwell support and they said setup the User Protocol in Controller Properties, and if you suss it out can you tell us how you did it.

What i'm really looking for is what does the printer need to spring into life and print a one liner?
Baud rate (general serial info)
Buffer size
Terminaltion Characters
Delete Mode (What is this??)

Or at least someone know where its hidden on the internet?

Cheers All

Lee
lee@crossmanrichards.co.nz
TechJunki
The method panic mode descibes in THIS post is probably one of the easiest ways to find the printer commands.
Lee Howard
Cheers for the prompt reply colgate.gif

I've had a look, but still doesn't explain things like start and end characters, line feed etc... sad.gif

TechJunki
QUOTE(Lee Howard @ May 23 2006, 10:05 PM) [snapback]34444[/snapback]
Cheers for the prompt reply colgate.gif

I've had a look, but still doesn't explain things like start and end characters, line feed etc... sad.gif



That is where you will need to experiment by Printing what you want to do out Com 1 and then read the output back to Com 2 on the same computer or use Com1 on another computer in something like Hyperterminal, that will show you what the printer driver is sending out the com port for instruction to the printer
TWControls
Also the ones I have used don't have a start and end charactor. You only need the carriage return and the form feed

This may not go for your printer but $r is a common carriage return and $p might be a form feed. PanicModes example will show you the quickest.

If you don't have two computers or there is some other reason you can't capture from one com to the other send the string to the Controllogix and capture in it's buffer. I never thought to do it Panic Modes way so I use the Controllogix buffer
mellis
Maybe we're overthinking this a bit...

If all you want to do is print lines of text, the standard ASCII control characters should be fine.

10 = Line Feed (cntl-J)
12 = Form Feed (cntl-L)
13 = Carriage Return (cntl-M)
(numbers are decimal value of ASCII character)

By the way, is it really a KX-P3196? I found some data on the Panasonic web site for that model. If you have the manual for the printer, the serial setup should be in there.

Assuming you don't have the manual, hook the printer up to your PC and use Hyperterminal to type at it. I'd guess 9600 baud, 8 data bits, no parity, 1 stop bit to start. If that doesn't work, change the baud rate in Hyperterminal until the printer prints a character for each one you type. The remainder of the serial parameters should be OK at 8N1. If not, you can usually figure them out by comparing what you typed to what printed. For example, if approximately half of the characters print correctly and the other half are garbage, change the parity to even or odd and try again. If you change parity to even or odd, change data bits to 7 at the same time.

Good luck,
Lee Howard
I've been having a play, managed to get text out of the CLX to the terminal emulator, i've found a manual and i've checked the settings for the printer, this printer was used to before on a PLC, but it was a PSC...

I think that your right and there probably isn't anything special i need to send for a print out...

Although i testing at the mo, and can't get anything to print going from terminal emu to printer.....

wacko.gif
Lee Howard
Well guys thanks for your help, I managed to get it working. If anyone reads this and is interested

1. Check your cables, setup your PC to print using the serial cable to the printer (just a windows test page).
2. Check your PLC, plug the same cable into your PLC and then send text out of PLC to PC and monitor with a Terminal Emulator.
3. Check PLC to Printer, use a ACSII Write (AWT). All i found you needed was a carriage return after the text, this is already built into CLX when you edit a String Tag.

The biggest problem i had was getting the right cables, once you have proved the cables mellis is right it's really simple,

I'm not sure if that list is helpful, if someone wants to do it properly then feel free.

I'm off to print out random lines to my printer....

Cheers

dancered.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.