If power failures are common in your area, then you should invest in either a UPS (which will deal with short interruptions) or electronics and firmware that supports saving the state when the power goes down and resuming it later. This is a standard facility in Duet electronics/RepRapFirmware, and in the Prusa i3 Mk3 printer (which uses Einsy Rambo electronics + a separate power monitor board).
Resuming a print when the state hasn't been saved is a little more difficult. You need to home the printer. Unless it's a delta, you can probably only home X and Y when there is a print on the bed, so you will need to use a G92 Z command to tell the firmware what the Z coordinate of the head is. Then you need to work out where in the GCode file the printer got up to when the power went down. Then you can edit the GCode file to remove all the GCode commands up to that point. Instead you need commands to select the correct tool if your printer has more than one, heat the bed and extruder to the correct temperatures, adjust Z for any baby stepping you were using, set up any coordinate offsets you were using, set the correct fan speeds, and move the heat to its position at the end of the last GCode command you deleted. Or you can do those things manually.
There are some videos on this topic, for example [
youtu.be] (I haven't watched that one all the way through so don't treat this as an endorsement).
Edited 1 time(s). Last edit at 05/27/2019 04:12AM by dc42.
Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod
Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].