Controlling lube pump & a second parallel post
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
Someone suggested grabbing a motion signal off of EMC2 and using it to set the output anytime that there is motion.
Anyone have any suggestions as to which signal might be appropriate?
Also, I'm still trying to get the second parallel port to function. The motherboard has one built-in parallel port, and I've put a parport card in the PCI slot.
Dmesg only talks about one parport, which was reported by Plug and Play, calls it parport 0, at 0x378.
I've been digging through dmesg and boot log, etc, but can't seem to find the second parport. Any ideas?
Thanks
Tom
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/component/option,com_ku...d,9584/lang,italian/
To find a pci parallel port use lspci in a terminal window.
John
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
To find a pci parallel port use lspci in a terminal window.
John
Okay, found it. Here is the one line in the output which applies.
05:00.0 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller
Now what do I do with this information?
Tom
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/docview/html/hal_parallel_port.html#r1_1_1
Of course using the port index is the easy option... they start with 0.
So in your hal file find where your parallel port is loaded and add the second one. Don't forget to add the read and write for the second port.
John
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
05:00.0 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03)
Subsystem: Device a000:2000
Flags: bus master, fast Back2Back, medium devsel, latency 32, IRQ 10
I/O ports at 1008
I/O ports at 1000
Memory at e0101000 (32-bit, non-prefetchable) [size=4K]
Memory at e0100000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Think I'll run the command again with "sudo" and see if it lets me see the Capabilities section.
So it looks like I need to use either 1008 or 1000, or possibly both.
Tom
Please Log in or Create an account to join the conversation.
Another way, is cat /proc/ioports
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
Don't forget to spell it 0x1008 to indicate Hex.
Another way, is cat /proc/ioports
Didn't put the "x" in, as I didn't realize why it was there. But finally ended up with:
loadrt hal_parport cfg="0x378 0x378 in 1008 out"
And that seems to work fine. Got the parallel port1 to send an estop and a limit reached signal, but haven't gotten port1 to receive the charge pump signal yet.
Am still lacking the header cable to connect port0, so can't try it yet.
But tomorrow is another day. I'll work on the lube pump signal, and perhaps the header cable will arrive.
Realized that I have a request for the developers. How does one send them a message? What is this "IRC"?
Thanks again for all the help. I doubt that this will be the last issue.
Tom
Please Log in or Create an account to join the conversation.
andypugh wrote:
loadrt hal_parport cfg="0x378 0x378 in 1008 out"
That looks wrong, I would expect it to create three HAL parport objects, with two writing to the same physical port. (well, actually, I would expect an error message).
I think you want
loadrt hal_parport cfg="0x378 in 0x1008 out"
Realized that I have a request for the developers. How does one send them a message? What is this "IRC"?
IRC is Internet Relay Chat, a rather old-school live chat, but it works well. You can either use the embedded Java client linked from here:
www.linuxcnc.org/content/view/4/8/lang,english/
Or use a dedicated program. The default EMC2 installation includes Pidgin, Windows users tend to use mIRC and for Mac and iPhone I rather like Colloquy.
Feature requests can be submitted here: sourceforge.net/tracker/?group_id=6744&atid=356744
However, the best way to contact the maximum number of developers might be through the EMC-users mailing list.
A subset of devs read the forum too.
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
TarHeelTom wrote:
andypugh wrote:
loadrt hal_parport cfg="0x378 0x378 in 1008 out"
That looks wrong, I would expect it to create three HAL parport objects, with two writing to the same physical port. (well, actually, I would expect an error message).
I think you want
loadrt hal_parport cfg="0x378 in 0x1008 out"
That was typed at around 2 am. It is wrong. Hard to proofread stuff at that time of morning. Actually, it was:
loadrt hal_parport cfg="0x378 out 1008 out "
(I think) Just crawled out of bed, haven't had anything to drink yet this morning.
Please Log in or Create an account to join the conversation.
Your load line should be either
loadrt hal_parport cfg="0x378 out 0x1008 out "
or
loadrt hal_parport cfg="0 out 1 out "
John
Please Log in or Create an account to join the conversation.