read file from ngc

More
05 Jan 2022 00:18 #230813 by mb_cnc
read file from ngc was created by mb_cnc
Hello, is it possible to read data from an external file other than the ini file from an executing ngc? What I was wanting to do was read the tool change coordinates from the preferences file so I could change the tool change position without an ini mod and restart of LinuxCnc.
here is my current m6 remap file.

(m6basic v1)
o<m6basic> sub
o501 if[#<current_tool> NE #<_selected_tool>]
    M5
    G90 G0
    G53 Z#<_ini[CHANGE_POSITION]Z>
    G53 X#<_ini[CHANGE_POSITION]X> Y#<_ini[CHANGE_POSITION]Y>
    M6 T#<_selected_tool>
o501 endif
o<m6basic> endsub [1]
m2

SilverDragon, LinuxCNC buster

thanks

Please Log in or Create an account to join the conversation.

More
05 Jan 2022 06:01 #230830 by Henk
Replied by Henk on topic read file from ngc
I would use g30. New position can then be set by a move to that position, and g30.1

Please Log in or Create an account to join the conversation.

More
05 Jan 2022 06:17 #230835 by cmorley
Replied by cmorley on topic read file from ngc
you could also use a HAL pin in the remap, that is set by some other program.

Please Log in or Create an account to join the conversation.

Time to create page: 0.136 seconds
Powered by Kunena Forum