S3D ending script cant get G91 to work

Get answers & advice for all of your 3D printing & Free Software needs here!
Post Reply
B-Hep-Spring
Posts: 31
Joined: Fri Oct 12, 2018 11:55 am

S3D ending script cant get G91 to work

Post by B-Hep-Spring » Thu Jan 17, 2019 2:01 pm

im tying to get my ending script when finished to raise up 5mm then move to x and y position but cant seem to get it to work when I look at the line G1 Z20 E-5 X-20 Y-20 F3000
and say the print height is 50mm height it is dropping to the Z20 height. its like it doesent recognise the relative position.... any help appreciated.


M400 ;wait for moves to finish
M140 S0 ;turn bed Off
M104 S0 ;disable hotend
M107 ;disable fans
G91 ;relative positioning
G1 E-1 F300 ;ilament retraction to release pressure
G1 Z20 E-5 X-20 Y-20 F3000 ;lift up and retract even more filament
G1 E6 ;re-prime extruder
M117 Cooling please wait ;progress indicator message on LCD
G90 ;absolute positioning
G1 Y0 F3000 ;move to cooling position
G1 Y280 F3000 ;present finished print
M77 ;stop GLCD timer
M84 ;disable steppers
M117 Print Finished Bob ;progress indicator message on LCD

kmanley57
Posts: 1106
Joined: Sun Feb 01, 2015 3:53 pm

Re: S3D ending script cant get G91 to work

Post by kmanley57 » Thu Jan 17, 2019 4:43 pm

B-Hep-Spring wrote:
Thu Jan 17, 2019 2:01 pm
im tying to get my ending script when finished to raise up 5mm then move to x and y position but cant seem to get it to work when I look at the line G1 Z20 E-5 X-20 Y-20 F3000
and say the print height is 50mm height it is dropping to the Z20 height. its like it doesent recognise the relative position.... any help appreciated.



G1 Z20 E-5 X-20 Y-20 F3000 ;lift up and retract even more filament
I think you are telling it to go Z20 and not Z+5

Mine:

G1 Z+20 E-5 X-20 Y-20 F3000 ; move Z up a bit and retract filament even more
I will express my CRAZY ideas at any time! So you have been warned. None of my opinions are Lulzbots and can be wrong at any second.

B-Hep-Spring
Posts: 31
Joined: Fri Oct 12, 2018 11:55 am

Re: S3D ending script cant get G91 to work

Post by B-Hep-Spring » Fri Jan 18, 2019 11:43 am

it makes no difference on that line if I put 15mm it will drop 15 mm if I put a height grater than 20mm say 25mm it will ramp to 25mm not lift off the print to 25mm which means I have to alter this line if the print is greater than say 25mm.. look at the picture you can see the line is set to 25mm and you can see the ramp up.. not what I was wanting, I wanted it to lift so no matter what size of print I am doing the end it would always lift a given amount.
Attachments
Retraction Sc Print.jpg

kmanley57
Posts: 1106
Joined: Sun Feb 01, 2015 3:53 pm

Re: S3D ending script cant get G91 to work

Post by kmanley57 » Fri Jan 18, 2019 10:20 pm

I will try one more time:

Relative movements require to know which direction you want to move, thus the (+/-) for the distance to move. Otherwise it will think you want to move to an absolute point.

Z-5 move 5 down
Z+5 move 5 Up.
Z5 move to absolute position 5. < not relative. It can not guess which direction you want to move.
I will express my CRAZY ideas at any time! So you have been warned. None of my opinions are Lulzbots and can be wrong at any second.

B-Hep-Spring
Posts: 31
Joined: Fri Oct 12, 2018 11:55 am

Re: S3D ending script cant get G91 to work

Post by B-Hep-Spring » Sat Jan 19, 2019 11:04 am

kmanley17

thank you for your patience I had not seen this put in this way before I have a number of scripts for other printers and these worked I did not realise they need to be specified like this + -..


Thank you

B-Hep-Spring
Posts: 31
Joined: Fri Oct 12, 2018 11:55 am

Re: S3D ending script cant get G91 to work

Post by B-Hep-Spring » Sat Jan 19, 2019 11:35 am

ok done that added the +5 it dropped strait to the deck

but thanks for trying
Attachments
Retraction Sc Print 2.jpg

b-morgan
Posts: 218
Joined: Fri Aug 11, 2017 8:53 am

Re: S3D ending script cant get G91 to work

Post by b-morgan » Sat Jan 19, 2019 11:37 am

kmanley57 wrote:
Fri Jan 18, 2019 10:20 pm
Z-5 move 5 down
Z+5 move 5 Up.
Z5 move to absolute position 5. < not relative. It can not guess which direction you want to move.
I'm afraid I'm going to disagree with you. From http://marlinfw.org/docs/gcode/G000-G001.html:
  • In Relative Mode (G91) all coordinates are interpreted as relative, adding onto the previous position.
I just performed the following on my TAZ 6:

G28 XY
G28 Z
G90
G0 X140 Y140 Z50
M114
G91
G0 Z5
M114
G0 Z-5
M114

The M114 output:
Recv: X:140.00 Y:140.00 Z:50.00 E:0.00 Count X:14070 Y:14070 Z:80000
Recv: X:140.00 Y:140.00 Z:55.00 E:0.00 Count X:14070 Y:14070 Z:88000
Recv: X:140.00 Y:140.00 Z:50.00 E:0.00 Count X:14070 Y:14070 Z:80000

(Test.gcode and (edited)Test.log attached).
Attachments
Test.zip
(824 Bytes) Downloaded 7 times

b-morgan
Posts: 218
Joined: Fri Aug 11, 2017 8:53 am

Re: S3D ending script cant get G91 to work

Post by b-morgan » Sat Jan 19, 2019 11:52 am

B-Hep-Spring wrote:
Thu Jan 17, 2019 2:01 pm
im tying to get my ending script when finished to raise up 5mm then move to x and y position but cant seem to get it to work when I look at the line G1 Z20 E-5 X-20 Y-20 F3000
and say the print height is 50mm height it is dropping to the Z20 height. its like it doesent recognise the relative position.... any help appreciated.
Can you have S3D output the gcode to a file and verify that the gcode sequence you posted actually made it into the file. What you posted should work and the "+" sign is not required (see my previous post). From the S3D Machine Control Panel, Communication tab you should be able to send individual commands and see the results. Try my simple experiment for yourself.

B-Hep-Spring
Posts: 31
Joined: Fri Oct 12, 2018 11:55 am

Re: S3D ending script cant get G91 to work

Post by B-Hep-Spring » Sun Jan 20, 2019 9:59 am

b-morgan

Thank you, I'm not the most intelligent guy but i'm not stupid either, before I posted I did do some testing hence the question for help,,, I have checked the gcode and it does look like the G90 was set at the beginning of the code and the G91 was implemented at the end of the code I attach the sample if you like to take a look,, I will try you test later tomorrow and come back..
Attachments
Side.gcode
(3.35 MiB) Downloaded 8 times

Post Reply