- Posts: 19306
- Thank you received: 0
Non-random ATC, gmoccapy & tool pockets numbers
6 years 7 months ago #162083
by andypugh
Replied by andypugh on topic Non-random ATC, gmoccapy & tool pockets numbers
I assume that #5190 is a variable you have added yourself in the persistent range?
Are you using a remap? Are you using the stdglue routines?
github.com/LinuxCNC/linuxcnc/blob/master...dglue/stdglue.py#L92
This line says a lot
That remap is the source of the non-global parameters. It is probably worth studying that in the context of the behaviour you want, and possibly adding a named parameter of your own. As it is Python any changes should take effect immediately.
Are you using a remap? Are you using the stdglue routines?
github.com/LinuxCNC/linuxcnc/blob/master...dglue/stdglue.py#L92
This line says a lot
Code:
self.params["current_pocket"] = self.current_pocket # this is probably nonsense
That remap is the source of the non-global parameters. It is probably worth studying that in the context of the behaviour you want, and possibly adding a named parameter of your own. As it is Python any changes should take effect immediately.
Please Log in to join the conversation.
6 years 7 months ago #162088
by GuiHue
Replied by GuiHue on topic Non-random ATC, gmoccapy & tool pockets numbers
Hi again,
yes, I am using an M6 remap.
I am also using stdglue routines in an older version from a previous probe_screen_v2 install. This may or may not include changes from an old version by Norbert (gmoccapy). I need to confirm this/ test the version you have linked.
The line you have referenced is all too well known to me. From my point of view, this applies to the following line self.params["selected_pocket"] = self.selected_pocket as well.
If I find the time I will investigate this, however, this is uncharted waters for me. Not sure where to start. My current understand is, that iocontrol handles this information somewhere in the background. To get this into a named parameter that is correct, I need to somehow use the change_prolog function to access the iocontrol.0.tool-prep-pocket and store it in an alternative variable. At this point I am already puzzled by the line:
self.params["tool_in_spindle"] = self.current_tool
since I am wondering how this information "current_tool" was put into "self" in the first place.
Looking at: linuxcnc.org/docs/2.7/html/hal/halmodule.html I assume that I would make use of the passthrough example and connect the pins in a hal file as follows
net somesignalname passthrough.in iocontrol.0.tool-prep-pocket
?
yes, I am using an M6 remap.
I am also using stdglue routines in an older version from a previous probe_screen_v2 install. This may or may not include changes from an old version by Norbert (gmoccapy). I need to confirm this/ test the version you have linked.
The line you have referenced is all too well known to me. From my point of view, this applies to the following line self.params["selected_pocket"] = self.selected_pocket as well.
That remap is the source of the non-global parameters. It is probably worth studying that in the context of the behaviour you want, and possibly adding a named parameter of your own. As it is Python any changes should take effect immediately.
If I find the time I will investigate this, however, this is uncharted waters for me. Not sure where to start. My current understand is, that iocontrol handles this information somewhere in the background. To get this into a named parameter that is correct, I need to somehow use the change_prolog function to access the iocontrol.0.tool-prep-pocket and store it in an alternative variable. At this point I am already puzzled by the line:
self.params["tool_in_spindle"] = self.current_tool
since I am wondering how this information "current_tool" was put into "self" in the first place.
Looking at: linuxcnc.org/docs/2.7/html/hal/halmodule.html I assume that I would make use of the passthrough example and connect the pins in a hal file as follows
net somesignalname passthrough.in iocontrol.0.tool-prep-pocket
?
Please Log in to join the conversation.
6 years 7 months ago #162092
by andypugh
Replied by andypugh on topic Non-random ATC, gmoccapy & tool pockets numbers
halmodule is no help here, that can only interface with HAL and can not alter or create G-code parameters.
I am not clear if you are using a T-remap or just an M6-remap.
There is some interesting code in the T-remap.
I think what you might want is to add something like this to change_prolog
Have you tried experimenting with iocontrol,v2 ?
I have never found the changes documented.
But:
linuxcnc.org/docs/2.7/html/config/ini-co....html#_emcio_section
EMCIO = iov2
is the magic incantation, I think.
I am not clear if you are using a T-remap or just an M6-remap.
There is some interesting code in the T-remap.
I think what you might want is to add something like this to change_prolog
Code:
(status, oldpocket) = self.find_tool_pocket(self.current_tool)
if status == INTERP_OK:
self.params["old_pocket"] = oldpocket
else:
self.params["old_pocket"] = -1
Have you tried experimenting with iocontrol,v2 ?
I have never found the changes documented.
But:
linuxcnc.org/docs/2.7/html/config/ini-co....html#_emcio_section
EMCIO = iov2
is the magic incantation, I think.
Please Log in to join the conversation.
6 years 7 months ago #162099
by GuiHue
Replied by GuiHue on topic Non-random ATC, gmoccapy & tool pockets numbers
Thanks again, I'll look into it.
It is an M6 Remap. - sorry, for me this was somehow totally obvious;).
I have found this:
wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolchangerProtocolProposal
It is an M6 Remap. - sorry, for me this was somehow totally obvious;).
I have found this:
wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolchangerProtocolProposal
Please Log in to join the conversation.
6 years 7 months ago #162175
by andypugh
Replied by andypugh on topic Non-random ATC, gmoccapy & tool pockets numbers
I think some of that might have gone in, but the developer who wrote that had a falling-out with other LinuxCNC devs and stopped working on LinuxCNC. It isn't clear how far through that work he got.
Please Log in to join the conversation.
6 years 6 months ago #162296
by GuiHue
Replied by GuiHue on topic Non-random ATC, gmoccapy & tool pockets numbers
Dear Andy,
I had a look at your ideas today:
1) Using an M66 to query the iocontrol.0.tool-prep-pocket using s32_2_float and motion.analog-in-00
This works very well and deals with both TxM6 in line or Tx M6 in separate lines. This will be the way forward to get the ATC going
2) stdglue as located in Master
Works fine without issues in my existing setup, doesn't change anything about the current_pocket and selected_pocket issues
3) Your sample lines of python
I managed to introduce them into the M6 part. The behavior of current_pocket remains the same.
4) EMCIO iov2
I have not tried this yet. Benefits and information appear to be limited. I might look into it in the future. For the time being, I am almost done with the M6 remap and am looking forward to a working rack change.
I had a look at your ideas today:
1) Using an M66 to query the iocontrol.0.tool-prep-pocket using s32_2_float and motion.analog-in-00
This works very well and deals with both TxM6 in line or Tx M6 in separate lines. This will be the way forward to get the ATC going
2) stdglue as located in Master
Works fine without issues in my existing setup, doesn't change anything about the current_pocket and selected_pocket issues
3) Your sample lines of python
I managed to introduce them into the M6 part. The behavior of current_pocket remains the same.
4) EMCIO iov2
I have not tried this yet. Benefits and information appear to be limited. I might look into it in the future. For the time being, I am almost done with the M6 remap and am looking forward to a working rack change.
Please Log in to join the conversation.
6 years 6 months ago #162301
by andypugh
It will, however <old_pocket> should now give you the information you want.
Replied by andypugh on topic Non-random ATC, gmoccapy & tool pockets numbers
GuiHue wrote: 3) Your sample lines of python
I managed to introduce them into the M6 part. The behavior of current_pocket remains the same.
It will, however <old_pocket> should now give you the information you want.
Please Log in to join the conversation.
6 years 6 months ago #163168
by GuiHue
Replied by GuiHue on topic Non-random ATC, gmoccapy & tool pockets numbers
I have managed to make to a workaround using a numbered variable to store the old pocket and obtain the new pocket using iocontrol.0.tool-prep-pocket and M66. I was unsure and not convinced if I can trust old_Pocket and have thus changed it for the little helper with the numbered variable. The finalized macro can be found here:
github.com/GuiHue/myfenjalinuxcnc/blob/c...cros/rack_change.ngc
It still has some quirks due to the specifics of my valve setup. Changes to T0 produce awkward results, but that is something I can take care of in due time. I am currently very happy, that it works and have completed the first jobs will full ATC. Thanks again for the advice.
A video of the whole thing in action can be found here:
(German language only at this time - sorry)
In other news: I come across rene-dev the other day in a different community and have tested his 2.8-pocket-fix branch which appears to be working and will hopefully be included in the 2.8 release.
github.com/GuiHue/myfenjalinuxcnc/blob/c...cros/rack_change.ngc
It still has some quirks due to the specifics of my valve setup. Changes to T0 produce awkward results, but that is something I can take care of in due time. I am currently very happy, that it works and have completed the first jobs will full ATC. Thanks again for the advice.
A video of the whole thing in action can be found here:
(German language only at this time - sorry)
In other news: I come across rene-dev the other day in a different community and have tested his 2.8-pocket-fix branch which appears to be working and will hopefully be included in the 2.8 release.
Please Log in to join the conversation.
2 years 11 months ago #285856
by CNC_ANDI
Replied by CNC_ANDI on topic Non-random ATC, gmoccapy & tool pockets numbers
Hallo, habe heute versucht deinen Rackchanger einzubauen bei mir.. leider bin ich daran gescheitert. Hast du vielleicht eine Anleitung welche Einträge und Dateien man alles dazu braucht?
Ich kenne mich mit Programmieren nicht wirklich aus.
Ich kenne mich mit Programmieren nicht wirklich aus.
Please Log in to join the conversation.
Time to create page: 0.062 seconds
