NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum HAL HAL Components Controlling lube pump & a second parallel post

Welcome, Guest
Username: Password: Remember me

TOPIC: Controlling lube pump & a second parallel post

Controlling lube pump & a second parallel post 13 Jui 2011 14:02 #10468

  • TarHeelTom
  • TarHeelTom's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 99
  • Karma: 2
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
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 13 Jui 2011 14:20 #10469

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 86
  • Karma: 134
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 Jui 2011 14:51 by BigJohnT. Reason: typo
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 13 Jui 2011 16:33 #10471

  • TarHeelTom
  • TarHeelTom's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 99
  • Karma: 2
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
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 13 Jui 2011 16:45 #10472

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 86
  • Karma: 134
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
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 13 Jui 2011 17:10 #10473

  • TarHeelTom
  • TarHeelTom's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 99
  • Karma: 2
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
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 13 Jui 2011 17:26 #10475

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4117
  • Thank you received: 141
  • Karma: 129
Don't forget to spell it 0x1008 to indicate Hex.

Another way, is cat /proc/ioports
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 13 Jui 2011 23:20 #10476

  • TarHeelTom
  • TarHeelTom's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 99
  • Karma: 2
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
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 14 Jui 2011 03:23 #10482

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4117
  • Thank you received: 141
  • Karma: 129
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.
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 14 Jui 2011 04:28 #10483

  • TarHeelTom
  • TarHeelTom's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 99
  • Karma: 2
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.
The administrator has disabled public write access.

Re:Controlling lube pump & a second parallel post 14 Jui 2011 04:49 #10484

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 86
  • Karma: 134
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
The administrator has disabled public write access.
Time to create page: 1.133 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.