Hello Guest it is March 18, 2024, 11:06:29 PM

Author Topic: machine running irregular on button script  (Read 18721 times)

0 Members and 1 Guest are viewing this topic.

Re: machine running irregular on button script
« Reply #20 on: December 14, 2010, 05:42:22 PM »
Huh??

My Mach MDI Page / g-code explanation button says:

G40 = Cancel cutter radius compensation
G41 = Start cutter radius compensation left


I guess I am confusing things ???
« Last Edit: December 14, 2010, 05:47:08 PM by zone023 »
Re: machine running irregular on button script
« Reply #21 on: December 14, 2010, 06:10:42 PM »
TP,

I think you mean M40 and M41..

I will give it a try...
Re: machine running irregular on button script
« Reply #22 on: December 14, 2010, 06:36:04 PM »
That's it!! M40/M41 works!!

Everything is easy when you know how to do it...

But this is even easy when you don't know... ;D

No VB script required!!

Thanks Graham, BR549 and rrc1962 for helping me!

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: machine running irregular on button script
« Reply #23 on: December 14, 2010, 07:43:12 PM »
YEP yall got it right what do you need me for(;-)

(;-) TP
Re: machine running irregular on button script
« Reply #24 on: December 15, 2010, 03:58:38 AM »
I am very happy to be able to do some smooth probing now...

Only one minor problem left.

With the button script I wrote it was possible to do surface probing in G68 mode. ( that was the one and only good part of the script... :D)

Using the probing G-code Graham posted together with the M40 command like BR549 suggested it is also possible to do the probing in G68.
But X and Y position are saved in MACHINE coordinates.  :(
Is there a way to store them in WORK coordinates??

Because...I love G68..... ;D
Throw something on your table, probe position, START.

I am going trough all this because I have written a small program to adjust g-code depth (Z) to a non flat surface.
This is for engraving acrylic or pcb's with a v-bit...and keep trace width constant...
It works, but I need a good probing grid of the surface for interpolation of the new depth.
Preferably while probing in G68 mode... ::)

Rich
« Last Edit: December 15, 2010, 04:03:12 AM by zone023 »

Offline Graham Waterworth

*
  • *
  •  2,667 2,667
  • Yorkshire Dales, England
    • View Profile
Re: machine running irregular on button script
« Reply #25 on: December 15, 2010, 05:36:54 AM »
At the end of the run you could have a VB macro post process the file and recalculate the XY positions by subtracting the work offsets from the machine position.

Graham
Without engineers the world stops
Re: machine running irregular on button script
« Reply #26 on: December 15, 2010, 05:55:18 AM »
I already thought about that. But not only the offset should be subtracted but also the G68 rotation should be corrected.
Math on highschool is already 25 years behind me...

I have had some practice while writing the program for depth correction.
G1 G2 and G3 moves are broken into smaller parts to adjust height along the way.

So I think I will be able to do what you suggest, but it will be a lot of work with my lack of experience...
No problem, but a waste of time when an out of the box solution exists.. (Like M40 for writing the probe-data....;D)   

Rich
 

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: machine running irregular on button script
« Reply #27 on: December 15, 2010, 09:41:24 AM »
THe g68 is great to correct part to material. But is it really neccesary for probing(;-) probing the points generates an object in 3d space Once you have the points you need to process the points back to a cut file correct? That would be the time to do a standard correction back to square. In the cam side just rotate the part back .

That is how the big boys do it.

HUM I don't remember the probing storing points in Mach Coords. That would not really make sense.

The probe can be corrected for tip radius in the XY planes so the exact centerline stored as points. This saves a lot of time in the cam side trying to correct for tip radius and correct the size of the part.

Just a thought, (;-) TP
« Last Edit: December 15, 2010, 09:44:45 AM by BR549 »
Re: machine running irregular on button script
« Reply #28 on: December 15, 2010, 11:55:11 AM »
Hi TP....Mr. Little here.... :D

I don't know what the big boys do...Had to figure it out by myself...

That's why I  want to do the following. :-\

First the setup.
I have a probe permanently mounted on my Z-axis.
The probe can be brought in place when needed by activating an accurate pneumatic actuator.
The offset probe > mill is a fixed value in X and Y.

Say, I want to engrave an acrylic sign.
Acrylic is no way flat. On a 10 mm thick sheet thickness can vary about plus or minus 0.4mm.
When engraving with a v-bit at 0.1 mm depth this means a very thick trace...or no trace at all...

The acrylic sheet already has the size needed for the sign.
Only the engraving has to be done.

 What I do is:
- Place the acrylic on the table
- Probe position in X and Y.
- Set G68 rotation and offset
- Z-Probe the surface of the acrylic sheet (Till now with my crappy button script..)
- Pull the Z-probe results and the original g-code for the engraving through my "z-control" program.
- Load the z-adjusted g-code into Mach
- Zero tool
- Start... :D

It might be an unusual approach...but I like it...can't help it...


I did a dry run with the probing g-code Graham posted, machine offline.
Just lowered the number of points a little, replaced the M1234 and M1235 macro with M40 and M41.

When I probe in G68, 1 degree rotation, offset x10 and y10 I get the following results.  

10.00000,10.00000,-5.00000
29.99687,10.34688,-5.00000
49.99375,10.69688,-5.00000
9.65000,29.99687,-5.00000
29.64688,30.34375,-5.00000
49.64375,30.69375,-5.00000
9.30000,49.99375,-5.00000
29.29688,50.34063,-5.00000
49.29375,50.69062,-5.00000
8.95313,69.99062,-5.00000
28.95000,70.34063,-5.00000
48.94687,70.68750,-5.00000

Probe offset can be ignored, this is a dry run (as if the probe is in the centre of the mil/spindle).
  
Probe (M40) X and Y are not the same as the (red) X Dro and Y Dro.  
X and Y Dro show "integers" as probing points, like:
0.000, 0.00
20.000, 0.000
40.000, 0.000
etc

The X and Y values M40 "writes" in G68 mode, in my opinion, really are machine coords. :(

Offset and rotation are known, so machine coordinates can be "calculated back" to work coordinates.
But for me that will be a lot of work/reading.
So I was looking for a way around...still impressed by the simplicity of M40..! :)


Rich

Or actually D I C K,  but this is ****ed away quite often, on English sites... ;D
(Mr Little is extra funny in this case!)
 
« Last Edit: December 15, 2010, 11:59:32 AM by zone023 »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: machine running irregular on button script
« Reply #29 on: December 15, 2010, 12:12:38 PM »
I see your point for engraving (no pun intended)

NOT sure the need for G68 probing (;-) It is VERY easy to rotate a part square to the table(;-) But each his own on that one(;-)


OK the solution is to RefALL to the same 0,0 point as your Fixture offset. That way it all reads and writes the same values(;-)

The machine corrds and users corrds will be exactly the same.

I wonder IF you could apply the surface offsets to the axis correction map or possible use the data to create an offset table of Gcode variables.

MAYBE a wizard to compile all the info into a gcode file???

Just trying to keep it simple and trouble free, (;-)TP
« Last Edit: December 15, 2010, 12:19:15 PM by BR549 »