- Posts: 238
- Thank you received: 0
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
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 to join the conversation.
and from the change.ngc
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in 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 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 to join the conversation.
Please Log in to join the conversation.
says Pin 'ini.1.min_limit' does not exist
Ref (master branch):
linuxcnc.org/docs/master/html/man/man1/milltask.1.html
Note also:
Please Log in to join the conversation.
Thank you!
Please Log in 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 to join the conversation.
