So after many hours of trial and error, optimizing and testing i have finally made a fully automatic probe code that runs automatically before each cut. i also added a SSR (Solid State Relay) to control the on/off of my dewalt 611 using the auto control in Gcode. Below is the code for the auto zeroing. if you read through it you can tell in what coordinates my touch plate and touch arm are and how it goes about doing this without the alligator clip.
VECTRIC FORMAT:
Β±--------------------------------------------------
- Commands output at the start of the file
- Probe Location: X30, Y29.5
- Future probe location: X31, Y32 (So i dont forget location measured)
Β±--------------------------------------------------
begin HEADER
β$Hβ
βT1β
βG17β
βG20β
βG1 F50β
βG10 P0 L20 X0 Y0 Z0β
βG0 X29 Y29.5β
βG0 Z-2.125β
βG1 X30 Z-2.25β
βG38.2 Z-3 F1β
βG10 P0 L20 Z0.055β
βG1 F50β
βG1 Z0.1β
βG1 X29β
βG0 Z2.3β
βG0 [XH][YH]β
βG0 [S]M3β
PICTURE: https://dl.dropboxusercontent.com/u/21605196/IMG_20150912_125610.jpg
LESSONS LEARNED:
- Gcode is picky⦠Feedrates need to be defined for G1 or G38.2 moves.
- The machine is very smart but in reality it does what it is told no matter what is in its way⦠in other words it has no issues colliding with itself if told to do so⦠Stupidity is in everything.
- if you tell Z to go hear before probing it will go there, even if it hits the wasteboard it keeps going
- i hope people find this code as usefull as i do.
- any questions or changes you think would help let me know!
2 Likes
This is only for zeroing the Z axis, right? I like the idea, maybe it could even be embedded into a future wasteboardβ¦
What kind of SSR did you use, and how did you hook it up? Iβm moving up to a 611, and am starting to order parts for the upgrade.
Below i commented all the lines of the code and added a few M0 and a M8 command.
M0 is a start button so you can tell it to do something then wait for someone to hit the button and it will continue
M8 is the coolant enable pin witch runs my vaccum through another SSR
the SSRβs im using are cheapos off ebay and look like this exactly: http://i01.i.aliimg.com/wsphoto/v3/486924527_1/25A-SSR-input-3-32V-DC-output-24-380V-AC-single-phase-ssr-solid-state-relay.jpg
βM0β when you send a file you have to hit a fee/resume button connected to Pin A2
βM0β for some reason it ignores one of these so i had to put 2 (this feature is for safety)
β$Hβ home the machine
βT1β tool number
βG17β XY plane selection
βG20β Inches
βG1 F50β Set Feedrate
βG10 P0 L20 X0 Y0 Z0β set current position (HINT XY ZERO)
βG0 X29 Y29.5β move to just outside probe area
βG0 Z-2.125β lower z axis
βG1 X30 Z-2.25β move over probe and lower some more
βG38.2 Z-3 F1β do probing operation very slowly
βG10 P0 L20 Z0.055β set Z zero (thickness of my probe plate is 0.055")
βG1 F50β set feedrate again
βG1 Z0.1β move z up to 0.1"
βG1 X29β clear probe area ands arm
βG0 Z2.3β move z axis almost all the way up to clear everything on wasteboard
βG0 [XH][YH]β go home
βM0β wait for user input from start/Resume Button
βG0 [S]M3 M8β start spindle and coolant aka vaccum
1 Like
i hooked up the SSR to the spindle output of the (logic/on/off) port on the power supply. for the vaccum i just attached the one side to gnd and the other to the coolant pin since the ssr works down to 3v. just down pwm the ssrβs. set your rpm to 12000 or higher so it will be constant output. and for the zeroing it actually zeroβs all the axisβs.
How funny, those were the same relays I had in my cart on Amazon. Must be a good omen. Instead of running through the coolant pin, could you run both relays off the spindle logic so you donβt have to solder on additional arduino pins?
here is where i mounted the one for my spindle. makes it easy if i ever change over to a 24v spindle (i never will after using the 611) you could wire them both off the same ssr if you put the ssr off the machine unlike me where mine is mounted to the x carriage.
SSR mounted: https://dl.dropboxusercontent.com/u/21605196/IMG_20150912_154137.jpg
Buttons: https://dl.dropboxusercontent.com/u/21605196/IMG_20150912_154146.jpg
Here is the updated code with Manual Tool Change!
+================================================
+
- Block definitions for toolpath output
-
+================================================
Β±--------------------------------------------------
- Commands output at the start of the file
- Probe Location: X31, Y32
Β±--------------------------------------------------
begin HEADER
β$Hβ
βT[T]β
βG17β
βG20β
βG1 F50β
βG10 P0 L20 X0 Y0 Z0β
βG0 X30 Y32β
βG0 Z-2.125β
βG1 X31 Z-2.25β
βG38.2 Z-3 F1β
βG10 P0 L20 Z0.055β
βG1 F50β
βG1 Z0.1β
βG1 X29β
βG0 [ZH]β
βM0β
βG0 [S] M3 M8β
Β±--------------------------------------------------
- Commands output at toolchange
Β±--------------------------------------------------
begin TOOLCHANGE
βG0 [ZH]β
βG0 X30 Y32β
βM5M9β
βInsert Tool [T] And Press Startβ
βM0β
βT[T]β
βG0 Z0.375β
βG1 X31β
βG38.2 Z0 F1β
βG10 P0 L20 Z0.055β
βG1 F50β
βG1 Z0.1β
βG1 X29β
βG0 [ZH]β
βG0 [S] M3 M8β
1 Like