Display Max/Min XYZ via custom.xml

More
10 years 9 months ago #68790 by wl888
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 :)

Please Log in to join the conversation.

More
10 years 9 months ago #68799 by Rick G
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

Please Log in to join the conversation.

More
10 years 9 months ago #68818 by fupeama
hi
here is my solution in .axisrc (in my homedir)
Code:
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

Attachment not found




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

Please Log in to join the conversation.

More
10 years 9 months ago #68849 by wl888
Thanks Guys for the quick reply.
I will look into both methods and see what i can achieve.
Doug :cheer:

Please Log in to join the conversation.

More
10 years 9 months ago #68863 by wl888
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:

Please Log in to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum