Display Max/Min XYZ via custom.xml

More
20 Jan 2016 02:05 #68790 by wl888
wl888 created the topic: Display Max/Min XYZ via custom.xml
Hi All
Is there a way/variable that i can use to display the Max/Min of XYZ from a loaded Gcode file??

Thanks
Doug :)
More
20 Jan 2016 06:01 - 20 Jan 2016 06:06 #68799 by Rick G
Rick G replied the topic: Display Max/Min XYZ via custom.xml
As a side note.
The Axis display shows the min and max of the program and defaults to relative position.
You can select machine position from the view tab to see the min max machine position.

Rick G
Last Edit: 20 Jan 2016 06:06 by Rick G.
More
20 Jan 2016 14:13 #68818 by fupeama
fupeama replied the topic: Display Max/Min XYZ via custom.xml
hi
here is my solution in .axisrc (in my homedir)
if hal_present: 
    mycomp = hal.component("boundaries") 
    mycomp.newpin("max_lim_x",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("min_lim_x",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("mid_lim_x",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("max_lim_y",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("min_lim_y",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("mid_lim_y",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("max_lim_z",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("min_lim_z",hal.HAL_FLOAT,hal.HAL_OUT) 
    mycomp.newpin("mid_lim_z",hal.HAL_FLOAT,hal.HAL_OUT) 
  
    mycomp.ready() 
if vars.metric.get(): 
    conv = 1 
else: 
    conv = 1/25.4 
  
  
# this function is called at [DISPLAY]CYCLE_TIME interval 
def user_live_update(): 
    min_extents = from_internal_units(o.canon.min_extents, conv) 
    max_extents = from_internal_units(o.canon.max_extents, conv) 
    mycomp['min_lim_x'] = min_extents[0] 
    mycomp['max_lim_x'] = max_extents[0] 
    mycomp['mid_lim_x'] =  min_extents[0] + (max_extents[0] - min_extents[0])/2 
    mycomp['min_lim_y'] = min_extents[1] 
    mycomp['max_lim_y'] = max_extents[1] 
    mycomp['mid_lim_y'] = min_extents[1]+ (max_extents[1] - min_extents[1])/2 
    mycomp['min_lim_z'] = min_extents[2] 
    mycomp['max_lim_z'] = max_extents[2] 
    mycomp['mid_lim_z'] =  min_extents[2]+ (max_extents[2] - min_extents[2])/2 




this code create new pin BOUDARIES and you can use it in pyvcp or glade.
I have problem with remap m6 code. Boudaries are calculated with path to tool change and i dont know haw to discard remap code from calculation.

Martin
Attachments:
More
20 Jan 2016 21:41 #68849 by wl888
wl888 replied the topic: Display Max/Min XYZ via custom.xml
Thanks Guys for the quick reply.
I will look into both methods and see what i can achieve.
Doug :cheer:
More
21 Jan 2016 03:01 #68863 by wl888
wl888 replied the topic: Display Max/Min XYZ via custom.xml
Yep...Now that I opened my eyes I see the job overalls are already on the screen
Thats the way I'll go with display
Thanks :woohoo:
Time to create page: 0.114 seconds
Powered by Kunena Forum