MDI calls from qtvcp

More
3 years 6 months ago #269592 by cmorley
Replied by cmorley on topic MDI calls from qtvcp
Wait complete only tells the python program to stop running until the command is completed, it doesn't stop the machine controller. If there are commands after mdi that will stop the machine controller (like mode changes) and you don't use wait complete, then the first command will be cut short.

So again, do you need to switch the mode back to manual? Remember I have little idea what you are ultimately trying to do.

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

More
3 years 6 months ago #269676 by cmorley
Replied by cmorley on topic MDI calls from qtvcp
There may be another way.
If you can get the serial number of the command, then check status to see if the serial number has past, then that should get you the same as wait_compleye without blocking.

Looks like command has 'serial' and status has echo_serial. Some testing will be needed.

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

More
3 years 6 months ago #269691 by daiman444
Replied by daiman444 on topic MDI calls from qtvcp

Wait complete only tells the python program to stop running until the command is completed, it doesn't stop the machine controller. If there are commands after mdi that will stop the machine controller (like mode changes) and you don't use wait complete, then the first command will be cut short.

So again, do you need to switch the mode back to manual? Remember I have little idea what you are ultimately trying to do.

 
hi. I just want to get the G0X2000Y6000 command executed.
the method by which I call the execution of the command:
Code:
def mdi_commands (я, mdi):          полное_время = 10          self.cmd.mode(linuxcnc.MODE_MDI)          self.cmd.mdi(mdi)          self.cmd.wait_complete (complete_time)          self.cmd.mode(linuxcnc.MODE_MANUAL)
 

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

More
3 years 6 months ago #269719 by phillc54
Replied by phillc54 on topic MDI calls from qtvcp
You could try something like this:
Code:
ACTION.CALL_MDI('G0 X2000 Y6000') while not STATUS.is_interp_idle(): self.w.gcodegraphics.updateGL()     QApplication.processEvents()
The following user(s) said Thank You: daiman444

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

More
3 years 6 months ago #269737 by cmorley
Replied by cmorley on topic MDI calls from qtvcp

thank you for your responses. the actions from qtvcp are based on the actions of linuxcnc.py and inherit all of its problems and even multiply them in some cases. in view of which the actions from qtvcp do not simplify the task in any way.

the code that I need to execute is just "G0X2000Y6000" so that the portal goes to the end of the working field

You'll have to give specifics why the action library doesn't work for you. it is specifically made to make things easier, consistent and future proof.

Your code example does more then call an MDI code.ACTION.CALL_MDI('G0 X2000 Y6000')
should set linuxcnc into MDI mode if it is not and then run the command to the end without blocking.

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

More
3 years 6 months ago #269978 by daiman444
Replied by daiman444 on topic MDI calls from qtvcp

You could try something like this:
Code:
ACTION.CALL_MDI('G0 X2000 Y6000') while not STATUS.is_interp_idle(): self.w.gcodegraphics.updateGL()     QApplication.processEvents()
You are the best!

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

Moderators: cmorley
Time to create page: 0.080 seconds
Powered by Kunena Forum