Welcome! Log In Create A New Profile

Advanced

Marlin as CNC-Firmware: Z-Probe used to detect work piece height?

Posted by 6brueder 
Marlin as CNC-Firmware: Z-Probe used to detect work piece height?
May 24, 2016 03:24PM
Hello together,
i use the Marlin-Firmware at my CNC-Router as the Firmware on the Ramps for my CNC. I am very happy with it because it works very well.( I use it also at my Deltaprinter.)

At the moment i want to go the next step and detect automatically where my workpiece (stock) is. (Only the Z-Height)
For this i mounted a rc-servo with a attached microswitch beside my spindle.

The sequence i have in my mind is as follow:
1) I move the spindle manually above the work piece(only x- and y-movement)
2) I execute a special GXY-command (maybe modified G29,G30) to detect the surface of my workpiece.

This special "special GXY-command (maybe a modified G29,G30-command)" should move the servo controlled microswitch down to z- (M280), then move the z-axis down until the microswitch touches the workpiece and store the this value -for example- as zero. After that the z-axis is moved up und retract the micro switch(again M280).

I tried to modify the G30-Command and use this. But it didn't worked(i am only a mechanical engineer.)....

Most of the attempts i did at my deltaprinter - just as test environment - Could that(delta) be a problem?

If anyone has a idea about keywords to search here in the forum or any blogs in the www - would be very grateful!
thank you very much!

Nathan

P.S.: information about our router and printers: www.6brueder.wordpress.com
Re: Marlin as CNC-Firmware: Z-Probe used to detect work piece height?
May 24, 2016 04:40PM
First... Can you move to RC6-RCBugFix? That is going to be the easiest code for us to help you with.

The G30 should work to probe the piece. But trying to do this on a Delta is going to be much more complicated. The Delta Towers complicate the movement dramatically. They require the correct usage of void prepare_move_raw() and sync_plan_position_delta(); The learning curve to understand this is going to be steep even for a software engineer.

If you back off and do this for a Cartesian machine, G30 should be straight forward to use. You can use SERIAL_PROTOCOLPGM() to display debug information at every step and to print out variables so you can figure out what is wrong within a step that is acting unexpectedly.
Re: Marlin as CNC-Firmware: Z-Probe used to detect work piece height?
May 26, 2016 02:56AM
Thank for the reply, i will try G30 at my cartesian CNC.
Sorry, only registered users may post in this forum.

Click here to login