add delay after Z down

Discussion about the arduino based g-code interpreter, grbl
jmb47
Posts: 17
Joined: Wed Mar 23, 2016 7:16 pm

add delay after Z down

Post by jmb47 » Sat Apr 16, 2016 10:29 pm

hi everybody

I make a plotter, it works with Grbl and universal code sender.
for Zdown and Zup I used an electro magnet, it works very well. (thanks cvoinescu and chamnit : http://www.shapeoko.com/forum/viewtopic.php?f=3&t=7868)
It is connected to the pin 13 and works with the command M3 and M4.

the problem is that when the pen down, I have a little gap in the drawing
This is due to the fact that the plotter begins its movement before the pencil touch the paper.

I wonder if it is possible to add a small delay after each command on the M4 in the Grbl code?

you can see the plotter on youtube.
thanks for you answers (sorry for my english, i'm french)
jean marie

https://www.youtube.com/watch?v=Vlc07LsXYpY
https://www.youtube.com/watch?v=mVyK0osAehw

Brian Stone
Posts: 295
Joined: Tue Oct 21, 2014 1:52 am
Location: Seattle, WA

Re: add delay after Z down

Post by Brian Stone » Sat Apr 16, 2016 11:17 pm

The G4 P<x> command is "dwell". It lets you specify a pause time.

Example:
M4
G4 P0.5
G0 X10 Y10

This should move your pen down, then pause for 0.5 seconds, and then move the X and Y axis to (10,10). I've never used this, but I think GRBL supports it.
Shapeoko 2 #7353
1500x1000mm Shapeoko/X-Carve Hybrid, Nema-23's, Belt-Driven Z-Axis /w ACME Screw, Dewalt 611, Soundproof Enclosure
[Fusion 360 | Illustrator] -> Universal G-Code Sender

jmb47
Posts: 17
Joined: Wed Mar 23, 2016 7:16 pm

Re: add delay after Z down

Post by jmb47 » Sat Apr 16, 2016 11:57 pm

ok thanks
I try it tomorrow and tell you if it works.
jm

jmb47
Posts: 17
Joined: Wed Mar 23, 2016 7:16 pm

Re: add delay after Z down

Post by jmb47 » Mon Apr 18, 2016 10:55 am

ok it works fine (G4 P0.3)
thanks a lot
jm


before delay
IMG_6867.JPG
IMG_6867.JPG (224.18 KiB) Viewed 1452 times
with delay
IMG_6868.JPG
IMG_6868.JPG (248.13 KiB) Viewed 1452 times

jmb47
Posts: 17
Joined: Wed Mar 23, 2016 7:16 pm

Re: add delay after Z down

Post by jmb47 » Wed Apr 20, 2016 11:47 pm

hi brian

finally, it's not so good.
The delay made some problem.

on this test, it's without any delay.
There is a lag but every lines are in the square.
IMG_0418.JPG
IMG_0418.JPG (235.4 KiB) Viewed 1432 times
on the other test, the delay ( i put G4 P0.3) create problem.
the plotter lost some step.
IMG_0424.JPG
IMG_0424.JPG (375 KiB) Viewed 1432 times
with 1/4 step
on left with delay, on the right without delay
IMG_0419.JPG
IMG_0419.JPG (197 KiB) Viewed 1432 times
but sometimes it's good ( not a lot of time)
have you got an idea?
jm

WillAdams
Posts: 8576
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: add delay after Z down

Post by WillAdams » Thu Apr 21, 2016 12:08 am

Try adding a delay before the lowering as well?
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets
Nomad 883 Pro #596 (bamboo)

Brian Stone
Posts: 295
Joined: Tue Oct 21, 2014 1:52 am
Location: Seattle, WA

Re: add delay after Z down

Post by Brian Stone » Thu Apr 21, 2016 4:56 am

That is very strange. I don't think it's the dwell command that is causing the problem, but, as I said before, I haven't used it. I'm not sure how to explain that result, though. Could it be dragging the paper over a little bit on each row?
Shapeoko 2 #7353
1500x1000mm Shapeoko/X-Carve Hybrid, Nema-23's, Belt-Driven Z-Axis /w ACME Screw, Dewalt 611, Soundproof Enclosure
[Fusion 360 | Illustrator] -> Universal G-Code Sender

PsyKo
Posts: 430
Joined: Thu Aug 30, 2012 8:42 pm
Location: France

Re: add delay after Z down

Post by PsyKo » Thu Apr 21, 2016 7:16 am

Hello,

Do you have some heatsinks or fans to make sure your driver are not overheating ?
If it was a thermal issue, the problem would occur in both mode (with and without delay). I'm just trying to eliminate obvious causes.
Shapeoko #736
Kress 800, Z Axis upgrade, dual Y, 600mm X&Y rails, metal spacers and V Wheels, home switches, 4th axis
Goko - Free CNC Control Software - http://www.shapeoko.com/forum/viewtopic ... 380#p44380

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: add delay after Z down

Post by cvoinescu » Thu Apr 21, 2016 8:16 am

+1 for paper being dragged around.

It really doesn't look like missed steps or thermal overload or even slack belts, but it is consistent with the pen, or, more likely, the paper, slipping slightly with each move. The delay would affect this, because in one case the pen touches the paper while moving, in the other it first lands firmly, then begins to move. I bet that moves and rotates the paper a bit.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

jmb47
Posts: 17
Joined: Wed Mar 23, 2016 7:16 pm

Re: add delay after Z down

Post by jmb47 » Thu Apr 21, 2016 12:46 pm

hi everybody

it can not come from the paper because I have a vacuum table....
This afternoon i going to try another shield, i work with a Gshiel and Arduino Uno.
For now I do not have a fan, but I do not think the problem comes from there because occasionally the grid is good (just once among 10)
The first launch, when the shield is cold the problem is the same and when i test without delay, i have no problem of position.

jm

the plotter in decembrer, since then, i have rectified the surface and it work really well, i can pull off the paper in translation...
IMG_6467.jpg
IMG_6467.jpg (256.09 KiB) Viewed 1382 times

Post Reply