Won't regognise G170 G171.

Submit any comments, issues or requests relating to the use of VR Milling Version 5 and 2

Moderators: Martin, Steve, Mr Magoo

Post Reply
TimPower
CNC Apprentice
CNC Apprentice
Posts: 37
Joined: Thu 27 Apr , 2006 17:19 pm

Won't regognise G170 G171.

Post by TimPower » Fri 05 May , 2006 15:29 pm

Hi there,
My novamill is running on 2.30 at the mo but will not regognise circular or rectangular pocket machining. :( Is this a software problem or some setting that I'm missing.
Rgds,
Tim.

User avatar
Denford Admin
Site Admin
Posts: 3636
Joined: Fri 10 Feb , 2006 12:40 pm
Hardware/Software: Go to User Control Panel > Profile
Enter as much information about your CNC hardware and software as you can - it makes it easier for everyone to know what you're talking about then.
Location: Sunny Brighouse
Contact:

Post by Denford Admin » Mon 08 May , 2006 14:13 pm

Hi,

We never got around to implementing the pocket cycles (even though they are mentioned in the old help :oops:)
However, we did implement fanuc style macro programming and sub programming, which we think is more useful :D
If you can work out whats going on - its will be pretty straight forward for you to write subprograms to create anything that repeats, eg Bolt Hole circles / squares / circular pockets (you can use SIN and COS in macro programming)

Cut and paste this into RectangularPocketMain.fnc
(Rectangular Pocket Cycle
(Define 9001 to be file: RectangularPocketSub.fnc
[SUBPROGRAM 9001 RectangularPocketSub
[BILLET X80 Y80 Z40
O0001
G91 G28 X0 Y0 Z0
G90
M6 T1
M3 S1000
G00 X10 Y15 Z2 (Start Position XYZ

#502=60 (Pocket Width
#503=50 (Pocket Height
#504=-1 (Pocket Depth
#505=120 (Feedrate
#506=3 (Stepover

M98 P9001
G91 G28 X0 Y0 Z0
G90
M30
Now cut and paste this into RectangularPocketSub.fnc
O9001
(Rectangular Pocket Sub-Cycle)

(External Variables Required...)
(#502 = X Length)
(#503 = Y length)
(#504 = Z depth)
(#505 = feedrate)
(#506 = step over)

(Read starting X,Y position
#500=#4101
#501=#4102
(Internal Variables...)
(#100=x dest per pass)
(#101=y dest per pass)
(#103=y final dest)
(#105=plunge rate (feedrate / 2)
#103 = #501 + #503
#105 = #505 / 2


G00 X#500 Y#501
G01 Z#504 F#105
F#505
#100 = #500
#101 = #501

N9110

#100 = #100 + #502
X#100
#502 = #502 * -1
IF [#101 GE #103] THEN GOTO 9130
#101 = #101 + #506
IF [#101 GE #103] THEN #101 = #103
Y#101
IF [#101 GE #103] THEN GOTO 9130

GOTO 9110

N9130

(Cleanup Pass...)
#100 = #100 + #502
X#100
Y#501
#502 = #502 * -1
#100 = #100 + #502
X#100
Y#101
Z2
M99

BTW, this works on the latest Version 2 and all versions of V5

User avatar
Denford Admin
Site Admin
Posts: 3636
Joined: Fri 10 Feb , 2006 12:40 pm
Hardware/Software: Go to User Control Panel > Profile
Enter as much information about your CNC hardware and software as you can - it makes it easier for everyone to know what you're talking about then.
Location: Sunny Brighouse
Contact:

Re: Won't regognise G170 G171.

Post by Denford Admin » Wed 10 Feb , 2010 15:21 pm

And here is the Circular pocket main and sub-routine programs:

CircularPocketMain.FNC
(Circular Pocket Cycle
(Define 9002 to be file: CircularPocketSub.fnc
[SUBPROGRAM 9002 CircularPocketSub
[BILLET X80 Y80 Z40
O0001
G91 G28 X0 Y0 Z0
G90
M6 T1
M3 S1000
G00 X40 Y40 Z5 (Start Position XYZ

(Subtract tool radius from desired radius and enter here:
#502=27 (Pocket Radius
#504=-3 (Pocket Depth
#505=120 (Feedrate
#506=3 (Stepover

M98 P9002

M5
G91 G28 X0 Y0 Z0
G90
M30
CircularPocketSub.FNC
O9002
(Circular Pocket Sub-Cycle)

(External Variables Required...)
(#502 = Pocket Radius)
(#504 = Z depth)
(#505 = feedrate)
(#506 = step over)

(Read starting X,Y position
#500=#4101
#501=#4102
(Internal Variables...)
(#101=Current X Pos
(#102=Current Rad
(#103=Current Z Height
(#105=plunge rate (feedrate / 2)
#100= #500 + #502
#101= #500
#102= 0
#103= #4103
#105= #505 / 2

(Goto Centre and feed down:
G00 X#101 Y#501
G01 Z#504 F#105
F#505

N9110
(Add stepover to current rad
#102 = #102 + #506
(Check current rad not bigger than target
IF [#102 GT #502] THEN #102 = #502
#101=#500+#102
G01X#101
G02X#101Y#501I-#102J0
(Drop out if this was the right radius
IF [#102 EQ #502] THEN GOTO 9130
GOTO 9110

N9130
G1Z#103
M99

Post Reply