Setting machine mode back to manual in gcode/subroutine
- Mecanix
- Offline
- Platinum Member
Less
More
- Posts: 446
- Thank you received: 216
04 Jan 2024 20:15 #289807
by Mecanix
Setting machine mode back to manual in gcode/subroutine was created by Mecanix
Hi, I'm having my MPG disabled after running a subroutine, that sub is called from a self.c.mdi(command).
When the subroutine is completed, the keyboard's jog keys works fine however the MPG is disabled.
Only way to re enable the MPG is to hit a keyboard jog arrow.
Problem is I never use a keyboard to jog, MPG only.
Tried #<_hal(halui.mode.manual> = 1 among several other ways, but nothing works.
What's the voodoo?
When the subroutine is completed, the keyboard's jog keys works fine however the MPG is disabled.
Only way to re enable the MPG is to hit a keyboard jog arrow.
Problem is I never use a keyboard to jog, MPG only.
Tried #<_hal(halui.mode.manual> = 1 among several other ways, but nothing works.
What's the voodoo?
Please Log in or Create an account to join the conversation.
- Mecanix
- Offline
- Platinum Member
Less
More
- Posts: 446
- Thank you received: 216
04 Jan 2024 23:19 - 04 Jan 2024 23:26 #289814
by Mecanix
Replied by Mecanix on topic Setting machine mode back to manual in gcode/subroutine
[SOLVED]
Ofc it had to be voodoo'ed...
Ofc it had to be voodoo'ed...
def mdi_command(self, command, wait=True):
self.c.mode(linuxcnc.MODE_MDI)
self.c.wait_complete()
self.c.mdi(command)
if wait:
self.s.poll()
while (self.s.interp_state != linuxcnc.INTERP_IDLE):
time.sleep(.1)
self.s.poll()
self.c.mode(linuxcnc.MODE_MANUAL)
mdi_command(self, "O <mea_z_neg> call", wait=True)
Last edit: 04 Jan 2024 23:26 by Mecanix.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.124 seconds