Using Standard Glue for remapping the S command
05 Apr 2021 14:54 #204905
by mwinterm
Using Standard Glue for remapping the S command was created by mwinterm
Hello,
The Mirkon WF41C I'm retrofitting has a mechanical gear-box providing 22 different gear ratios. This gear-box is controlled by 3 little motors.
I now try to remap the S-command to select the right gear-ratio based and the required spindle speed. In this context I tried to use Standard Glue which conveniently provides the functions:I'm invoking the remap with the following commandUnfortunately this is not working causing the following error:If I leave the prolog out by definingI get no error.
I'm using LinuxCNC 2.8.1
Any help appreciated!
Best regards,
Marc
The Mirkon WF41C I'm retrofitting has a mechanical gear-box providing 22 different gear ratios. This gear-box is controlled by 3 little motors.
I now try to remap the S-command to select the right gear-ratio based and the required spindle speed. In this context I tried to use Standard Glue which conveniently provides the functions:
setspeed_prolog
setspeed_epilog
REMAP=S prolog=setspeed_prolog python=setspeed epilog=setspeed_epilog
PythonPlugin: Python '2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0]'
is_callable(remap.setspeed) = TRUE
is_callable(remap.g886) = TRUE
is_callable(__init__) = FALSE
is_callable(oword.setspeed) = FALSE
call(remap.setspeed_prolog):
KeyError: ('setspeed_prolog',)
REMAP=S python=setspeed epilog=setspeed_epilog
I'm using LinuxCNC 2.8.1
Any help appreciated!
Best regards,
Marc
Please Log in or Create an account to join the conversation.
05 Apr 2021 15:08 #204906
by andypugh
Sounds a little like you don't have the right setup in toplevel.py and remap.py
Or, that the import of standardglue has found a version without a "setspeed_prolog" definition.
This one has no setspeed_prolog github.com/LinuxCNC/linuxcnc/blob/master...py/python/stdglue.py
This one does: github.com/LinuxCNC/linuxcnc/blob/master...n-stdglue/stdglue.py
Are you using Gmoccapy?
Replied by andypugh on topic Using Standard Glue for remapping the S command
call(remap.setspeed_prolog):
KeyError: ('setspeed_prolog',)
Sounds a little like you don't have the right setup in toplevel.py and remap.py
Or, that the import of standardglue has found a version without a "setspeed_prolog" definition.
This one has no setspeed_prolog github.com/LinuxCNC/linuxcnc/blob/master...py/python/stdglue.py
This one does: github.com/LinuxCNC/linuxcnc/blob/master...n-stdglue/stdglue.py
Are you using Gmoccapy?
Please Log in or Create an account to join the conversation.
05 Apr 2021 15:29 #204909
by mwinterm
Replied by mwinterm on topic Using Standard Glue for remapping the S command
Hello Andy,
the version in my installation underhas it. Would also be strange that the setspeed_prolog is missing while the setspeed_epilog there and running as in my case.
My toplevel.py only consists ofNot sure what there could be missing or wrong.
Best regards,
Marc
the version in my installation under
/usr/share/linuxcnc/ncfiles/remap_lib
My toplevel.py only consists of
import oword
import remap
Best regards,
Marc
Please Log in or Create an account to join the conversation.
05 Apr 2021 19:31 #204941
by bevins
Invoking 3 python scripts in a row doesn't work in a remap. So your best bet is putting the functions you need in epilog in your python script setspeed. I did the same thing with my Biesse router and this is the only way I could get it to work in a python remap.
check my remap here: Python remap M6
I dont know what the difference would be for remapping S vice remapping M6 but to save your sanity, dont try to run 3 python scripts in a remap. I have tried and tried and the guy who wrote the remap code admitted it.
Just my 2 cents
Replied by bevins on topic Using Standard Glue for remapping the S command
Hello Andy,
the version in my installation underhas it. Would also be strange that the setspeed_prolog is missing while the setspeed_epilog there and running as in my case./usr/share/linuxcnc/ncfiles/remap_lib
My toplevel.py only consists ofNot sure what there could be missing or wrong.import oword import remap
Best regards,
Marc
Invoking 3 python scripts in a row doesn't work in a remap. So your best bet is putting the functions you need in epilog in your python script setspeed. I did the same thing with my Biesse router and this is the only way I could get it to work in a python remap.
check my remap here: Python remap M6
I dont know what the difference would be for remapping S vice remapping M6 but to save your sanity, dont try to run 3 python scripts in a remap. I have tried and tried and the guy who wrote the remap code admitted it.
Just my 2 cents
Please Log in or Create an account to join the conversation.
24 Aug 2023 12:19 - 24 Aug 2023 13:37 #278853
by zmicq
Replied by zmicq on topic Using Standard Glue for remapping the S command
Did you manage to get the gearchange working? Would you mind posting your python script for it? I got my hands on a WF3 DCM and would very much like to retrofit the right way... I saw your github but I do not understand where I can find the gearbox positions in relevance to set spindle speed. Do you have the map of reduction ratios of gears? Or the speed ranges? Thank you
Last edit: 24 Aug 2023 13:37 by zmicq.
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds