Additional gcode trajectory drawing on gremlin

More
7 years 9 months ago #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 to join the conversation.

More
7 years 9 months ago #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 to join the conversation.

More
7 years 8 months ago #127066 by nkp
The second file can be loaded as follows:

in axis(.py)
Code:
........... ......... 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: .............. ............

Attachment not found

Please Log in to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum