error trying to call emccanon.SELECT_POCKET()

More
02 Jan 2021 19:47 - 02 Jan 2021 23:49 #193881 by jhandel
Howdy all,
Working on my custom T behaviours (ATCs are fun!)... I am basing my work off of the samples in the remap documentation (www.linuxcnc.org/docs/html/remap/remap.html). But when I get to the prepare_epilog line emccanon.SELECT_POCKET(selected_tool) I get the following error:
'module' object has no attribute 'SELECT_POCKET'

I have looked for something that looks wrong but it seems inline with the sample..

I have also double checked the method list for emccanon via print(dir(emccanon)) and SELECT_POCKET is NOT the method list..

I am running 2.8.1, is this something that has changed and the docs are just out of date?

Thanks
Last edit: 02 Jan 2021 23:49 by jhandel.

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

More
02 Jan 2021 23:52 - 02 Jan 2021 23:54 #193902 by jhandel
For others, looks like maybe SELECT_POCKET() is no longer valid and it is now SELECT_TOOL(), also, looks like now the pocket is never sent into the command, just the selected tool.. Though the comments in the code aren't super clear about that
From 
linuxcnc/src/emc/nml_intf/canon.hh 

For machines which can carry out a select_tool command separately from
a change_tool command, the select_tool command must have been given
before the change_tool command, and the value of slot must be the slot
number of the selected tool.

extern void SELECT_TOOL(int tool);

And if I look at the actual example stdglu.py file the line is
emccanon.SELECT_TOOL(self.selected_tool)

so the comment suggests I should pass the slot in, but then calls the parameter "tool" and then the example shows the tool being passed in not the slot/pocket
Last edit: 02 Jan 2021 23:54 by jhandel.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum