Pause.g and Resume.g with VFD Router Spindle.
-
@EducatingSavvas Did yyou ever find a solution to this issue?
-
Surely with the conditional code and object model we must be getting close to making this possible through rs485/modbus?
-
@jlipavsky79 Not really. I found some work around where during a pause I sent a M42 P2 S0 to turn off the spindle enable command, but didn't send a M5 to turn off the PWM signal. I'm in the process of updating to RRF3 on a test rig so hopefully I'll test this again and see if there's any differences.
-
When you get to RepRap firmware R3, you can "capture" the PWM from the object model in pause, turn it off in pause, and then re-establish it in resume.
The clean way to do that is a global variable. These are not shipping, yet, in RRF3. HOWEVER... there are unused 'harmless' spots that can be updated in the object model. So those can be used, right now today, to accomplish the same goal.
RRF2 to 3 conversion is a fair amount of work and learning... yet... you could deal with VFD freq today in an OK way, and make it even cleaner when variables ship (which is pretty soon, per David).
-
@Danal Thanks Danal for the pointers - I've just finished converting my config.g and associated files to work with RRF3 and it's behaving as I had previous left it. I'd like to now learn how to implement some of the new features but it's like you say it's a sharp learning curve. Where do I start?
I'm guessing here: https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Using_conditional_GCode_commands_in_bed_g_to_calibrate_a_delta_printer
Does this mean we'd be able to eventually write scripts which can process g-code in real time? For example to enable a 4th or 5th axis for following vectors angles for a tangential knife cutter?
Cheers, Savvas
-
@EducatingSavvas said in Pause.g and Resume.g with VFD Router Spindle.:
Does this mean we'd be able to eventually write scripts which can process g-code in real time?
Yes.
I'd phrase it as "actions that occur interleaved with G-Code statements as they complete", but I think we are saying almost the same thing.
-
Currently the spindle speed is usually not saved in restore point #1 when you pause the print. I will try to fix that in the next 3.01RC. Meanwhile the following may work, but I have not tested it:
- At the start of pause.g use G60 S0 to save the spindle speed in restore point #0. After that you can turn the spindle off.
- In restore.g use M3 R0 to restore the spindle speed, then a G4 command to allow the speed to be reached.
-
@dc42 Thanks that worked. For reference my pause.g file now looks like:
G60 S0 ; Save Spindle Speed
G91 ; Relative positioning
G1 Z5 F500 ; Slowly move z axis to safe location clearing material
G90 ; Absolute positioning
M5 ; Turn off Spindle PWM
M42 P0 S0 ; Turn off spindle enable
M117 Turning off and Raising spindle ;Display message
G4 p1000 ; Dwell while spindle slows to stop
G53 G1 F1000 Z-1 ; move z axis to safe zand resume.g like:
M3 R0 ; Turn on PWM
M42 P0 S1 ; Turn on spindle enable
G4 P4000 ; Dwell
M291 P"STAND CLEAR! Job Resuming." R"Warning" S2 ; Display message and wait prompt -
@Danal said in Pause.g and Resume.g with VFD Router Spindle.:
interleaved
So much to learn... so little space in my head.
-
I've put a fix in the firmware source so that in future the spindle speed will be saved in restore point 1 along with the other parameters when you pause.
-
@EducatingSavvas In RRF3.01 RC6 you can now remove the line G60 S0 ; Save Spindle Speed from the pause.g file and change M3 R0 to M3 R1; Turn on PWM in the resume.g file.