Hello Guest it is April 25, 2024, 06:24:01 PM

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 - Graham Waterworth

1081
General Mach Discussion / Re: Error msg loading G-code
« on: December 15, 2010, 09:07:01 AM »
You have to apply the G41 on a feed line e.g. G01 G41 X10. P.25

Graham

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

1083
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 02:33:52 PM »
I am not sure it can be done ether but if not there are other ways to do it.

Graham

1084
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 11:31:12 AM »
The GetVar(n) command will allow you to pick up the # variables in VB, n being the # number you require. xstep=GetVar(1)

You may have to set up another M code to initialise the array as global at the start of the g-code.

I have not used the redim command in Mach3 so I would not like to say, maybe somebody else has and will chip in on the subject.

Make sure you save the macros in the macro folder for the profile you are using.

Graham

1085
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 08:52:45 AM »
No problem, if you want to test run the code just change the G31 line to something like G01 Z-1. F200. and Mach3 will simulate the moves for you.

Graham

1086
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 07:20:00 AM »
Here is how I would do it, all you have to do is create the M1234 macro to store the points in an array and a M1235 macro to store it after you finish.

Graham

%
G21 G40 (standard setup lines)

#1=[20.] (spacing in X)
#2=[20.] (spacing in Y)
#3=10 (no of points in X)
#4=15 (no of points in Y)

G00 G43 H3 Z25.00
G00 X0 Y0 (set position of first hole/point as X0 Y0)
M98 P1000 L#4 (repeat #4 times)
M1235 (store the vb data array)
M30

O1000 (this bit moves Y axis)
M98 P1001 L#3 (repeat #3 times)
G91 (set to move incremental)
G00 Y#2 (do move to next line)
G90 X0 (set to absolute and go back to start of line)
M99

O1001(this bit moves X axis)
M98 P1002 (call probe sub)
G91 (set to incremental)
G00 X#1 (do move to next point)
G90 (back to absolute)
M99

O1002 (this sub probes)
G00 Z1.
G31 Z-5. F200.
M1234 (call vb macro to store values in array)
G4 P500
G00 Z1.
M99
%

1087
General Mach Discussion / Re: machine running irregular on button script
« on: December 13, 2010, 04:22:09 PM »
You can run a g-code G31 loop using a sub and some # variables then jump into a custom macro to write the data to a file, that way the moves are all native g-code.

Graham

1088
G-Code, CAD, and CAM discussions / Re: Tapping 4mm
« on: December 13, 2010, 01:12:26 PM »
The normal command for tapping is G84 G98/99 Z(depth of hole) R(start point above hole) F(Feed rate), depending on how you are set up to do this will depend on the code you use :-

If you have a servo spindle them you can control it like an axis and in effect rigid tap the hole with pitch control. If you swap the spindle with axis A you can do:-

O0002(TAP M4 10 DEEP)
G00 Z2.
G92 A0 (ZERO OUT A AXIS)
G01 Z-10. A-6171.428. F200. (12MM MOVEMENT / 0.7 PITCH x 360 DEGREE)
G92 A0
Z2. A6171.428
M99

If you do not have a servo spindle then you will need a tension/compression holder to allow for the over run of the spindle.  With this set up you can use:-

Call the sub from the main program once over the hole.

O0002 (SUB TO TAP M4 HOLE 10 DEEP)
S200 M3
G00 Z2.
G01 Z-10. F140.
M5
G4 P1000
G01 Z2. F280. S400 M4
M5
M99

Graham

1089
Tangent Corner / Re: water saving device?
« on: December 13, 2010, 11:08:33 AM »
We save money by diluting our water  ;D ;)

Graham

1090
General Mach Discussion / Re: Mach 3 turn constant sfm?
« on: December 13, 2010, 07:11:01 AM »
It is possible but not practical to do, the problem is you would have to split every move into small segments and recalculate the speed and feed, this would be a nightmare to do even on a simple part.  I am sure the surface finish would suffer and the delays cause major jerkiness.

Best wait and see if Brian can fix it.

Graham