communicate to my printer via plc

Farid

Guest
F
hi guy's ..

I have a S7 200 PLC and I have HP 656 inkjet printer, I want to
print data from the plc by using the XMT instruction, and the thing
is that I dont know what is the printer's protocol i have the manual
but nothing is written about communication via external devices or about protocol, my printer has a USB port my PLC has RS485, can you please guy's help me out ?? I know that I need USB --> RS485 converter, but how can I print data from the plc ?

any help would be great..

thank you in advance.Farid
 
There are serial printer and graphic printers.

What you can send from your PLC is a SERIAL STRING. This string has to match soma ASCII codes understood by your printer.

The first thing you must have is a printer which can print from a serial string of commands.

Will this one do it?

I have never used a normal of-the-shelf printer to do this.
 
hi pierre...

first off, thank you for your reply(Geez.. that was really quik)

what kind of printer do you usualy use ?
i have a cut to length system and I want to print all the length and
quantity cutten by the nmachine, i know how to send my data(where it is and how to send it)... but i've never done that before(I dont know what kind of printers do you guy's usualy use?), as I've said before
I will simply use XMT instruction to send my data and im sure it will work some how, but still dont know the printer which I need to accomplish what I want ...can you please give more details, I want to know how i will tell my printer to print after I've sent all the data
is it a specified character defined by me (same as plcs communication) or should I buy a dedicated printer to do the job with all these details ?? please help.

best regards.Farid
 
Re: hi pierre...

Farid said:
... what kind of printer do you usualy use ?

Since they have become harder and harder to find and virtually impossible to find as a STOCK item, I take what I can get. Ask you suplyer of PC and Printer for a Serial DOT-MATRIX Printer. We use more Thermal printers than regular serial printers. Epson come to mind.

Farid said:
...I want to know how i will tell my printer to print after I've sent all the data...is it a specified character defined by me...

The ASCII codes will TELL your printer what to do. There is a character code for FEED FORM and another one for CARRAGE RETURN and so on. You will send the ASCII character for the letter A and it will print letter A. After your hole message is sent and printed you will either change line aor change page depending on which code you send it.


Farid said:
...should I buy a dedicated printer to do the job with all these details ?

They all have them codes in them.. the ASCII codes. The printers usually come with a booklet of the codes to make it work. But these codes are the same.

Printing directly from a PLC is a tedious job. You have to built your words character by character in ASCII format and send them through the PLC port.

I better prefer to use a cheap HMI with print functions. It enables me to build nices reports with less code and no codes in the PLC.

Good luck!
 
all what I've wanted to know!!

hi pierre..

thank you for your help it was all what I've wanted and more...

best regards.Farid
 
and more

Just some additional info.

As Pierre said, get a printer that also have an serial interface. Forget usb or parallel.

Printers with RS232 that I have used is:

Dot Matrix:

- OKI Microline 280. Serial port is optional. Add on card. (The add-on card was almost as expensive as the printer...)

- Epson LX-300 or LX-300+. Serial port is included/standard. (This was a inexpencive printer)

Laser:

- Epson EPL-5700. Serial port was included/standard.

I'm sure you will find others.

The language:
A common used control language is ESC/P or ESC/P2 (created by Epson). Google and you will find pdf-manuals.
You control the printer with commands, in addition to sending printable text.

Example:


TEXT HEADING "<27><64><64>" ; Initialize printer
"<27><115>0" ; Turn half speed OFF
"<27>9" ; Enable paper-out detection
"<27><45>0" ; Underline off
"<27>W0" ; Select double-width off
"<27>G" ; Select Double-strike
"<27>M" ; Select 12 cpi M = 12 P = 10
"<27><120>0" ; Select Draft
"<27><15>" ; Condensed mode: 27 15 Cancel= 18
"<13><10>" ; Carrige retur + LineFeed
"<9><9>" ; TAB'er
"THIS IS HEADING, BLAH, BLAH, BLAH "
"<27>H" ; Cancel Double-strike
"<27>P" ; Select xx cpi M = 12 P = 10
"<18>" ; Condensed mode: 27 15 Cancel= 18
"<13><10>" ; Carrige retur + LineFeed
"<9>" ; TAB
"This is some text"


This is parts of a text from a PLC program. (PLC and project specific lines removed).
<27> = decimal 27 = hex 1B = ESC

It's a fixed text with dynamic fields/variables. Actually, the printout was composed of several texts: Init/Heading, Body with variable length and element, Ending.


If the text is FIXED, it should be easy to send text from text- or word-memory.

If the text include variables (dynamic values), it depends on the PLC how easy it is. If the PLC has text instructions or text formatting, it should be easy. If the PLC hasn't, well you have to convert and set up the text yourself before sending it to the printer.

Good luck!

A last tip: If you have a lot to print, remember that communication is faster than the printer-head on a dot-matrix..... The keyword is handshake.
 
Last edited:
hai ,
i have plc (ML 1400)and HMI pvplus 600. i want take print out the data in the HMI . which showing on the top screen. when i press the print button . i want print out with along data . i dnt now how to do .

plz help me .reply to my mail id:[email protected]
 

Similar Topics

Hello, We have an installation where we use CLX controllers and now we want to implement a printer that receives his ASCII commands out of our...
Replies
8
Views
3,106
We are trying to poll data coming from a PLC for remote monitoring we have the IP address of the PLC and the default port number and the path is...
Replies
25
Views
406
We have some very old technology in my plant that needs adjusted but I don’t have the equipment. Can anyone tell me what I need to program this IO...
Replies
13
Views
293
Hi Guys, I want to connect my 1769-L36ERM to a different network domain, is it possible to do it using only the dual ports in the Controller? Or...
Replies
3
Views
175
Hi everyone, I'm working on a project where I need to exchange data between a Siemens S7-1200 PLC and an Allen-Bradley MicroLogix 1400 PLC. The...
Replies
8
Views
482
Back
Top Bottom