vlachoudis / bCNC

GRBL CNC command sender, autoleveler and g-code editor
GNU General Public License v2.0
1.55k stars 530 forks source link

Start from selected block/line or disable processed blocks #805

Open Guenni75 opened 6 years ago

Guenni75 commented 6 years ago

Hi. At large jobs, i have to make it at 2 or more days. When i stop the job, i have to search the last finished block .

It would be great, if there where an option, to disable a block, when it is finished. in this case, i only have to check, if it is not only send and i can save it for the next day.

ghost commented 6 years ago

Hallo, what is about unfinished blocks? How you stop the job ? With Pause or Stop ? In principle its possible - so we need a job management. The Problem what I see is: Header -> large Block1 -> large Block2 -> Footer Its only possible if every block run like: header->block1 header->block2 So you need for this a pause after every block, because there maybe commands in the previous block you need.

Harvie commented 6 years ago

I think we might use some feature called "start from selected block/line"

Guenni75 commented 5 years ago

I can start the Job at every Block, if i enable the Header. I never had Problems with that. I don`t need commands from the previous Block.

It would be enough to disable a block after complete processing. The Header must be enabled.

Harvie commented 5 years ago

@Guenni75 This is not really a good idea. Imagine what will happen if you want to cut the same part again... You will need to reenable all the blocks, but some of them were "construction blocks" that were never meant as actual toolpaths. So you will have to think it through again to enable only the right blocks.

That's the reason why i don't think we should reuse the enable/disable block functionality for this.

Guenni75 commented 5 years ago

@Harvie in the moment, this is the only feature i miss in bcnc. I never had "construction" blocks or something like this. With the code from Vectric Aspire, you can start at every block if the header is enabled!

If i want to cut the same part again, i enable this Block. Where is the problem?? I select the graphic and press enable! This would not be the first time i do that. I dont know if we are talking about the same thing! Disabling processed blocks (grayed out in the editor)! NOT Deleting them!

I often do 3D Jobs and i can not make this things in a single day. So i have to stop it (after some hours), then disable one block after another, till i think i find the last finished block. At 3D milling a single part could be thousands of Blocks. If you have to Stop between them, you need a long time to find the right (finished) one. Often i just can guess the right one!

For me, this would be the best feature of bcnc EVER!!!! But the Header must be enabled ;)

Harvie commented 5 years ago

@Guenni75

I never had "construction" blocks or something like this.

That's because you don't generate the code using bCNC, but rather use external CAM. That's no problem, but we can't break workflows of people (like me :-) using internal CAM.

But don't worry. We can certainly implement feature to resume operation. I think it's really useful idea!

Guenni75 commented 5 years ago

Great!

Harvie commented 5 years ago

@Guenni75 So you want to use STOP button, then save the ngc file, open it another day and hit RESUME, right? I think we can just add some bookmark which will indicate last cut block and last cut line. Then we should add buttons to start g-code from selected line/block. And we should add resume button, which will start from the saved bookmark.

At least that's approach which would feel reasonable to me.

But there's one catch. I would really like to get this working in machine failure conditions. Eg.: so i can resume my cut after power loss. There are two possible levels of power loss:

1.) CNC machine lost power, but laptop is running from battery. This is relatively easy, but it's hard to detect, because arduino will be still powered via USB from the laptop battery, so it will respond via serial, but motors will not run. I guess some brownout detection circuitry can trigger arduino's "abort" pin.

2.) Both CNC machine and PC will lose power. This is tricky, because at that point you can't save anything. We can periodicaly (eg. every 15 seconds) write the progress to bCNC.ini and ensure it was flushed to disk, so we have at least some checkpoint after reboot.

BTW how do you plan to re-zero your work coordinates after powering it down mid-job? Some people use endmill to drill small hole in 0,0 coords to get physical reference point.

Guenni75 commented 5 years ago

@Harvie A Resume Button would be nice, but (for me) it would be enough to set a bookmark to the finished blocks, or just disable them. Your thought to resume after Power loss goes much further. I never had such problems, but you never know. Could be very useful.

After powering it down mid-job, i just do a home cycle and i can resume at avery block i want. As long as I do not move the workpiece (two side machining for example), i never need a physical reference point, except the home limit switches.

nonpds commented 3 years ago

I also want to be able to start my gcode at a particular line. USG allows a "Run from line", simply enter the line number of the gcode and it begins from that point.