Controlling lube pump & a second parallel post

More
13 Jun 2011 21:02 #10468 by TarHeelTom
I have a one-shot lube pump which utilizes a clock motor and gear train. The clock motor needs to be turning all (or most) of the time when the mill is in motion.

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.

More
13 Jun 2011 21:20 - 13 Jun 2011 21:51 #10469 by BigJohnT
While you won't need the classicladder part for your way oiler the first part would work for you just send the output to turn on your motor.

www.linuxcnc.org/component/option,com_ku...d,9584/lang,italian/

To find a pci parallel port use lspci in a terminal window.

John
Last edit: 13 Jun 2011 21:51 by BigJohnT. Reason: typo

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

More
13 Jun 2011 23:33 #10471 by TarHeelTom
BigJohnT wrote:

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.

More
13 Jun 2011 23:45 #10472 by BigJohnT
There should be some addresses of the parallel port. To add a second parallel port to EMC take a look here.

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.

More
14 Jun 2011 00:10 #10473 by TarHeelTom
After doing some research on lspci, ran the command again as "lspci -v" and got a bit more information. Here is the result:


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.

More
14 Jun 2011 00:26 #10475 by andypugh
Don't forget to spell it 0x1008 to indicate Hex.

Another way, is cat /proc/ioports

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

More
14 Jun 2011 06:20 #10476 by TarHeelTom
andypugh wrote:

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.

More
14 Jun 2011 10:23 #10482 by andypugh
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"

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.

More
14 Jun 2011 11:28 #10483 by TarHeelTom
andypugh wrote:

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.

More
14 Jun 2011 11:49 #10484 by BigJohnT
Sorry, I forgot about the -v for lspci...

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.

Time to create page: 0.175 seconds
Powered by Kunena Forum