Hello Guest it is April 26, 2024, 06:28:22 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 - Graham Waterworth

2172
G-Code, CAD, and CAM discussions / Re: subroutine
« on: March 10, 2007, 05:53:04 AM »
Hi plasticbaldy,

You have 2 options with this problem,

1. You code the sub program with incremental moves only. then move to the start points in the main program and call the sub.

2. You code the sub as normal and use G52 X? y? to offset the datum.

e.g.

Option 1.

(main program)

O0001

G21 G40 G00 G99 G17
S1000 M3
G00 G90 X0 Y0 Z5. (FIRST PART POS)
M98 P0002
G00 X25. Y0 (SECOND PART OFFSET 25MM)
M98 P0002
G00 X25. Y25. (THIRD PART OFFSET 25MM X AND 25MM Y)
M98 P0002
G00 X0 Y25. (FORTH PART OFFSET 25MM Y)
M98 P0002
G00 Z150. M5
M30

(SUB PROGRAM)

O0002
G90 G01 Z- 2. F50. ( ABS MOVE)
G91 X5. F150. (INC MOVES)
Y5.
X-5.
Y-5.
G90 G00 Z5. (ABS MOVE)
M99

Option 2.

(main program)

O0001

G21 G40 G00 G99 G17
S1000 M3
G00 G90 X0 Y0 Z5. (FIRST PART POS)
M98 P0002
G52 X25. Y0 Z0 (SECOND PART OFFSET 25MM)
M98 P0002
G52 X25. Y25. Z0 (THIRD PART OFFSET 25MM X AND 25MM Y)
M98 P0002
G52 X0 Y25. Z0 (FORTH PART OFFSET 25MM Y)
M98 P0002
G00 Z150. M5
M30

(SUB PROGRAM)

O0002
G01 Z- 2. F50.
X5. F150.
Y5.
X0
Y0
G00 Z5.
G52 X0 Y0 Z0 (CANCEL OFFSET SHIFT)
M99

The one Brett showed you is close but not quite what you want but a good guide on how to call subs.

Graham.


2173
G-Code, CAD, and CAM discussions / Re: CNC_Toolkit 2 Mach3 problems
« on: March 08, 2007, 08:32:50 AM »
My sim shows it as mach dose, it looks like the code is wrong to me.

Can you post an IGES file of the part.

Graham

2174
G-Code, CAD, and CAM discussions / Re: CNC_Toolkit 2 Mach3 problems
« on: March 08, 2007, 04:52:09 AM »
If you are running the demo version you are limited to 1000 lines of g-code.

If not then have you tried changing the IJ INC/ABS mode.

Graham.

2175
G-Code, CAD, and CAM discussions / Re: Simple threading wizard
« on: March 06, 2007, 07:25:28 PM »
If you post the code it generated I will see if the code is at fault.

Graham.

2176
G-Code, CAD, and CAM discussions / Re: Variables
« on: March 02, 2007, 03:41:41 AM »
Hi Lew,

you can do it like this :-

O0001

#1=-9.95 (z depth)
#2= -10.95 (width)

G21 G40 G00 G90 G17

G00 X0 Y0 Z25.
S1000 M3
Z1.
G01 Z#1 F50.
G01 X#2
Y#2
X0
Y0
G00 Z1.
Z1.
G01 Z#2
ETC.....

M30

You can do in line calculations too.

X[[#2*2]+#1]


Graham.


2177
General Mach Discussion / Re: Variables
« on: March 02, 2007, 02:59:14 AM »
Hi Lew,

you can do it like this :-

O0001

#1=-9.95 (z depth)
#2= -10.95 (width)

G21 G40 G00 G90 G17

G00 X0 Y0 Z25.
S1000 M3
Z1.
G01 Z#1 F50.
G01 X#2
Y#2
X0
Y0
G00 Z1.
Z1.
G01 Z#2
ETC.....

M30

You can do in line calculations too.

X[[#2*2]+#1]


Graham.



2178
G-Code, CAD, and CAM discussions / Re: Proper M code Macro?
« on: February 24, 2007, 04:44:56 AM »
Hi Chris,

if you change your macro to check if mach is running it should fix your problem

try something like :-

IF OEMLED(804) THEN ' 804 is the cycle start led
  DeActivateSignal(output4)
ENDIF

Graham.

2179
Hi Chip,

I see your problem.

I don't use Notepad, I use Wordpad and I save with the following settings. It works for me every time.

Graham.

2180
General Mach Discussion / Re: Can't get 5 axes to work
« on: February 23, 2007, 11:35:15 AM »
If you set Mach to offline mode (led will flash) then go to MDI and type G00 B20. dose the DRO move?

Graham.