Parallel Port?

More
18 Oct 2011 21:04 #14035 by Todd Zuercher
Parallel Port? was created by Todd Zuercher
I am just curious, why is EMC only able to use parallel port pins 1,14,16, and 17 only as outputs? The reason I ask is because we have sever older CNCs running some old DOS software that do use each of those pins as inputs for limit switches. It would make converting them to EMC a bit simpler if I didn't have to make my own cables to run them. It would also be nice to beable to devide the number of ins and outs on one port more evenly. (if I could have 8 of each on one port, then I could get by with one instead of two.)

Please Log in or Create an account to join the conversation.

More
18 Oct 2011 21:09 #14036 by cncbasher
Replied by cncbasher on topic Re:Parallel Port?
the limits are placed on the spec of the parallel port not emc , check LPT port specs not all pins are bidirectional

Please Log in or Create an account to join the conversation.

More
18 Oct 2011 21:48 #14040 by andypugh
Replied by andypugh on topic Re:Parallel Port?
Todd Zuercher wrote:

I am just curious, why is EMC only able to use parallel port pins 1,14,16, and 17 only as outputs? The reason I ask is because we have sever older CNCs running some old DOS software that do use each of those pins as inputs for limit switches. It would make converting them to EMC a bit simpler if I didn't have to make my own cables to run them. It would also be nice to beable to devide the number of ins and outs on one port more evenly. (if I could have 8 of each on one port, then I could get by with one instead of two.)


Some specific parallel ports have open collector outputs, which can be forced low and the values read.
This is outside the p-port spec, and is not something that the EMC2 driver can afford to assume is safe.

It ought to be possible to change hal_parport to read those pins, if you want to.

Please Log in or Create an account to join the conversation.

More
19 Oct 2011 03:03 #14044 by cradek
Replied by cradek on topic Re:Parallel Port?
It may be undocumented, but there is experimental support for these four pins being inputs in the hal_parport driver. This is called "X" mode, and to get it, instead of specifying I/in or O/out, specify X for the direction. This gives 8 outputs and 9 inputs, a very nice mix.

Be aware it only works on some parallel ports (hardware limitation) and the driver code has probably not received much testing in the years since it was put in. The comments in the code call it experimental. Please report back with your success/failure if you try it.

Please Log in or Create an account to join the conversation.

More
19 Oct 2011 12:27 #14053 by Todd Zuercher
Replied by Todd Zuercher on topic Re:Parallel Port?
Maybe this hardware limitation on inputs for these pins is why we have had to always use ISA slot pp cards with these machines. I had assumed it was issues with the DOS softwares copy protection pp key (it had to be plugged into 1 of the 2 pps used by the control.)

Please Log in or Create an account to join the conversation.

More
20 Oct 2011 14:54 #14071 by andypugh
Replied by andypugh on topic Re:Parallel Port?
I am curious, does mode X work for you?

Please Log in or Create an account to join the conversation.

More
20 Oct 2011 15:15 #14073 by Todd Zuercher
Replied by Todd Zuercher on topic Re:Parallel Port?
I have not had time to test it yet. It is kind of a side fiddling thing for me, since the machines in question are still working with their old setup, and I have other things to do. If one of the old control pcs were to die (we are talking about 15+ year old pc computers here) then it would become a priority. Hopefully I can eventually get something sorted out before it is actually needed.

Please Log in or Create an account to join the conversation.

More
21 Nov 2011 15:02 #14992 by Todd Zuercher
Replied by Todd Zuercher on topic Re:Parallel Port?
I've done a little more testing and I think that X mode is going to work for me.

I made some slight modifications the parallel port tester in the wiki to work with X mode, so I could easily test the pins on the ports of the computer. Unfortunately the built in parallel port in this computer will not support the x mode, however the PCI one that I had will. I have another one of these on order. Once I have a second port then I will be able to do some testing on the machine.

File Attachment:

File Name: ptestx.hal
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
21 Nov 2011 15:04 - 21 Nov 2011 15:05 #14993 by Todd Zuercher
Replied by Todd Zuercher on topic Re:Parallel Port?
Here is the xml file to go with the other part.

File Attachment:

File Name: ptestx.txt
File Size:7 KB
Attachments:
Last edit: 21 Nov 2011 15:05 by Todd Zuercher.

Please Log in or Create an account to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum