Looking for help: Capture printer data on parallel port - Page 1
Forum section: electronics / general

author: Bicurico
author_rank: Super Contributor
timestamp: January 08, 2018, 10:43:36 pm
content: Hi,I am trying to support a friend with this issue: he is about to purchase a test equipment, which only has a centronics (parallel port) interface.This is supposed to be used with a printer to obviously print out the test reports. The problem is of course that it is difficult to find printers with a parallel port nowadays and the test equipment only supports these four printers:HP ThinkjetEPSON LQ 1000 (24 Dot Matrix)EPSON FX80 (9 Dot Matrix)IBM Proprinter XLMy reasoning is that there must be a way to just read out the data sent by the device on the parallel port, transfer it through USB/RS232 to a PC and from there import it as plain text, PDF, or whatever. At this point I don't know if the test equipment sends just text or bitmap pictures, as well.Does such an interface (let's call it "Virtual Printer") already exist? If so, what do I need to google? I did find this:http://www.photologic.ca/CSC.html,but I don't know if it would work and the price seems a bit excessive, to me.Is it possible to read parallel port data into an Arduino? Sorry for the lame question, but I don't know anything about parallel ports...Thanks,Vitor

author: james_s
author_rank: Super Contributor
timestamp: January 08, 2018, 10:47:57 pm
content: Well you could try something like thishttps://www.amazon.com/Lpt2USB-Parallel-USB-Printer-Adapter/dp/B0015EP2JOIt's not cheap but depending on what you're doing it might be worth it. You could also look around for an older printer that has a parallel port still, they are not that hard to find, my printers both still have it in addition to ethernet and USB.Probably not too hard to roll your own but you'd have to factor in the value of your time unless it's just for fun.

author: Bicurico
author_rank: Super Contributor
timestamp: January 08, 2018, 10:59:43 pm
content: Thanks, but this adapter you link seems to be the other way around: connect a LPT printer to a USB only computer.What I need is to interface the LPT output of a test equipment, so that I can redirect it back to a PC, where I grab the data.The problem is that the device is only compatible with these 4 printer models and those are pretty old and hard to find. Similar printers are sold for crazy prices, too.This is why I thought about not connecting a real printer, but a "virtual printer" that gets the data from the test equipment and forwards it to a PC, where I can produce a PDF or print it on a modern printer.This "virtual printer" device would probably have to be able to emulate an Epson FX80 (seems to be the easiest).Regards,Vitor

author: Halcyon
author_rank: Unknown
timestamp: January 08, 2018, 11:28:01 pm
content: Is the test gear running Windows? Perhaps you could install a virtual printer driver which dumps everything out to file? Or just use the built-in Windows "Print to File" option available in most print dialog boxes (see attached).I tested this with just a regular PDF document and it outputs the raw PJL (Printer Job Language) data to a file.There are hardware solutions on the market, such as theSilent Hawk productsbut they aren't cheap.

author: Bicurico
author_rank: Super Contributor
timestamp: January 08, 2018, 11:31:19 pm
content: Hi,It doesn't run Windows.Cheers,Vitor

author: james_s
author_rank: Super Contributor
timestamp: January 09, 2018, 12:32:25 am
content: No, the adapter I linked does what you want, look at the description:"No USB ports on your older computer? This handy adapter plugs into the LPT (DB25) parallel port found on older computers and includes a built-in AC adapter for the power needed to communicate with USB printers."Consider your test gear an older computer with no USB port.

author: jolshefsky
author_rank: Regular Contributor
timestamp: January 09, 2018, 12:40:38 am
content: Not to get your hopes up, but I always thought this would be a neat project. Make a "printer" compatible with the old standards like the Epson FX-80 which would simply write the output to an SD card in PDF format. The first (and perhaps fairly easy) step would be to just dump the binary stream to an SD card and process after-the-fact.Funny that I have looked at the Raspberry Pi several times but couldn't think of a good use for one ... this particular project seems like a good match.

author: langwadt
author_rank: Super Contributor
timestamp: January 09, 2018, 01:38:05 am
content: Quote from: Bicurico on January 08, 2018, 10:43:36 pman Arduino is probably a bit on the slow side, a fast parallel port can do a few Mbytes/secthe easiest is probably to get on of those cheap 16 channel usb logic analysers and just process the data afterwards

author: james_s
author_rank: Super Contributor
timestamp: January 09, 2018, 05:40:16 am
content: Using a logic analyzer is easier than a $90 adapter that does exactly what he's asking for out of the box?If I were going to DIY something like this, I'd look at one of the low cost ARM core microcontrollers such as the STM32.

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 09, 2018, 07:33:40 am
content: Quote from: Bicurico on January 08, 2018, 10:43:36 pmHi Vitor, might help if you specified the equipment concerned but does it have any sort of removable storage media able to output files ? the problem with specific printer support is the data on the centronics port may not be in any universal format.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: January 09, 2018, 10:52:01 am
content: I once tried to do this for a Textronix scope that had a parallel printer port, following the circuit athttps://www-user.tu-chemnitz.de/~heha/basteln/PC/LptCap/index.en.htmI didn't have to time to finish it though, it was quicker to use the floppy drive on the scope and buy a usb-floppy drive.There are a few converter products on the market, but it's quite a niche application so tend to be pricey. There are so many printer variants, it can be hard to find the right combination of host/printer supported.

author: macboy
author_rank: Super Contributor
timestamp: January 09, 2018, 06:12:32 pm
content: Parallel printer port is very simple, and uses a type of handshake for timing. This old gear won't use any of the newfangled fast modes, so you can easily bit-bang the interface (emulating a printer) using any microcontroller. Essentially, you need to capture data when the host (test gear) pulses the strobe line. You need to set a busy line immediately, and pulse the ack line (and clear busy) when done with that byte. Then it repeats. The speed of transmission is thereby limited by the printer, which is a good thing since the characters-per-second speed of any mechanical printer is slower than the raw interface speed. This also makes your data capture job easy. It allows you all the time you need to (for example) send the captured bytes by serial port to a PC for logging.At least the HP thinkjet using PCL (Printer Control Language) level 1. It should not be difficult to parse this.

author: nctnico
author_rank: Super Contributor
timestamp: January 09, 2018, 06:23:13 pm
content: Quote from: macboy on January 09, 2018, 06:12:32 pmI agree. Maybe you need an external flipflop. A couple of decades ago I made an eprom emulator using a 8051. When receiving a character a flipflop was set to signal the printer is busy and software reset it so the computer could send the next character. This worked like a charm because I could print commands and hex files to it at around 200kB/s which was way quicker than RS232.

author: phil from seattle
author_rank: Super Contributor
timestamp: January 09, 2018, 06:30:31 pm
content: Yes, I agree too. The emulator for a centronics interface is very simple.https://en.wikipedia.org/wiki/Parallel_portI'd use something like an Arduino Nano. Probably 12 pins needed to emulate the printer. Just spit the received bytes out the USB serial port. Will need to interpret page feed and other commands.

author: nali
author_rank: Frequent Contributor
timestamp: January 09, 2018, 06:49:13 pm
content: This seems to do what you want, but they don't seem to have released it yet...http://www.retroprinter.com/about-the-retro-printer/what-does-the-retro-printer-do/

author: james_s
author_rank: Super Contributor
timestamp: January 09, 2018, 08:09:19 pm
content: The Arduino could almost certainly capture the data, but what about the other half of the equation, communicating with a modern printer via USB or perhaps ethernet. It's going to have to be a printer that has a real controller on board, not one of those cheap ones that rely on a Windows driver to do most of the work. Of course you could capture onto an SD card or something but that creates another step.

author: Bicurico
author_rank: Super Contributor
timestamp: January 09, 2018, 08:32:15 pm
content: Quote from: nali on January 09, 2018, 06:49:13 pmYES! That is *exactly* what I want! Thanks! I will keep an eye on this and if the proce is right, there is no reason to try and develop something on my own.To answer a few questions:1) I cannot say which test equipment it is, because it is an ongoing deal, which has not been concluded, yet.2) I don't want to actually print, I just want to capture the data and if it is just text, write my own report with it on the PC.3) All the info I have on the test equipment is what I already posted. I don't know if the output to the printer is just text or bitmap, as well.You have all given me some great ideas. I will now see if the device is in fact purchased.Regards,Vitor

