Hello Guest it is April 16, 2024, 10:35:06 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zone023

Pages: « 1 2 3 4 »
11
General Mach Discussion / Re: machine running irregular on button script
« 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!)
 

12
General Mach Discussion / Re: machine running irregular on button script
« 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
 

13
General Mach Discussion / Re: machine running irregular on button script
« 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

14
General Mach Discussion / Re: machine running irregular on button script
« 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!

15
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 06:10:42 PM »
TP,

I think you mean M40 and M41..

I will give it a try...

16
General Mach Discussion / Re: machine running irregular on button script
« 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 ???

17
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 05:29:33 PM »
Hi,

Working on the macro's... but no results... :-[

As rrc1962 already suggests I am having trouble letting the array survive when the M1234 macro is left for the next probing step.

I have tried making another macro to start with, M1233

It only contains the following line:
    Public arrXYZ(999, 2) As Double

First, I found that

   Dim arrXYZ(GetVar(3) * GetVar(4), 2 ) As Double

is not allowed.  GetVar is giving an error here.

Also, in M1234

   arrXYZ(0,0)= GetVar(2000)

Will not work. The array is not recognized as such.

I am happy things are not easy, life would be boring  :-\

But how are others writing their probing-values???

I hope I find the answer before someone gives it to me.
Nothing would be left of my selfrespect ;D

   

18
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 12:00:05 PM »
Thanks again, Graham.

You've more than put me in the right direction.

Now it is time for me to stop asking and start working. :D

Rich


19
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 09:37:24 AM »
I have already loaded the code into Mach in offline mode to see what is happening.
M1234 and M1235 are still missing...

Regarding to the M1234 (probe values to array) macro I have some questions.

Will a variable like #3 be "carried over" to the macro?  (this to set the size of the array)
How to avoid the array is re-declared every time the macro is called?? Do I need to use the ReDim Preserve command?

And just to be sure..I guess I need GetVar(2000) etc to write the values to the array...??

Pfff...I am just a dutch truckdriver in daily life... so please be (stay!) kind to me...  ;D


20
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 08:16:02 AM »
Graham, you are the MAN!!

Reading around a little I already found some info.
I was beginning to see the light.....far away...
But this brings it all together! THANKS!


It seems that you can do a lot more with g-code than it looks like on first hand.
My CAM software spits out g-code to easy to study it in depth.
I know what G0 G1 G2 etc is..that's it... 
But now it shows that it might be VERY usefull to make it your second language...  ;D

I will try to do the "writing"-macro's myself. ::)

Thanks Again!!

Rich

 
 

Pages: « 1 2 3 4 »