Arduino CNC with ld239 shield aren't drawing properly

Hi, i made a CNC with the ld239 shield and a servor motor for the z-axis, the motors are working fine but the problem is that the drawings don't make sense. i am sending pictures of the cnc and the drawings output.ps: g-code in txt format, only way to send here.

CNC_code.ino (9.94 KB)

charmander.txt (20 KB)

Sample1.txt (39.2 KB)

lucascz37:
Hi, i made a CNC with the ld239 shield and a servor motor for the z-axis, the motors are working fine but the problem is that the drawings don't make sense. i am sending pictures of the cnc and the drawings output.ps: g-code in txt format, only way to send here.

Are you trying to tell us all of your preliminary G-code testing of drawing straight lines in different directions and drawing circles, etc. all work fine and now this G-code does something your think is wrong.

What results did you get for initial testing?

Paul

Thank you for responding Paul :), I did the test with a line drawing and this is the output on the link, clearly it is wrong, the .ino file I got from a video on youtube and it was working without problem.ps: I am using a pc 5v usb to power the shield. sorry for the delay.

The exit:
https://drive.google.com/open?id=1bMokbeAG7aRipislEjGHSjqtt-EQZKCo

youtube video:

My G-code to draw a line:
https://drive.google.com/open?id=1gcxNLbmbQnvdV0MrYhW08Lkc9V54itDA

No one here is going to download unknown files when they can easily be posted inline using the </> option.

A straight line should be a single Gcode line, two at most.

Paul

sorry, did not know about that.

(Scribbled version of C:\Users\LUCASA~1\AppData\Local\Temp\ink_ext_XXXXXX.svg6R491Z @ 3500.00)
( unicorn.py --tab="plotter_setup" --pen-up-angle=50 --pen-down-angle=30 --start-delay=150 --stop-delay=150 --xy-feedrate=3500 --z-feedrate=150 --z-height=0 --finished-height=0 --register-pen=true --x-home=0 --y-home=0 --num-copies=1 --continuous=false --pause-on-layer-change=false C:\Users\LUCASA~1\AppData\Local\Temp\ink_ext_XXXXXX.svg6R491Z )
G21 (metric ftw)
G90 (absolute mode)
G92 X0.00 Y0.00 Z0.00 (you are here)

M300 S30 (pen down)
G4 P150 (wait 150ms)
M300 S50 (pen up)
G4 P150 (wait 150ms)
M18 (disengage drives)
M01 (Was registration test successful?)
M17 (engage drives if YES, and continue)

(Polyline consisting of 1 segments.)
G1 X-30.30 Y38.81 F3500.00
M300 S30.00 (pen down)
G4 P150 (wait 150ms)
G1 X-30.29 Y38.86 F3500.00
G1 X-25.56 Y38.87 F3500.00
G1 X-20.85 Y38.83 F3500.00
G1 X-25.57 Y38.79 F3500.00
G1 X-30.30 Y38.81 F3500.00
G1 X-30.30 Y38.81 F3500.00
M300 S50.00 (pen up)
G4 P150 (wait 150ms)


(end of print job)
M300 S50.00 (pen up)
G4 P150 (wait 150ms)
M300 S255 (turn off servo)
G1 X0 Y0 F3500.00
G1 Z0.00 F150.00 (go up to finished level)
G1 X0.00 Y0.00 F3500.00 (go home)
M18 (drives off)

since you mentioned about the code of a straight line should be one or two lines most, i think the problem is the program(inkscape) i am using to generate my g-code.