Need help understanding the topology of OpenPNP & how to use a PC parallel port similar to LinuxCNC

465 views
Skip to first unread message

minomiko

unread,
Jun 26, 2018, 5:42:16 PM6/26/18
to OpenPnP
Hi Everyone!
I'm a noob to OpenPNP but not a noob to CNC machining.
25 years in the business. In doing so I have converted
my 1974 Bridgeport CNC1 to LinuxCNC and made my own CNC wire
EDM machine which also uses LinuxCNC.

I am interested in building my own PNP machine and am doing preliminary research.

LinuxCNC, which is really Axis and HAL, can allow you to use the Parallel port on
a PC based motherboard to directly control servos and steppers. Typically with step,
direction, and enable pins, all at low cost. You can buy a simple breakout boards
that uses the parallel port on eBay for as little as $5.00us. Stepper or servo motors, power supplies
and amp/controllers are all obtainable at a reasonable costs.

So here are my questions:
Does OpenPNP reside on a master computer and sends Gcode info using a serial connection
to a controller board such as the "Smoothie Board"?
This makes sense to allow for fast and high step rates for the motors.
Not so thrilled at using 3d-printer boards for PNP applications. Lots of extraneous stuff there...

Is there a way to use a PC Parallel port to run the motors etc. by just using OpenPNP?

I see that there is a reference driver for LinuxCNC...
https://openpnp.github.io/openpnp/master/org/openpnp/machine/reference/driver/LinuxCNC.html

Is that driver functional and working? Is there documentation on how to setup/use OpenPNP with LinuxCNC?  
Would it make sense to Run OpenPNP & LinuxCNC on the same machine and use the parallel port
to drive the needed motors? I do recognize that there may be a limitation on speed using this
topology.

Thanks!
minomiko

Cri S

unread,
Jun 26, 2018, 5:55:32 PM6/26/18
to ope...@googlegroups.com
The driver is not really functional but a working base that is
suitable for customisation.
It works for single head with X Y Z C and you must home manually on
linuxcnc interface ,
use M3 and M5 for vacuum on / off.
Grbl is cheap, especially if you consider the overall costs including drivers.
pc require bob, watchdog circuit that sometimes costs more as grbl.
> --
> You received this message because you are subscribed to the Google Groups
> "OpenPnP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openpnp+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/80c61522-0c06-45e5-b077-fe185751872f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Petar Delic

unread,
Jun 27, 2018, 7:20:35 AM6/27/18
to OpenPnP
I had similar problem as yours and I was trying to find sollution for weeks because I didn't managed to find easy "how to".
I wanted to use LinuxCNC and OpenPNP at the same computer.

So I will tell you what I have done in order to use OpenPNP to command with LinuxCNC directly.

Let me first tell you how it functions.   There is some "linuxcncrsh" protocol that is used by LinuxCNC in order to be controlled by ethernet.

The LinuxCNC listen to the "linuxcncrsh ethernet" port 5007 and it responds on the stings (g-code) received at that port and use parallel port to executed some g-code.

In order to tell LinuxCNC to listen that port you have to change some lines of the LinuxCNC machine.hal files.

This is how my "machine".hal files ends:
##################################################
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

loadusr linuxcncrsh


loadusr -W hal_manualtoolchange
#net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
#net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
#net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
#net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
###################################################

Please notice that I added this line: loadusr linuxcncrsh    (that tells LinuxCNC to listen ethernet port 5007 for G_code commands).
Also please notice that I commented lines with "tool-change".

At the OpenPNP side there is a hidden folder in the "home" directory with name .openpnp .   In that folder there is a machine.xml file.  You need to edit the file in order to change the port that use OpenPNP to sends g-code commands by network to LinuxCNC.

<driver class="org.openpnp.machine.reference.driver.LinuxCNC" server-ip="127.0.0.1" port="5007" feed-rate-mm-per-minute="50000.0"/>

So the ip-address have to be 127.0.0.1   and port 5007 and some feed-rate-mm-per-minute that is not zero.




In order to install OpenPNP alongside with linuxCNC, which is the great pain install ubuntu 12.04 first and than add package for installing LinuxCNC and install LinuxCNC.  Installing OpenPNP at the ubuntu 12.04 is easy.

In order to do that do what is written at this page:

minomiko

unread,
Jun 27, 2018, 1:04:34 PM6/27/18
to OpenPnP

Thanks for the help Petar!

Not sure how things will go with 2 resource hungry programs under one machine. I will test it out.
Another test would be to run LinuxCNC on one machnine and OpenPNP on another with an Ethernet cable between the two...

Cheers!
minomiko

Petar Delic

unread,
Jun 27, 2018, 1:29:19 PM6/27/18
to OpenPnP
Hi,
 You are welcome Minomiko.

For LinuxCNC (I have some milling machine that is controlled by LinuxCNC) I am using old desktop core2duo processor running at 2.4GHz and just 4 GB of RAMs.

I notice that when I disable all the things that I am not using at the motherboard bios, that the latency drops.

So that old core2duo is more than enough for the LinuxCNC.


For the OpenPNP I am not sure if some faster hardware are needed.

Thanks,
Petar
Reply all
Reply to author
Forward
0 new messages