PC based control using parallel port

J

Thread Starter

jody

Hello everyone,

I am trying to use the parallel port of a standard pc to control a parallel mechanism actuated by pneumatics actuators. I need to use the DATA pins of the parallel port to switch the solenoids valves. My OS is win xp so i am using inpout32.dll to acceed to the parallel port. What happens is that I can write the register with a C program but at the pins I have not signal. Can someone help me?

Thx,

Jody
 
Hi,
I have developed SCADA system using paralel port. My controler has 4 analog inputs and 1 analog ouputs and 8 years is working good.

more info for me:

http://nikolov.p-dir.com

You can use I/O ports 378, 379 and 38A for access all registres for paralel port. And this is enought. May be your DLL is not working?!

Regards:
Niko
 
N

Nathan Boeger

I'm working on a project where we'll be using similar controls. We're currently investigating the option of using a parallel port->digital encoder that outputs to relays. This would be a super cheap way to control devices from a PC. We'll probably be controlling it with C running on a Linux machine or Java, but it you should be able to implement this with whatever language/OS you want.

----
Nathan Boeger
http://www.inductiveautomation.com
"Design Simplicity Cures Engineered Complexity"
 
L
Uum, I tend to avoid commenting on such ideas, but these are always what I call "penny-wise and pound foolish". A low-end PLC costs under $100; a "real" digital I/O card for a PC I won't expect to be any more than that.

Most PC today don't use real hardware "registers" for their parallel or serial ports, they use some form of programmable logic to simulate UARTs and the parallel registers. Thus they are very low power and don't expect to be driving anything. You may succeed in getting this to work... in a lab or for a few months, but expect your parallel ports to burn out frequently. Assuming you are also using the parallel port of the PC's motherboard... is replacing the motherboard twice a year "cheap"?

Best regards
- Lynn August Linse, www.digi.com
Protocols over IP-network Blog http://iatips.com/blog
 
C

Curt Wuollet

We at least agree on this :^). You forgot to mention that the duopoly likes to change the standards on printer ports every so often which will break your code or cause headaches on the vast variety of PCs out there. Or that lots of drivers like to change the modes of the port at a whim. The original was just a parallel port with a few handshake lines. We gone far enough away from that where it should be considered a dedicated printer interface, especially when using shrink wrapped software and closed systems that consider the port their exclusive property.

Regards
cww
 
B

Brian E Boothe

A $129.00 high end Motherboard versus a $2,000 Allen Bradley Digital card ("hmmmm, I have to think about that one") and Opto-Isolators work miracles in Parallel-port I/O Controlling. I have a wonderfull 486DX4-100 Setup I can show ya. The motherboard was $34.00, socket your opto-Isolators. One fails, U replace it with a 60 cent opto-isolator, and another tip: "TRIACs".
 
C

Curt Wuollet

Yes, but the same concept can be exploited for serious amounts of IO without the parallel port. I designed a card that provides 24 optoisolated 24V PLC spec inputs and 24 .5A optoisolated DC outputs for $3 and change a point. And you can run as many as you have slots. Or you can get one of the high count IO cards and use multiple level translator boards with that. You can easily scan 512 or even 1024 points with a very modest PC. And you have no worries about drivers or BIOS messing with your IO. And you can tie that PC to others stuffed with IO and use them as remotes at ethernet speeds. High IO counts this way can cost many thousands less than a PLC setup for that kind of IO count. Even if you don't need massive IO counts, the increased reliability of using dedicated hardware in your PC will be worth it. And this is coming from a big fan of least cost solutions. I consider printer port solutions to be labware or for lashups but for production you really should have something that miscellaneous software doesn't try to exclusive open, lock, or print to.

Regards

cww
 
M

Michael Griffin

Doing digital I/O through parallel ports has been a favourite of student projects for years. It's not unusual for someone doing a project like this however to ruin several printer ports before they get it right. It's been usually considered a good idea to use a plug-in parallel printer port board instead of ruining the motherboard, especially if it's the motherboard in the only computer you have.

However, the plug-in parallel printer port boards however are not as cheap as what you might expect. I also believe that a lot of computer shops don't even stock parallel printer port boards anymore. Parallel port printers are becoming scarce, as most modern ones use USB or ethernet. It won't be long before PC motherboards no longer come with parallel ports built in (eliminating some of the little used connectors would help in making the boards smaller). If I recall correctly, Apple PCs dropped parallel printer ports years ago.

The "industrial" 24 point digital I/O boards (TTL level) are not much more expensive than a plug-in parallel port board, and they're cheaper than a good motherboard. Since the DIO type boards have a lot more I/O and are easier to work with, it's not unreasonable to use one. You would still need to add an external opto-isolator board, but those are not too difficult or expensive to make.
 
Top