Non-random ATC, gmoccapy & tool pockets numbers
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 :-/
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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
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
(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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
Ich kenne mich mit Programmieren nicht wirklich aus.
Please Log in or Create an account to join the conversation.