- Posts: 1029
- Thank you received: 286
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
IceBear wrote: HI!
Actually I solve this task (safe atc space) pretty simple. Idea is limit Z travel after < home Z> as (0 to -200).... for toolchange extend soflimits as (+150 to -200) and after toolchange swith it back to 0 -200.
You can see a red dash line (wich show softlimits ) extend and then back.
1. I use use atc-range as z home:
# ---setup home / limit switch signals---
net atc-range => joint.2.home-sw-in
net min-z => joint.2.neg-lim-sw-in
net max-z => joint.2.pos-lim-sw-in
2. I use MUX2 to manipulate soft limits:
loadrt mux2 names=z-limit-mux
addf z-limit-mux servo-thread
# switch z-axis soft limits
setp z-limit-mux.in0 [JOINT_2]MAX_LIMIT
setp z-limit-mux.in1 [JOINT_2]MAX_LIMIT_ATC
net z-limit-out <= z-limit-mux.out
# ini.2.max_limit is connectedd in custom_postgui.hal:
net z-limit-out => ini.2.max_limit
net z-limit-out => ini.z.max_limit
3. mux input accept commands from gcode:
net z-limit-select motion.digital-out-01 => z-limit-mux.sel
4. In gcode toolchange (substiyute m6) I use:
to extend z limit up to +150 needed for toolchange:
;
MOVE ATC
(unlock z-travel for ATC range. send true to z-limit-mux.sel--> z-limit-max is set to z-limit-maz-atc)
m64 p1
(debug,Extend z_max_limit = #<_hal[ini.2.max_limit]>)
to limit Z for normal safe operation after toolchange:
(lock z-travel again)
m65 p1
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.