Sienci-Labs / gsender

Connect to and control Grbl-based CNCs with ease
https://sienci.com/gsender/
Other
178 stars 41 forks source link

Workspace changing to P1 after job completion #494

Closed BaysideCustomTC closed 5 months ago

BaysideCustomTC commented 5 months ago

I sometimes run jobs in separate workspaces, each with their own XYZ0 origins.

After running a job in a workspace other than G54 (P1) e.g. G58 (P5), the workspace is set back to P1. If not noticed / corrected, then unwanted results can occur. For example, after completing a job I often move the spindle back to XY0 / Z39 as I know that to be a safe space. Obviously in P1's workspace that may not be a safe space for P5, causing collisions with clamps or other pieces of material.

I would expect that the workspace remains as P5, rather than being changed back to P1.

Please note that this is not a 1.4.4 specific behaviour - it operates the same in v1.1.7 and earlier.

G58 before G54 after

hamanjam commented 5 months ago

This is expected behavior. The end of your file most likely has an M2 command. See this link:

https://resources.sienci.com/view/gs-feedback/#workspace-is-changing-when-a-job-is-run

BaysideCustomTC commented 5 months ago

It does indeed have an M2 command, as I would have expected. I amended the Program Start & Program Stop Events per the article linked and the behaviour is now as I would like. Thanks @hamanjam