author: SeanB
author_rank: Super Contributor
timestamp: January 09, 2018, 08:54:44 pm
content: The printers you mention are all compatible with the IBM Proprinter, or at least will print the straight ASCII that they are likely to be getting on the port, so your capture is easier, as all you will get is a few control characters on every page ( form feed, CR LF) then the data then a end of page parameter of FF, making it easy. Otherwise they might put the printer into graphics mode, which will be similar, just a lot more bitmapped data lines and then an escape sequence for the end of page.Both are easy to decode, though the graphic printout will be poor resolution, while the ASCII will be best delivered in a monospaced font to whatever device you are displaying on so it does not have jagged lines.

author: Bicurico
author_rank: Super Contributor
timestamp: January 09, 2018, 09:10:41 pm
content: The device has two dip switches dedicated to select one of the 4 printe rmodels. I agree that the difference between them is probably minor and related to some control characters.I started this thread as I was asked if the test equipment could be used to DOCUMENT measurements, without owning one of the four supported printer models.Of course I searched eBay for a cheap listing of those printers, but there is none being sold, at least at reasonable prices.I think I can now say that a solution is possible and it consists in hooking up some form of Arduino and send the decoded bytes from the test equipment over USB/serial port to the PC for further processing/formatting.I thought that this application would be of general interest, as there is probably a lot of older test equipment in this situation: works fine, but only output is through some old centronics printer.Now I need to see if the test equipment is indeed purchased and if so, I will look further into this. I keep mentioning Arduino, because I feel confortable in considering I will be able to program it as opposed to some other microcontroller. I am not a low level programmer. Also, I don't think that ther will be any timing issues, as stated before: LPT is as fast as the printer allows.I remember that those old dot matrix printer would allow some escape sequence, where each byte would be interpreted as a vertical line of 8 pixels (or something like that). This would generate the bitmap graphics. At this point I don't know if the test equipment supports this, but I think I would be able to reconstruct the bitmap with some VB .net programming.The linked Retro Printer looks spot on, but I just realized that there doesn't seem to be much going on... Last entry of June 2017, before 2015. Probably a dead project, unfortunately. If only they knew that there is another market besides retro computing: test equipment!Regards,Vitor

author: james_s
author_rank: Super Contributor
timestamp: January 09, 2018, 09:34:16 pm
content: Given all the information, I think the arduino or other microcontroller would be a reasonable fit, either log the images to a SD card for later retrieval or send them out to the PC over RS232, either one is likely to be not too difficult.

author: Halcyon
author_rank: Unknown
timestamp: January 09, 2018, 10:07:30 pm
content: Quote from: nali on January 09, 2018, 06:49:13 pmI was looking at this a few years ago, but it seems there has been no movement on this project since 2015. Might be worth contacting them.

author: tooki
author_rank: Super Contributor
timestamp: January 09, 2018, 11:37:51 pm
content: The Brother HL-L5000D has a parallel port and both IBM Proprinter and Epson FX emulation. In theory, a drop-in replacement printer.There should be tons of old printer models (especially business models) that have compatible emulation, eBay (or the local equivalent) should offer many options.

author: tooki
author_rank: Super Contributor
timestamp: January 09, 2018, 11:46:06 pm
content: And a bit of further browsing shows that a bunch of Oki printers (both laser and dot matrix) have parallel ports and Epson FX and/or IBM Proprinter support.I don’t think people realize how important those features still are in a lot of legacy business environments.

author: tooki
author_rank: Super Contributor
timestamp: January 09, 2018, 11:51:16 pm
content: Finally, it appears that IBM Proprinter format has actually been subsumed into a larger standard called “Personal Printer Data Stream”, so if you see a printer with PPDS support, it appears it should theoretically work.Some similar thing might be the case on the Epson side, where ESC/P appears to encompass Epson LQ.

author: tooki
author_rank: Super Contributor
timestamp: January 10, 2018, 12:04:45 am
content: I also found this doodad, which is designed to connect to a parallel port and capture the data, and outputs it to USB for printing. It does no data format conversion, but presumably one could capture the data somehow and parse it.http://www.lpt2usb.com/lpt-to-usb-adapterThe Photologic product line you linked to is similar, and they expressly say customers have done things like this.

author: Old Don
author_rank: Regular Contributor
timestamp: January 10, 2018, 05:36:27 pm
content: dug up this old thread on the internet:https://community.spiceworks.com/topic/286501-capture-parallel-printer-output

