1
\$\begingroup\$

I could not find the step by step guide of some kind to accomplish what I am planning to do. I have two devices that I want to connect to PC (windows). Right now, both devices write their output through the printers attached to them. My goal is intercept the data sent to the printer and read the output through computer and remove the printer completely from both devices. On one of the device, the OEM seems to have used just some pins and removed others.

Can you please advise in a step-by-step manner the instructions I need to follow to transmit the data directly to the computer?

I have attached the images of the cable that is now going to printer.

I have some programming experience but this is the first time I am playing with serial and parallel port communication.

Input to pin-from instrument 1

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ Depending on how much interaction the printers have with the PC, this could be really hard. \$\endgroup\$ – Greg d'Eon Jan 21 '15 at 15:27
  • 1
    \$\begingroup\$ Is that DB-25 connector on the end of your existing parallel printer cable or is that a RS232 serial option? \$\endgroup\$ – brhans Jan 21 '15 at 15:52
  • 1
    \$\begingroup\$ Two questions, the first is what are the make and model of the devices. The second is what they print just plain text line feed or graphics? \$\endgroup\$ – Passerby Jan 21 '15 at 20:00
  • 1
    \$\begingroup\$ @Passerby: Both goes to Okidata printer. The make and model I have to check. If you are talking about hte instruments from where the data is generated, it is PerkinElmer CHN analyzer 2400 and bomb calorimeter. Both are antique piece of instrument with nothing other than printer attached to them.. They just print the plain text without graphics. \$\endgroup\$ – Jack_of_All_Trades Jan 21 '15 at 21:18
1
\$\begingroup\$

Forget trying to read data from the parallel port. You can do it, but it's not built in to the PC. Instead, look at the serial port.

ETA - Sorry, but I was unclear. First, of course, new machines generally don't have a parallel port. Problem is, new machines don't have serial ports, either. Drat. You can get USB adapters for both. What I meant was that basic (not BASIC, although it applies) operation of serial ports is intrinsically bidirectional, so you can read data from a serial port without getting into advanced features. This is not, in general, true of parallel ports, although bidirectional data transfers have been available for a long time. It's just not as easily implemented with standard commands the way serial data is.

You'll notice that only 8 pins are used. That is a bog-standard pin use, and is very common. Now look at the back of your PC, and you should find a serial port connector, which has 9 pins. You can get a standard "DB25 to DB9 serial port adapter" which will allow you to connect to this 9-pin connector using a standard serial cable. Note also that, for many applications you only need 3 wires to do this. Google RS232. Actually, you can probably get away with 2 wires, since most printers don't talk back to the device that is commanding it.

Now that you've made physical connection, it's time for software. What language do you program in? Read the manual, dude. If it's C or BASIC, there are built-in commands that will let you do this very simply. Note, though, that you may well have to fiddle around (perhaps with an oscilloscope) to determine the bit rate and configure your PC serial port to the correct speed and other parameters. (If you just want to jump in, try 9600 baud, 1 stop, no start, no parity.) Again, read up on RS232 and serial communications.

\$\endgroup\$
  • 1
    \$\begingroup\$ Many PCs don't have serial ports anymore, but you can get a USB to serial adapter, which will show up as a virtual COM port if you're programming in say one of the .NET languages. \$\endgroup\$ – John D Jan 21 '15 at 16:20
  • \$\begingroup\$ Thanks for replying! I was wondering when I would receive any reply. I program basically in Python and I can tackle it, I think. But does that mean that it would be close to impossible to read from the parallel port (the top image)? \$\endgroup\$ – Jack_of_All_Trades Jan 21 '15 at 16:28
  • 2
    \$\begingroup\$ No people used to use the parallel port all the time, back in the day I think it was easier than using serial. Here's some tutorial that might help logix4u.net/parallel-port/… \$\endgroup\$ – Some Hardware Guy Jan 21 '15 at 17:03
  • 1
    \$\begingroup\$ Modern Windows boxes don't allow unfettered access to the parallel port without some sort of driver in place. INP and OUTP won't cut it on XP or newer machines. See retired.beyondlogic.org/porttalk/porttalk.htm \$\endgroup\$ – Adam Lawrence Jan 21 '15 at 17:14
  • 1
    \$\begingroup\$ No. Usb to printer cables don't work in that direction, nor would the router with usb printing support. \$\endgroup\$ – Passerby Jan 21 '15 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.