Problem with [RS274NGC] REMAP block

More
01 Jan 2013 23:19 - 01 Jan 2013 23:27 #28259 by ArcEye
I don't have 1st hand experience of M6 remapping, because I wrote a toolchange component which does everything I need, in a way which is far more familiar to me, in C.
The only difference is that this interacts directly with the underlying linuxcnc system rather than indirectly through python bindings and gcode.

It may not be necessary to remap T.
The tool number is passed as a public variable, along with all the other values associated with an iocontrol managed toolchange.

The standard prologs epilogs found in configs/sim/remap/python-stdglue/remap.py pass a few exposed parameters to the remap procedure.

An exposed parameter is a named local variable visible in a remap procedure which corresponds to interpreter-internal variable which is relevant for the current remap. Exposed parameters are set up in the respective prolog, and inspected in the epilog. They can be changed in the remap procedure and the change will be picked up in the epilog. The exposed parameters for remappable builtin codes are:

T (prepare_prolog): #<tool> , #<pocket>

M6 (change_prolog): #<tool_in_spindle>, #<selected_tool>, #<current_pocket>, #<selected_pocket>

M61 (settool_prolog): #<tool> , #<pocket>

S (setspeed_prolog): #<speed>

F (setfeed_prolog): #<feed>

If you have specific needs for extra parameters to be made visible, that can simply be added to the prolog - practically all of the interpreter internals are visible to Python.


However it probably does mean that you cannot remap M6 without doing the python interfacing which enables you to use the public variables

see linuxcnc.org/docs/devel/html/remap/struc...re_o_word_procedures re exposed variables

and linuxcnc.org/docs/devel/html/remap/struc..._prepare_replacement re remapping T


regards
Last edit: 01 Jan 2013 23:27 by ArcEye.

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

More
02 Jan 2013 07:22 - 02 Jan 2013 07:24 #28292 by cncbasher

No, i want completely remap Tx code:

[RS274NGC]
REMAP=T ngc=mytoolchange

So, when i execute in MDI mode "T3" or "T7"
i can have tool-number (3 or 7 or whatever else) in my subprogram:


o<mytoolchange> sub

M5 (stop spindle)
T[name of variable?]
...
... (physical process of tool changing)
...
M6

o<mytoolchange> endsub
M2


am I not understanding the question here if so forgive me , .... issuing a M6 T4 OR M6 T2 is how a toolchange sequence is done (Tx is the tool number) , M6 being toolchange
this is a basic Fanuc style coding .

with Arceye's toolchanger comp , this works fine with 2.5.1 .

why the need for remapping ? , are other sequences involved or needed functions we are not aware of .


or is this because the toolchanger component will require reworking for Development version and therefore no options etc ..
Last edit: 02 Jan 2013 07:24 by cncbasher.

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

More
02 Jan 2013 18:42 #28298 by machete
This is description of my ATC system:
www.linuxcnc.org/index.php/english/forum...assic-ladder-for-atc

As I understand, Classic Ladder can't move axis (for example by acting HAL pins), so my program of tool changing is NGC, and between G0 codes, I have calls of Classic Ladder sequences.

Now I successfully remapped M6, so I can change tools by executing "T5 M6".

But on my big lathe under control of Siemens Sinumerik 802D tool changing is performing by only "T5",
so i want the same on my mill, either I am confused with this digits and can mix up them (T6 M5).

If I remap Tx, I'll be able to execute both "T5" and "T5 M6", because in my remapped NGC is M6 execution, so when i will execute "T5 M6", code M6 will executed twise (it's OK).

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

More
04 Jan 2013 00:18 #28347 by andypugh

If I remap Tx, I'll be able to execute both "T5" and "T5 M6", because in my remapped NGC is M6 execution, so when i will execute "T5 M6", code M6 will executed twise (it's OK).


Tool changing on the T-word rather than M6 may make sense with a lathe, but does have some disadvantages with milling machines.
It is quite common to call the next tool directly after a toolchange so that the toolchanger carousel is pre-set with the required tool, significantly shortening the cycle time.

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

Time to create page: 0.245 seconds
Powered by Kunena Forum