How to detect M0 pause?

More
20 Nov 2024 13:57 #314910 by bladekel
I'm trying to create custom GUI by pyqt5.
Is it possible to detect if pause is caused by M0 ?
I catch the program-paused-changed signal and than control the current_line of gcode_display.
it works if the machine paused after a move.
but if the machine couldnt started to move, the current_line didnt show the M0 line....
G21
F1000
G61
G90
G0 X0 Y0 Z0
M0 ( couldnt detect here with gcode_display.current_line. because it told me that the line is 0 )
G0 X100
M0 ( I detected here because gcode_display.current_line gave me the correct line)

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

More
21 Nov 2024 08:04 - 21 Nov 2024 08:25 #314968 by Aciera
Replied by Aciera on topic How to detect M0 pause?
Just tested on master and it seems it fails to show the correct 'current_line = 5' during the first run right after starting the config. After that it works for me.
Not sure why it fails the first time though other than that ''current_line" does not seem to update before an actual move of axis has taken place.

[edit]
The other thing that seems like a bug is that 'mcodes' always contains 'M0'.

 
Attachments:
Last edit: 21 Nov 2024 08:25 by Aciera.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum