- Posts: 1943
- Thank you received: 0
issues with iocontol and M6 remap in python
Since the tool-change pin and tool-changed pin never gets asserted, I can never apply the offsets because the tool number never gets set. the tool change happens, and I send G43 but it does not get set on the selected tool.
I am having a hard time trying to track down why iocontrol is not asserting the change-tool pin.
Any ideas?
relevant hal lines:
epilog snippet
Please Log in to join the conversation.
Please Log in to join the conversation.
Remap pure python is broken again. The interpreter is ignoring emccannon commands.
I have nothing in the remap, no Q-busters nothing, and it wont run the epilog.
ini entry:
M6 Remap:
This is showing that meets the if criteria for epilog
Attachment not found
Please Log in to join the conversation.
remap Mcodes for existing python functions, subs and see if this doesnt work better.
Please Log in to join the conversation.
so G43 Hx
as yoiu know the toolnumber x = toolnumber to be set
Please Log in to join the conversation.
pl7i92 wrote: Yoiu better send the Full comands as you are interfearing
so G43 Hx
as yoiu know the toolnumber x = toolnumber to be set
it needs the toolnumber to be able to set G43. Its not getting the tool number out of the remap. iocontrol is not getting the nml message to set to change.
Please Log in to join the conversation.
Documentation seems sparse-to-missing
linuxcnc.org/docs/2.7/html/config/ini-co....html#_emcio_section
But here is a sample INI file with some comments:
github.com/LinuxCNC/linuxcnc/blob/0f91c5...ntrolv2-demo.ini#L65
Please Log in to join the conversation.
andypugh wrote: Have you tried iocontrolV2?
Documentation seems sparse-to-missing
linuxcnc.org/docs/2.7/html/config/ini-co....html#_emcio_section
But here is a sample INI file with some comments:
github.com/LinuxCNC/linuxcnc/blob/0f91c5...ntrolv2-demo.ini#L65
I looked at it and thought about it but I dont understand the way it works. The docs didnt help much in the way the internals work so I didnt try it.
I am pretty sure it is the interpreter ignoring commands issue. I am trying to get in touch with Michael H at machinekit but no luck yet.
My code is at github.com/bobbevins/Linuxcnc_python_remap_M6 . There is alot of work went into the implementation of this machine. Its getting frustrating, lol, I had thoughts of trying it in oword, but I'm not brave enough yet......
Please Log in to join the conversation.
self.set_tool_parameters() or self.toolchange_flag = True.
EDIT: I am basing the fact that the interpreter is ignoring the command because when I send emccannon.CHANGE_TOOL, task is suppose to send an NML message to iocontrol and iocontrol.o.tool.change get set to true. thats not happening also when I send tool-change_flag = true, that should tell iocontrol and iocontrol.0.tool.changed happens, which is suppose to send message back and then the offsets get set depending on the selected pocket. emccannon.CHANGE_TOOL gets sent with "selected_pocket" parameter.
None of this is happening, I dont know wether I should loop the iocontrol or not in this case. /EDIT
So I think something is broken.
If I yield throughout the toolchange, then the interpreter starts ignoring commands and things get haywire.
So I am deadlocked.
Please Log in to join the conversation.
github.com/LinuxCNC/linuxcnc/blob/master...sk/ioControl.cc#L825
And it looks like CHANGE_TOOL should do that:
github.com/LinuxCNC/linuxcnc/blob/master...sk/emccanon.cc#L1984
As it does create a EMC_TOOL_LOAD_TYPE
There is a rtapi_print_msg(RTAPI_MSG_DBG in the iocontrol code, it would be useful to know if the code is being called. Unforunately the messageing level here is _not_ set from the INI file. You might even need a HAL component to call linuxcnc.org/docs/2.7/html/man/man3/rtap...sg_level.3rtapi.html
(It used to be possible to set a value in /proc/ but I don't think that works any more.)
However, looking at your code I see
Maybe change that to
Please Log in to join the conversation.
