Linux equivalent to NCPlot

More
17 Dec 2010 19:44 #6103 by metasim
Is there anything similar to the windows commercial program NCPlot where you can edit gcode directly AND have a backplot/toolpath visualization synchronized with it. I'm thinking of something along the lines of combining gedit with the backplot display in Axis. I can't find anything quite like NCPlot, but thought I'd ask to make sure I'm not missing something obvious. I know you could switch back and forth between gedit and axis (with the refresh button), but I'm interested in something even more tightly coupled that doesn't have any of the machine control parts.

Thanks,

metasim

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

More
17 Dec 2010 20:21 #6104 by psha
Replied by psha on topic Re:Linux equivalent to NCPlot
Take textview widget, Gremlin widget and place two buttons to save/load file
But you steel need running EMC -- backplot is created somewhere inside

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

  • Dan Falck
  • Dan Falck's Avatar
  • Visitor
  • Visitor
17 Dec 2010 22:01 #6107 by Dan Falck
Replied by Dan Falck on topic Re:Linux equivalent to NCPlot
You can probably work something out with the gedit plugins and gedit 'external tools'. I did this a couple years ago with the axis sim and python connecting it. Sorry, I lost a lot of that a couple computers ago, but there is something along the lines of Jeff Epler's jdi.py ('just do it') that lets you connect directly to axis with python.
Using that, you can have gedit (through some python scripting) open axis (if it's not already open), unconnect estop, turn on the machine, and start your program. I believe I had to do some trickery with the homing in the ini (make not worry about homing).
It is pretty sweet, once you do have it set up.
Here is how I started out:
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Usi...id_In_Creating_Gcode

If I get some time, I will see if I can recreate some of that.

Dan

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

More
17 Dec 2010 22:31 #6109 by metasim
Wow gents, that's good info; I'd perused the source but missed the "gremlin" directory.... I looks like the bits and pieces are all there to do what I want, just might require some refactoring if I wanted to keep it from depending on the emc/hal subsystem.

The underlying drive behind this is that I'd like to do the CAD/CAM part on MacOS as that's my day-to-day computer (the CNC computer is the standard EMC/Ubuntu disto). I'm part way through getting EMC to compile in simulator mode, just to get Axis running, but there's a bunch of Linux specific/non-POSIX calls and constants that require tweaking, so it's been a ongoing project. Knowing about gremlin helps focus on the bits that matter in this use case. The gedit plugin page is very helpful too.

Thanks for the help.

metasim

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

  • Dan Falck
  • Dan Falck's Avatar
  • Visitor
  • Visitor
17 Dec 2010 23:03 #6110 by Dan Falck
Replied by Dan Falck on topic Re:Linux equivalent to NCPlot
I was digging around on my backup drive and found this bit that shows what you can do with a linux box with axis/sim on it:

dan@dan-desktop:~/emc_trunk122408/scripts$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import emc
>>> s =emc.stat()
>>> s.poll()
>>> s.position
(0.19685039370078738, 0.1968503937007875, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
>>> s.origin
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)

so now you're hooked in to the stats on emc

>>> c=emc.command()
>>> c.state(emc.STATE_OFF)
>>> c.state(emc.STATE_ON)

now you can command it to do stuff
since I had axis open with it's standard 'axis.ngc' program (the one that show's 'EMC2 AXIS' on the screen), I was then able to get the machine running:

>>> c.mode(2)
>>> c.auto(emc.AUTO_RUN,1)

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

More
18 Dec 2010 00:01 #6114 by andypugh
metasim wrote:

The underlying drive behind this is that I'd like to do the CAD/CAM part on MacOS as that's my day-to-day computer


FWIW I have compiled HeeksCAD for MacOS. I haven't even tried it with Axis/EMC2.

I am currently passing my time developing hardware drivers for EMC2 using Xcode as my IDE, so you are not the only Mac fanboi in EMC land.

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

More
18 Dec 2010 17:11 #6141 by metasim
There was definitely some sheepishness in that confession of mine. :-) I probably have more years of Linux experience under my belt than MacOS, but with age one gets more enamored with the pampering of the likes of MacOS X. I rationalize it knowing I can always get a bash terminal. That still counts, right? :-)

One are that can be miserable is dealing with Python on MacOS X. The Apple provided default install is always behind and broken, yet getting it from macports invariably ends up in some compile error or PYTHONPATH inconsistency. It would be really nice to be able to get enough of EMC compiled to be able to run a script like Dan's, connecting remotely to the Linux EMC host.

metasim

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

Moderators: Dan FalckSkullworks
Time to create page: 0.130 seconds
Powered by Kunena Forum