author: RWAP
author_rank: Newbie
timestamp: May 22, 2018, 07:45:36 pm
content: Quote from: Halcyon on January 09, 2018, 10:07:30 pmGood evening. I know it is a slightly old topic, but as I am behind the Retro-Printer project, I have just seen this thread and wondered if anyone had reached out to me?I think some people didn't read the updates on the site, but saw the date on the purchase page (2015) as being the last time anything was done with the project. The Retro-Printer Module has continued to be developed and is currently at the factory for final production of the module and case so we are hoping to have it available for sale in July.I do apologise that it has taken a while to bring the product to market, but I am basically a one-man band and my resources have been prioritised for other retro products (mainly keyboard membranes), whilst we awaiting results of beta-testing and changes to the hardware to cope with some equipment which seems to ignore the pubished centronics port standard!If you are looking for just the conversion routines, we have released the ESC/P2 conversion routine onhttps://github.com/RWAP/PrinterToPDFso that this can be improved. It handles most ESC/P2 codes (unlike the various ESC/P conversion routines available on the internet).

author: jsantoro
author_rank: Regular Contributor
timestamp: December 17, 2018, 05:21:45 pm
content: Hi,I have some old test equipment that outputs data and graphics, like a plot. Is there anything I can use on the USB side that will dump to a JPG in order to save this plots on a PC?

author: ebclr
author_rank: Super Contributor
timestamp: December 18, 2018, 02:33:45 am
content: https://www.amazon.com/RS-232-Printer-Parallel-Express-Adapter/dp/B00I2BYFT6/ref=sr_1_12?ie=UTF8&qid=1545100388&sr=8-12&keywords=lpt+serial+board

author: RWAP
author_rank: Newbie
timestamp: August 09, 2019, 09:28:10 pm
content: I was just checking in here - theRetro-Printerhas now been successfully in use by quite a variety of customers, with uses ranging from retro-computers, to door entry systems, Escon brake testing equipment and even Siemens S5 PLCs.It can certainly capture and convert both PCL and ESC/P2 data - including text and graphics.Output can be in various formats, including plain text, PNG, PDF or physical output on a modern connected network or USB printer.If you want more details - email me, or join in the discussion onwww.retroprinter-support.com

author: nfrancoe
author_rank: Newbie
timestamp: February 11, 2020, 09:27:19 pm
content: Hello Bicurico.Have you a final conclusion about this? I have the exact same needs.I want to "print" the screen of my TDS 210 (Tektronix Ocsilloscope) on computer (create a file on) via RS-232 or via Parallel port.I know that someone will tell me to use the Tektronix download tool... but NO WAY. Proposed Tektronix software are sooo bad.My TDS 210 Format options:DPU411, DPU412,ThinkJet, DeskJet, LaserJet, Epson, BMP, PCX, EPSIMAGE, INTERLEAF.Best regards,nfrancoe

author: tooki
author_rank: Super Contributor
timestamp: February 11, 2020, 10:33:35 pm
content: EPSIMAGE sounds like it’s probably EPS (encapsulated PostScript) output, which could potentially be converted to vector art, if it’s the graphics you’re after.

author: jmelson
author_rank: Super Contributor
timestamp: February 11, 2020, 10:34:57 pm
content: Quote from: Bicurico on January 08, 2018, 10:59:43 pmIt is fairly likely you could connect the instrument to a PC parallel port with the port selected to input mode, and the strobe pin wired to one of the status input pins.You'd need to write a small program to detect pulses on the device's strobe pin and read in a byte from the data port. Most devices like this only use a couple pinsother than the data port and strobe, and don't use too many status pins (like paper out, on line, etc.) or you can just hardwire those status inputs as the device needs.Jon

author: Gribo
author_rank: Frequent Contributor
timestamp: February 12, 2020, 12:44:50 am
content: I have done exactly as the OP required with an Arduino Nano Every and a custom board for the DB25 connector. I can share the code, it is pretty trivial.Edit: Attached is the Arduino source. change name to .ino

author: RWAP
author_rank: Newbie
timestamp: February 23, 2020, 01:16:32 pm
content: Quote from: nfrancoe on February 11, 2020, 09:27:19 pmThe Retro-Printer can be connected to the parallel post and capture the Epson printout (or even the HP Deskjet) to convert to PDF -www.retroprinter.com

author: amyk
author_rank: Super Contributor
timestamp: February 24, 2020, 03:09:46 am
content: FX2LP logic analyser (aka Saleae clone) with a bit of software will do what you want pretty cheaply.