Ignoring start script, help needed.
-
Hi I am having a hard time understand what I am doing wrong. I want my printer (a corexy, Duet 0.8.5, FW 1.26.1) after homed all axis and before start printing to lower the bed x mm so not scratching the bed moving to the start point of the print but it is ignoring the last line. I understand that this was change with a firmware upgrade demanding a S2, but I cant get it right... Should I have this command in the start script (S3D) or in the homeall.g file or in homez.g? And how should it be written to work?
My homeall.gG91 ; relative mode G1 Z3 F200 G1 S1 X-400 Y-400 F3000 ; course home X or Y G1 S1 X-400 ; course home X G1 S1 Y-400 ; course home Y G1 X4 Y4 F600 ; move away from the endstops G1 S1 X-10 ; fine home X G1 S1 Y-10 ; fine home Y ; If you are using a microswitch for Z homing, insert similar code for the Z axis here, ; but use lower feed rates suitable for your Z axis. G90 ; back to absolute mode ; The following code assumes you are using a Z probe to do Z homing. Remove it if you are using a microswitch. ; Adjust the XY coordinates in the following to place the Z probe over a suitable spot, ; preferably near the centre of the bed if your Z probe supports that G1 X180 Y190 F5000 G30 G1 Z4 G1 X0 Y0 F5000 G1 Z4 S2
My homez.g
G91 G1 Z5 F2000 G90 G1 X180 Y190 G30 G1 Z4 F2000
My start script
G91 ; set coordinate system to relative mode G1 Z3 ; lower z axis 3 mm G90 ; set coordinate system to absolute mode G28 ; home all axes G1 Z4 ;lower z axis 4mm
Any help or hint will be much appreciated!
-
@perolalars said in Ignoring start script, help needed.:
Which exact moves are not working?
G90 ; back to absolute mode ; The following code assumes you are using a Z probe to do Z homing. Remove it if you are using a microswitch. ; Adjust the XY coordinates in the following to place the Z probe over a suitable spot, ; preferably near the centre of the bed if your Z probe supports that G1 X180 Y190 F5000 G30 G1 Z4 G1 X0 Y0 F5000 G1 Z4 S2
This is the last few lines of your homeall.g. These are done in absolute mode (the G90), so are going to the actual height. The G1 moves the nozzle to the (I assume) middle of the bed (G1 X180 Y190) then probes to set Z0 (G30). Then moves to Z4. Is this the move that is not working? What happens just after the probe will depend on your probe settings; if the probe dive height (H parameter in M558) is set to 4mm, the nozzle will lift to 4mm after probing, so the following two G1 Z4 commands are not happening, because it's already at Z4. Alternatively, if the Z offset in G31 is set to 4mm, and the firmware thinks it's at Z4 when it's actually at Z0 (nozzle touching bed), then you've incorrectly set the probe offset.
If you want it to move up 4mm from wherever it is, use relative, rather than absolute, movements. eg:
G91 ; relative mode G1 Z4 ; move up 4mm G90 ; back to absolute mode
It could also be that you have put no feedrate on the Z move, so it could be it's trying to do it at maximum speed, which is actually too fast for the motors.
Ian
-
Before I can grasp what you say and its quite possible that I have setting that contradict one an other, but I dont know which it is.. my setting in config M558 looks like this
; Z probe M558 P1 H3 F200 T2000 ; Modulated IR probe, also used for homing the Z axis G31 X-22 Y0 Z0.77 P500 ; Set the probe height and threshold (put your own values here)
And it the last command in my start script that dont work, lowering the bed 4mm and then go to the start of the print and while doing so lowering to the right print height..
-
You'd need to post the starting section of your sliced gcode file.
Usually the Z height is set by the slicer to the first layer height before the travel move to the starting printing position, so I don't think you can do exactly what you're asking.
If your nozzle is hitting the bed surface you should consider using mesh compensation so that the nozzle can move up and down to maintain the correct height from the bed as needed.
-
@Phaedrux Hi and thanks for reply! I am not after a mesh bed leveling.
My gcode looks like this at startG90 M83 M106 S0 M140 S65 M190 S65 M104 S235 T0 M109 S235 T0 G91 ; set coordinate system to relative mode G1 Z3 ; lower z axis 3 mm G90 ; set coordinate system to absolute mode G28 ; home all axes G1 Z4 ;lower z axis 4mm ; process CoreXY-PETG ; layer 1, Z = 0.200 T0 G1 E-4.0000 F2400 ; feature skirt ; tool H0.200 W0.400 G1 Z0.200 F1002 G1 X167.920 Y169.840 F3000 G1 E4.0000 F2400 G1 X168.463 Y169.327 E0.0223 F1920 G1 X169.889 Y168.102 E0.0563 G1 X170.377 Y167.716 E0.0186 G1 X171.473 Y166.917 E0.0406 G1 X171.884 Y166.637 E0.0149 G1 X172.977 Y165.942 E0.0388 G1 X173.405 Y165.689 E0.0149
Its the last line of code in the start script (G1 Z4 ;lower z axis 4mm) that it ignores. So from G91 to G28 it does it alright but it dont execute the last G1 Z4.
I want it, after G28 to lower the bed (or raise the nozzle) 4 mm and then descend to the first layer height (0.2 mm in this case) while moving to the start point of the print.
It worked in Cura with the exact same start script but it dont with S3D, and I really want to use S3D... -
Have you checked the Z position after a G28 ?
It's possible that the Z axis is already at 4mm.If you want it move 4mm from the point at which it lies after G28 then you need to switch to relative mode before sending G1 Z4 and then switch back to absolute mode after that.
G91 G1 Z4 G90
Of you could use conditional G code and leave it in absolute mode (provided you're running RRF3)
G1 Z{move.axes[2].machinePosition + 4}
-
@OwenD Thank you for clarifying that, it really helped! And since I have a duet 0.8.5 I cant use the RRF3...