MVP 2014 Simon Posted November 15, 2011 MVP 2014 Report Share Posted November 15, 2011 The ability to print from a Unitronics PLC has been around for a while, using the Protocol FB tools. However it has generally depended on using a serial line printer. At times customers ask for full A4 (similar size to US letter), page-style printouts. Examples include shift reports and batch reports. It recently occurred to me that there must be a way to send simple print information to a office style laser printer - and there is, called PCL. The easiest way would seem to be fitting an ethernet card to the PLC and use a network printer. Possibly it may also work if there is such a beast as a laser printer with RS232 input (I did see some on a google search but they were 2-3 times the price of a basic ethernet printer). PCL itself is a binary ASCII protocol, so it looks quite simple to send using the Protocol TCP/IP function blocks, for printing plain text. I plan to work on this should the need arise. It would be a nice "wow" factor to have this built in to the PLC as dedicated PCL function blocks, maybe even to the extent of printing out a trend graph or even small images (company logos, etc). Has anyone else come across this request or requirement for full-page printouts? Link to comment Share on other sites More sharing options...
Damian Posted November 15, 2011 Report Share Posted November 15, 2011 Hi Simon, For what it is worth, I think it is a great idea. D Link to comment Share on other sites More sharing options...
Emil Posted November 27, 2011 Report Share Posted November 27, 2011 Hi Friends, The theme is seems to me very interesting! About "normal" office printers - they usally have USB interface and ... Windows driver. In such case it's practically impossible to output print from current controllers. More and more popular are network printers. They have their own drivers, but also their own protocols (ASCII based) to drive them. I'll post soon working example to output print from Vision OPLC via Ethernet to such printer. Link to comment Share on other sites More sharing options...
Emil Posted November 27, 2011 Report Share Posted November 27, 2011 Printer example - as promised... Ethernet printer.vlp Link to comment Share on other sites More sharing options...
Jonathan Turgeon Posted March 2, 2012 Report Share Posted March 2, 2012 What kind of printer are you using, and does it need to support ASCII mode? Thanks Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted March 4, 2012 Author MVP 2014 Report Share Posted March 4, 2012 Hi Jonathan, Firstly, I haven't gone much further with this, as the immediate customer need went away. The communication between the PLC and the printer does need to be ASCII, as that is what the PLC can handle. What do you mean by ASCII mode? Do you mean that the printer prints the literal ASCII as it receives it? This is usually the case for strip or tape printers (like in a cash register) but gets awkward for whole-sheet printers, like office printers. The PCL protocol above still uses ASCII characters, but they include formatting commands, so the printer buffers all the information and only prints the page when told to. Most office laser printers support PCL, but it requires investigation to confirm all the details. EDIT: just took a look at Emil's example. This example looks like it would require literal ASCII mode, it is not a PCL sequence. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted April 4, 2013 MVP 2023 Report Share Posted April 4, 2013 I had a customer ask about network printing from the PLC and did some digging. The PCL5 language dates back to the LaserJet III and further information can be found here: http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=bpl04568&jumpid=reg_r1002_usen_c-001_title_r0001 This page includes links to the actual PCL Technical Reference Manual needed for creating PCL commands. I will be trying some of this out and I'll keep everyone updated. Joe T. Link to comment Share on other sites More sharing options...
james_deep Posted June 6, 2018 Report Share Posted June 6, 2018 This may be helpful if you haven’t come across it before here https://printerchatsupport.co.uk/epson-printer-support/ you can aslo do check this out. it may be helpful for you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now