changing modes

More
6 years 8 months ago #158686 by blazedforever
Replied by blazedforever on topic changing modes
not sure what files you want but heres the handler file and the error im getting when trying the above method found searching this forum

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

More
6 years 8 months ago #158697 by cmorley
Replied by cmorley on topic changing modes
Change this:
Code:
def on_mdi_command_finished(self, data=None): self.command.mode( linuxcnc.MODE_MANUAL ) self.command.wait_complete()

To This:
Code:
def on_mdi_command_finished(self, data=None): self.emc.set_manual_mode()

an alternative:
Code:
def on_mdi_command_finished(self, data=None): self.emc.emccommand.mode(self.emc.emc.MODE_MANUAL) self.emc.emccommand.wait_complete()
The code looks weird because gscreen has the reference to linuxcnc command a couple layers deep.
If you import linuxcnc in the handler file, you could use the more familiar coding.

Chris

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

More
6 years 8 months ago #158700 by cmorley
Replied by cmorley on topic changing modes
Also to facilitate faster help this info is helpful as a start:
What version of linuxcnc
What Screen or screen building toolkit you are using.
What you expected to happen
What actually happened.
An exact description of the error message.
the relevant config files - usually easiest to zip up all of them and post that - unless you are very sure where the error lies.
In this case the error message and the handler file was all the info that was needed,

gscreen takes some time to get the hang of and it is a little hard to follow where the answers are.
In the future QtVCP is an improvement.

Chris
The following user(s) said Thank You: blazedforever

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

More
6 years 8 months ago #158702 by cmorley
Replied by cmorley on topic changing modes
If you are wondering where I got this:
Code:
self.emc.set_manual_mode()

You can look here for other functions
github.com/LinuxCNC/linuxcnc/blob/2.7/sr...een/emc_interface.py

Chris
The following user(s) said Thank You: blazedforever

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

More
6 years 8 months ago #158716 by blazedforever
Replied by blazedforever on topic changing modes
Perfect dude, thanks! This will help alot.

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

Moderators: newbynobi, HansU
Time to create page: 0.206 seconds
Powered by Kunena Forum