Additional gcode trajectory drawing on gremlin

More
29 Jan 2019 23:35 #125228 by Nico2017
Hi,
I was wondering if it was possible to display a Gcode trajectory on gremlin without actually loading it.
Ideally I have a gcode file achieving a trajectory but I would like to visualize at the same time another gcode file on the same gremlin window, to be able to do a live comparison while using the machine. For instance I would like to know if my current trajectory is inside or outside another one done previously on a different file, while I am using the machine.

Was thinking to either:
  • include the trajectory on a subroutine file called by my gcode, but I want to make sure that the additional trajectory is actually not going to be executed, so I could actually add a if condition which is going to change to False while my main code is working
  • add a background image loaded in gremlin but not sure if it is possible and this may imply a lot of work to set up correctly the positioning
  • somehow in glade VCP having two gremlin instance either overlaying or side by side, and synchronized. However I am wondering which file is going to be run when I am using the .gremlin.load(".../nc_files/*.ngc")

Any idea or comment would be appreciated.

Thank you,

Nicolas

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

More
30 Jan 2019 01:15 #125237 by andypugh
It seems that it should be possible. The "stand alone interpreter" might be one part of the puzzle, as I think that Gremlin only accepts canonical commands.

github.com/LinuxCNC/linuxcnc/tree/master/src/emc/sai

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

More
24 Feb 2019 20:05 - 24 Feb 2019 20:06 #127066 by nkp
The second file can be loaded as follows:

in axis(.py)
...........
.........
        else:
		unitcode = ''
        try:
            result, seq = o.load_preview(f, canon, unitcode, initcode, interpname)
        except KeyboardInterrupt:
            result, seq = 0, 0
            
        try:
            f1 = "/home/nkp/linuxcnc-HBM/build/nc_files/cds.ngc"  #XXX nkp 
            result, seq = o.load_preview(f1, canon, unitcode, initcode, interpname) #XXX nkp
        except KeyboardInterrupt:
            pass
                        
        # According to the documentation, MIN_ERROR is the largest value that is
        # not an error.  Crazy though that sounds...
        if result > gcode.MIN_ERROR:
..............
............
Attachments:
Last edit: 24 Feb 2019 20:06 by nkp.
The following user(s) said Thank You: Nico2017

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

Moderators: mhaberler
Time to create page: 0.128 seconds
Powered by Kunena Forum