- Configuring LinuxCNC
- Advanced Configuration
- Limit an Axis or part of Machine travel to specific tasks possible?
Limit an Axis or part of Machine travel to specific tasks possible?
first of all, sorry if my english is not great, also it is very late now and i am tired. Also i havent found similar posts.
i may want to build a cnc machine with an atc at a specific place (on the far left side in X) but i want to limit a part of the x travel so i cannot accidently jog the machine to that position or if i run a program it will stop on the edge to that part of the travel because there may be a door in the way it should work like the toolchanger of a Hermle c600, but just on the left side (just need to limit one axis). Watch the example here:
for short: must not manually jog to that part of X travel, nor run gcode to that part. Only if a toolchange is commanded
thanks for any help
Please Log in or Create an account to join the conversation.
net enable-toolchange-area <= motion.digital-out-10
loadrt mux2 names=ymax-mux
addf ymax-mux servo-thread
setp ymax-mux.in0 [AXIS_1]MAX_LIMIT
setp ymax-mux.in1 [AXIS_1]MAX_LIMIT_TOOLCHANGE ; extended area
net enable-toolchange-area => ymax-mux.sel
net y-limit-max ymax-mux.out => ini.1.max_limit
and from the change.ngc
M64 P10 ; enable off-limits movement
; move the spindle to the tool change area
; ...
; move out
M65 P10 ; restore the original soft limit
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.
probably there's a better way, but i did that by modifying the soft-limit in tool change routine:
net enable-toolchange-area <= motion.digital-out-10
loadrt mux2 names=ymax-mux
addf ymax-mux servo-thread
setp ymax-mux.in0 [AXIS_1]MAX_LIMIT
setp ymax-mux.in1 [AXIS_1]MAX_LIMIT_TOOLCHANGE ; extended area
net enable-toolchange-area => ymax-mux.sel
net y-limit-max ymax-mux.out => ini.1.max_limit
and from the change.ngc
M64 P10 ; enable off-limits movement
; move the spindle to the tool change area
; ...
; move out
M65 P10 ; restore the original soft limit
i tried it now, added the extended area to the ini and changed everything to "x min" but linuxcnc says Pin 'ini.1.min_limit' does not exist. i also changed ini.1.min_limit to ini.0.min_limit in case thats the axis but its the same
Please Log in or Create an account to join the conversation.
$ halcmd show pin ini.0 | grep limit
16 float IN 370.1 ini.0.max_limit
16 float IN -0.1 ini.0.min_limit
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
says Pin 'ini.1.min_limit' does not exist
$ man milltask
...
The inihal pins cannot be linked or set in a
halfile that is specified by an inifile [HAL]HALFILE
item because they are not created until milltask is
started. The inihal pin values can be altered by
independent halcmd programs specified by
[APPLICATION]APP items or by GUIs that support a
[HAL]POSTGUI_HALFILE.
Ref (master branch):
linuxcnc.org/docs/master/html/man/man1/milltask.1.html
Note also:
The inihal pins are sampled in every task cycle,
however, commands affected by their values typically
use the value present at the time when the command is
processed. Such commands include all codes handled by
the interpreter (Gcode programs and MDI commands) and
NML jogging commands issued by a GUI (including
halui).
Please Log in or Create an account to join the conversation.
Thank you!
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m100-m199
(I am not sure how to read INI values in bash, so you could either hard-code in the scripts or pass parameters from G-code.
Lots of possible ways are shown here: stackoverflow.com/questions/6318809/how-...ithin-a-shell-script )
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- Limit an Axis or part of Machine travel to specific tasks possible?