winder / Universal-G-Code-Sender

A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.
http://winder.github.io/ugs_website/
GNU General Public License v3.0
1.89k stars 764 forks source link

Run From..... often not available #2121

Open marshr32 opened 1 year ago

marshr32 commented 1 year ago

Version

2.0.12

Hardware / Firmware

GRBL 1.1

What happened

I've had a couple of jobs stop 30000 odd lines into a 40000 line job and needed to use "run from..." to restart the job where it left off, but it's very often greyed out. Only shutting down UGS and reopening would give me the option to use it. This is not ideal as it means rehoming etc and the possibility of doing something wrong and losing machine position to continue successfully.

When should the option be available?

Note this is in 2.0.12 and I haven't tried 2.0.13 or the nightly yet.

How to reproduce

No response

Operating System

No response

Anything else

No response

breiler commented 1 year ago

Just to make sure. You mean the "Run from..." from the menu bar and not from the editor right?

This action from the menu bar has some logic that checks if the machine is connected and that there is a gcode file loaded:

image

This action in the editor does not contain such logic:

image
marshr32 commented 1 year ago

Yeah the one in the menu, I didn't realise there's one in the editor so that's good to know for the future.

There was a file loaded and the machine connected as it was just cutting that file when it stopped, but the run from command was greyed out after the soft reset (possibly also before, I didn't look)

marshr32 commented 1 year ago

How is the Run From... command meant to work? I've highlighted a line in the editor and right clicked, then selected run from, but nothing happens. If I press play at this point it starts the code from the beginning. Run From.... in the top menu is greyed out again despite having just run part of this program. This is using 2.0.13

What am I doing wrong?

breiler commented 1 year ago

This is how it is supposed to work: Run from

I have just booted up my Win10 machine and tried this with both v2.0.12 and v2.0.13 and it works as expected. The menu is never greyed out. Do you mind sharing one of your files so that I can test with them.

marshr32 commented 1 year ago

So after right clicking and selecting run from I should be able to push play and it'll run from that point?

I noticed that if I loaded another file then reloaded the one I wanted that the menu option wasn't greyed out anymore. By that time I'd already edited the .nc file manually to get things done so I didn't try to actually run from any point again.

Is there a way to bring up line numbers in the editor? That way I probably could have used the menu Run From but I had no idea what line number to start from. EDIT: Just realised your example above has line numbers, mine doesn't seem to, see pic

I've attached the file I was running today, but had to rename to a .txt so hopefully it'll still work for ya. I wanted to run the last (surface) operation only. 148mm wide Front block.txt Clipboard01

breiler commented 1 year ago

So after right clicking and selecting run from I should be able to push play and it'll run from that point?

Yes, that should work

Regarding the action getting greyed out, I can't reproduce it. But it must be some event that is not getting dispatched properly. It requires some investigation.

Is there a way to bring up line numbers in the editor?

They should have been enabled by default, but I guess there is a difference between OS:es. It is odd that you didn't get the toolbar either... Well you can right click the gray area left of the gcode and choose "Show line numbers".

2023-01-16 09-50-19 2023-01-16 09_54_01

marshr32 commented 1 year ago

Awesome, the line numbers are now showing...... thank you :)

If there is any testing I can help with please let me know.

marshr32 commented 1 year ago

OK, I've found one dumb thing I was doing wrong.

In the editor the line you want to start at needs to be left clicked to highlight it before right click>run from I was just right clicking on the line which I guess is why it started from the start of the program, duh!