Custom MDI-Command Button
19 Dec 2016 23:10 #84438
by Cobra
Custom MDI-Command Button was created by Cobra
Hi,
I have created a custom Panel with three buttons. I made it in glade and each button is calling a vcp_mdi_action.
The action for example is "G92 X0". I embedded this panel in gmoccapy and the commands works fine, but if i press one of my buttons the gui is changing to MDI mode. So I always must change back to manual control and that´s bad. What can I do, or how can I call a MDI command with custom button without mode change?!
Many Thanks,
Mark
I have created a custom Panel with three buttons. I made it in glade and each button is calling a vcp_mdi_action.
The action for example is "G92 X0". I embedded this panel in gmoccapy and the commands works fine, but if i press one of my buttons the gui is changing to MDI mode. So I always must change back to manual control and that´s bad. What can I do, or how can I call a MDI command with custom button without mode change?!
Many Thanks,
Mark
Please Log in or Create an account to join the conversation.
21 Dec 2016 18:00 #84508
by newbynobi
Replied by newbynobi on topic Custom MDI-Command Button
As the command only can be emmited in MDI mode, you will not be able to avoid that mode change in gmoccapy. I builded gmoccapy to listen to mode changes and that is why the GUI changes.
Why you are using a custom panel for G92 and not the macro button?
Or use the touch off part in the manual mode and edit that value.
If you still want to realize "not changing the GUI layout"
See the code in gmoccapy.py
on_hal_status_mode_mdi
I use there self.tool_change to avoid that change on a tool change.
You could use a python script to set this variable to True before executing your command and after the command set it again to False.
I have not done that, so you will have to find the solution and report how you did it![;-) ;-)](/media/kunena/emoticons/wink.png)
Norbert
Why you are using a custom panel for G92 and not the macro button?
Or use the touch off part in the manual mode and edit that value.
If you still want to realize "not changing the GUI layout"
See the code in gmoccapy.py
on_hal_status_mode_mdi
I use there self.tool_change to avoid that change on a tool change.
You could use a python script to set this variable to True before executing your command and after the command set it again to False.
I have not done that, so you will have to find the solution and report how you did it
![;-) ;-)](/media/kunena/emoticons/wink.png)
Norbert
Please Log in or Create an account to join the conversation.
Time to create page: 0.060 seconds