Virtual Machine
Virtual Machine
Virtual Machine
G0- Rapid
G00- (I hope you already know this one!)
A new feature is also available. G0Z0,I.1 . This is in-position
check. This might be used to save time not needing accuracy during
rapid motion. If you use 'G0 Z' without ',I' then rapid is back
to normal.
G1X.4Z0F.002 or G1X.4Z0F.002
G2X.5W.05R.05 G2X.5Z.05K.05(center of rad is .05 over in
Z)
G1Z__ G1Z__
Circle Example...
When milling with or without cutter comp(G41/G42), the feed rate
given is not true. To get a proper feed rate you have to
calculate
using the radius desired and the tool radius. Cutting outside
corners are different then inside pockets. Use this formula...
Outside cutting:
DesiredFeed=10 IPM CutRadius=.25 ToolRadius=.125
Feed=DesiredFeed * ((CutRadius+ToolRadius)/CutRadius)
Feed= 10 * ( .375 / .25)
Feed=10 * 1.5
Feed=15
G19
G41G1Z.5Y0 F10.
G2Z.5Y0K.25 F15. (CUT A CIRCLE F15.=F10. at cutting point)
G1Y-.1 F10.
G40
G18
G19
G42G1Z.5Y0 F10.
X??
G2Z.5Y0K.25 F5. (CUT A CIRCLE F5.=F10. at cutting point)
G1X?? F10.
G40
G18
X = X position to go to circular
Y = Y position to go to circular
Z = Z position to linear or if using P then set Z to one pitch.
I = Center of hole from X in radial value.
J = Center of hole from Y in radial value.
P = Number of pitches or threads. Whatever Z is times P
F = Feed rate to cut.
You can also use G10 to set parameters. Please see the Mitsubishi
manual for more details.
There are some new options while calling G12.1. We used to have to
change parameters to use G12.1 #1125 Mill_AX and #1126 MillC ,
now
we can set these while calling G12.1 . See also G16 below.
G12.1 D0 E=C
D0 -You can use "C" or "Y" as the virtual axis while in G12.1
The manual suggests using "D1" to use "C" but I don't
agree.
If in G17 X-Y plane, then I suggest you use "D0" to use Y".
Your choice, it makes no difference which you use! If D is
not on the G12.1 line then "C" is default.
Always have "D" first on the G12.1 line!
E=C -This will set the axis number of the system to use as the
polar axis. This depends if you are using the gang plate in
$1 or the U121B option in $2 or $3. Setting E=C will set
the
proper axis automatically. If you don't use E=C on the line
then
$1 C axis is default. For safety, always use E=C
G16- Plane select Y-Z cylindrical machining. To use this plane you need
the
option of G12.1 milling interpolation. G16 is used to convert polar
C axis degrees to linear Y when machining "J" slots or cylindrical
cams. Most of these part prints are dimensioned with linear and
radial
values, not degrees. Also the prints usually show the part cut and
spread flat. Radii are hard to program and adjust without G16 and
tool
nose radius comp. G41-G42. Programming would be linear "Z Y".
The polar "C" axis is converted to a linear "Y" axis. Another use of
G16
is to chamfer a cross hole equaly all the way around the hole.
G16C.15
C= Position of X axis to calculate from if the actual cutting
position is different. This is in radial value. C.15 = X.3
(MILL A J SLOT Sample program not tested yet but should work)
T1100(.125" cutter / 1/2"bar/ to cut .156 slot)
(M5)
M18C0
G98M80S3=2500
G50W-.59
G0X.6Z-.1T11
X.3(to depth of J slot)
G12.1 D0 E=C
G16 (C.15)
G41G1Z-.02Y.078F6.
G1Z.1,R.02(or use G2)
Y.187
G3Z.256K.078
G1Y-.078,R.078
Z-.02
G13.1
G40G0X.6Y0
G50W.59
G18G99M20M82
G17- Plane select X-Y -When viewing this plane from the guide bushing you
need to be looking from the spindle to the GB and this is difficult.
So
swap your G2/G3 and G41/G42.
G18- Plane select X-Z normally used. G18 is when power on. View looking
at
The GB
G19- Plane select Y-Z. View looking down from milling tools at the GB.
G28- Automatic reference return. Usually use the incremental command for
each axis. "G28 U0 W0". You probably won't use G28
G32- Threading- G32 locks the feed-rate override at 100% and turns off
the single block mode. Then G32 looks to find an exact spot on the
spindle to start feeding. G32 is canceled by a G00 command. It's
uses are for multiple angle threads (bone screws, worm gears) or
we commonly use G32 when we tap a part with the main spindle, or the
PO spindle. G32 won't work on the secondary spindles because there
is no encoder on S3 or S4.
G32 can also adjust the spindle zero for double start threads.
G32 Q180. =180 deg from spindle zero.
X= Position to go to in X
Z= Position to go to in Z
F= Feed rate in IPR
K.05= Amount of change in pitch per revolution. Can be growing pitch
if plus value or reducing pitch if minus value. First rev will
be F.03
2nd rev is (.03+.05) 3rd rev is (.08+.05) and so on.
G40- Tool nose radius compensation CANCEL. Turns off G41 or G42
G41- Tool nose radius compensation LEFT. Usually used when front
turning on Cincom machines in a Z positive direction. There are 8
sections of the radius to be used.
1= Boring
3= Back turning
4= Front turn (see manual for details)
8= Profile
0= Endmill
G42- Tool nose radius compensation RIGHT. Not used as often. G42
could be used when traveling in a Z negative direction. See G41
G43- Feed per revolution in $2 on S1. IPR and CSF is read off of the main
spindle. This is used when in G620 and programming from $2 but
feeding
IPR to S1. The default is G43 so feeding in $1 and $2 is IPR off the
main spindle.
G44- Feed per revolution in $2 on S2. IPR and CSF is read off of the sub
spindle. Used to single point thread with the pick-off spindle, tap,
or any IPR feeding needed to be done from the S2 spindle. This code
is
unique to each side $1 and $2. Probably you will only use G44 in $2
because you normally don't need to feed from S2 on the front side
program unless using G600 and TxxxxK2.
$1 $2
G44(G43 is default)
G99
G99 M23S2=1000
T0200 T3100
G0X Z T G0X.27Z-.05T31
G1 Z1.F.002(READ OFF S1) G92X.3Z.4F.05(READ OFF S2)
X.31
T0300 X.32
G0X Z T X.33
G1 X Z F.001 G0X.27
G43 (NEEDED IF USING G811/G620
DRILLING)
G50 W-.59 shifts the coordinate system over for temporary use then
it
would be shifted back by G50 W.59 after tool is
finished.
The ",F" is a new feature that enables a feed rate command for G53.
If used the ",F" is a one shot feed rate cammand, not changing
modal "F".
G65 P8999 A.05 B.03 C.02 S0 R-.03 Z1. W.01 F.0005 D.5 E3.
X-AXIS A,B,C,U IN RADIUS VALUE S,R,X IN DIAMETER VALUE
G65 P8999 A.05 B.03 C.02 S1. R1.1 X.1 U.01 F8. D.5 E3.
A. FIRST PECK
B. SECOND PECK
C. THIRD AND ALL FINAL PECKS
S. START POINT
W/U. RETURN POINT (RAPID IN)
Z/X. ENDING Z POSITION OR X POSITION
R. RETREAT POINT (OUT OF HOLE)
F. FEED RATE
D. DWELL
E. DWELL EVERY ? PECKS
G66
G66.1 Special modal macro commands. See the blue Mitsubishi manual.
G67
Q.01 =Amount of the first cut. All the rest of the cuts are
calculated.
G80-Cancel G8? series codes. If only using G83 we don't need G80
Setup1 Param "G83 Retract .02" is the amount to rapid back into the
hole from the last peck for clearance.
I suggest...
Setup1 Param "G83 Retract"=.02
Control Param #8125 "G83 Rapid"=OFF
Example-
G0 Z-.05 T22
G83 Z1. F.001 R.03 Q.04 P0
P0 =Dwell amount at the bottom of the hole. You can just leave
P off the command line if you want
K4 =If face off center drilling use K for the amount of holes
Just leave K off the command if only one.
,F30= This was added! Now you can change the rapid moves to a feed
if desired.
G84-Rigid tapping. Main Z1-S1 or sub Z2-S2
T2300
M97
M3S1=500
G0x0Z-.05T23
G84 Z.5 R.03 D1 F.05 S500 ,R1
G80
or
or
or
S500=RPM
,F30= This was added! Now you can change the rapid moves to a feed
if desired.
T800
M82
G50W-.59
G0X.8Y0Z1.5T8
G88 X0 R.05 F.05 D3 S500 K4 H90. ,R1
G80
or
T800
M82
G50W-.59
G0X.8Y0Z1.5T8
G88 X.4 R.05 F.05 D3 S500 K4 H90. ,R1
X0 (,R1)(second peck tap)
X-.4 (,R1)(third peck tap)
G80
S500 =RPM
,F30= This was added! Now you can change the rapid moves to a feed
if desired.
SPINDLE S1-$1
SPINDLE S2-$2
G98- Feed commanded in Inch Per Minute designation. IPM used for milling.
IPM=RPM*IPR
G814-Same as G114.1 but you don't need all the codes on the
command line. You can use the R command for phase shifting.
Citizen added this macro just to make it easier to use spindle
sync. See G114.1 and G113. You may save time by not using G814.
G814 even with no 'R' argument will internaly use 'R0' and this
will force a phase shift for spindle sync, needing also to use M77.
To save time use G114.1 without the R value.
G114.2 H3 D1 E3 L6 (R15.)
$1 $2
(TURN CUT OFF SAME TOOL) T3000
G650 G650 Z-.1(SUPERIMPOSE Z2 TO Z1)
M24S2=4000M16
G0X.5Z.45T1S1=4000 G115 Z1. !L10 (WAIT FOR Z1 TO PASS POS
1.000)
G1X.4Z.5F.002 G1Z.75F.02(FEED Z2 OVER PART .75)
!L10 M15
Z1.3 G600
(G231)
X-.1 M25
G600
G116 puts into memory a queue but instantly starts the next
machining
command. When the position is met in the same system then a queue
is
sent to the other system to continue.
$1 $2
G1 X.2 Z.5 !1!2L10
G116 Z1. !1!2L10 (Z1. is greater than Z.5 and less than Z1.5)
G1 Z1.5 F.001
Z1. = let queue begin when Z axis of the programming line that G116
is in reaches Z1. while still moving to Z1.5 . Also position
Z1.
has to be passed on the next CNC command line.
Example... getting P.O. spindle over the part while still turning.
$1 $2
(TURN CUT OFF SAME TOOL) T3000
G650 G650 Z-.1(SUPERIMPOSE Z2 TO Z1)
M24S2=4000M16
G0X.5Z.45T1S1=4000 !L10 (WAIT FOR Z1 TO PASS POS 1.000)
G1X.4Z.5F.002 G1Z.75F.02(FEED Z2 OVER PART .75)
G116 Z1. !L10 M15
Z1.3 G600
(G231)
X-.1 M25
G600
G140-Arbitrary Axis Change Command. Normally not used. G140 will assign
which
axis are programmed in each line $1-$2. Following is an example to
move control of "C" axis to $2 and back to $1 again. Any axis can be
called any name and used in any system. Very powerful!
$1 $2
!1!2L10 !1!2L10
G140X=X2Z=Z2C=C1
(programming C)
!1!2L20 !1!2L20
G140X=X1Z=Z1Y=Y1C=C1
(programming C)
G141-Cross Machining cancel. If you used a small sub with G140 to change
all
the axis around, you can use G141 to set it back.
$1
(before has X1-Z1-Y1-C1)
G140 X=X2 Z=Z1
(has X2-Z1)
G141
(has X1-Z1-Y1-C1 again)
$1 $2
!1!2L10 G149 Q100 X.1 !1!2L10 Q200
G1 X.3 F.002
BN100 G1 X-.1 F.002 BN200 G1 Z3. F50.(BN200 done when
X1=.1)
G156- Mirroring two axis. Used automatically in G821 to lock Y1 to X2 so
the drills can't hit the turning tools while using T2?00 stations.
You won't normally use G156. If you don't command the other axis,
it
just follows.
G156 Y1=X2 ON
G156 Y1 OFF
G156- Superimpose one axis onto another. G811/G650/G620 uses G156 to make
the Z2 axis follow Z1. You normally won't need G156. If you command
the other axis, it follows but also move simultaniously.
See also -G620/G650
G160- Axis torque sensing command. (normally not used) This is used
internally by
Citizen for the auto collet adjusting and auto guide bushing
adjustment.
Possible uses could be to check the Z2 torque while positioning
over the
part when picking off. If the turning tool has failed and the size
is big,
the collet could jam on to the part! G160 will feed to the desired
position at the commanded feed but if the torque is reached the
axis will
stop short of the commanded position. We can then use macro to
determine
where it stopped. G160 is a one shot code and after G160 is done or
if the
torque was met, then 100% of torque is set back to the commanded
axis. I
tested and I used G160 with a shank of a tool and checked the
turned size
of a part and had .0003" repeating! Maybe this is not good for all
jobs
but could be used as part of an auto offset macro!
G160 will not work on a superimposed axis. So if you have a CAV, A7
is
superimposed on Z1 and G160 can not be used on Z1. Instead just use
Z2
for the motion if needed.(no problem)
N10(GO ON)
N3300(GUNDRILL-OK/PRE-DRILL-OK)
M182S5=0
G164 H1 D-5(5= optional spindle on T31-35 U153B)
G84 Z.2 F.0312 D6 S500, R1 (500 is 500 more than currant)
G80
G113
Here is a second example using a hole that starts off center in X and
we
used a G50 after G173 to make the hole start location (X0,Z0). Also a
creative way to use an offset.
(M316 example)
M18C180.
G610(Z-.560) G610 Z-.56
T2400
G612
T600(PRE-CALL-.156 MILL)
(T2400)(MSA-103 set 15-DEG)
G50U-.3886W0
(W0 because the tool extended past Z0 and was adjusted in the G610
Z-.56)
G98M83S4=6300
G0X1.Z.4T24
G173X.1342Z.5925D14.(X and Z are the start location of the hole
X=diam)
G50U-.0671W-.5925
(the pos= X.1342 Z.5925 but now X=radial so G50 to make hole X0,Z0)
(OFFSET)
#100=34(34= offset data we want to use for angular offset)
#101=#[11000+#100](get X offset)
#102=#[15000+#100](get Z offset)
G50U-[#101]W-[#102](G50 as to move the system like an offset but
inside of G173)
G0Z-.1
X0
G1Z.07F2.
G0Z-.05
G83Z.5Q.15F7.(if Z.5 needs to move deeper or move X location, use
Offset 34)
G80G0Z-.1
G50U[#101]W[#102](shift back like offset cancel)
G610 G610
Example...
$1 $2
T100(cut-off)
G50W-.125
M3S1=3000
G0X.5Z2.T1
G50W.125
G650 G650Z-.1
G600- Cancel all G6xx commands. Also G600 is the default mode before the
program starts and after the G999 command at the end of the
program.
G600 will queue with both lines $1-$2 then X1-Z1-Y1-C1 are now
controlled from $1,and X2-Z2-C2 is controlled from $2.
$1 $2
G600 G600
G610- Machining mode change to use the three drill stations T21-T23 in
the
$1 programming line. G610 will queue with lines $1-$2. All the
programming
is done in $1 and $2 must wait on G600. This replaces the L51620's
G821
command because G610 works deeply with the first T2x00 call to move
Z2 in while
changing the mode. This saves 1 second per use! X2-Z1-C1 are now
used in $1.
Because M140 is not used, you can use 'T2200 S-1.' on the first
T2x00 to change
the position of Z2 when brining in the drills.
Example...
$1 $2
T2300(Drill)
G1Z.5F.002T23
G0Z-.05
G600 G600($2 takes control of
T21-T23)
G50Z0(safety resets Z2
position)
G620- Machining mode change to superimpose Z2 onto Z1 . G620 will queue
with lines $1-$2 then make Z2 follow Z1 but Z2 can also be
programmed
independently. Example if we are drilling while turning.
Example...
$1 $2
G630- Front Back paralle machining mode. Basicly G630 is the same as
G600.
But G630 will start moving X2Z2 before X1Y1 are finished. During
the
next T-code in system1 X2Z2 move saving time. This saves about .2
seconds from using G600! G630 will queue with both lines $1-$2 then
X1-Z1-Y1-C1 are now controlled from $1,and X2-Z2-C2 are controlled
from $2. You can not command Z in $2 until after T3x00.
$1 $2
G610 G610
T2200
"
"
G0 Z-.05T0
G630 G630
T300(X2-Z2 moveing also) T3200
G0 X Z G0 Z-.05 T
Example...
$1 $2
G600 G600
G650 G650
G0 Z-.1(bring Z2 to
Z1 -.1)
!1!3L650 G1Z1.F.05(feed over)
G50W-.125 M73M15(close collet)
(moving Z1) !1!3L650(let $1
continue)
"
G1X-.1F.001(or G231)
(G231)
G600 G600(bring Z2 back)
G50W.125 M25
S1=1500
M7
G0X-.1Z-.005T0
M56
G999 G999
N999 N999
M2 M2
M99 M99
G660- Machining mode change to use the front ID tools (T11-T13) and also
the back side T51-T53) at the same time. G660 will queue with both
lines $1-$2 then set auto queuing between tool calls of T11-T51,
T12-T52, and T13,T53. After G660 $1 controls X1-Y1-Z1-C1 and $2 has
Z2-C2. The Z2 position is set to program the sub spindle part zero
to the back side drill zero.
Example...
$1 $2
G660 G660
T1100 T5100
G50X0 (needed to
add)
G0 Z-.05 T11 G0Z-.05T?
(peck drilling 8 sec) (peck drill 15 sec)
G600 G600
G999- Finish last part. Finishes the part in the P.O. spindle if you are
running in SINGLE CYCLE MODE. While the machine is running usually
the work on the P.O. spindle is completed while the front of the
part
is also working. When the counter is full or the bar stock is empty
or
if we are in ONE CYCLE MODE then we can finish the part by using
G999
and N999 in our program. If in regular CONTINUOUS CYCLE MODE then
the
CNC statements between G999 and N999 are skipped but if in ONE
CYCLE
MODE or the counter is full or there are other operator alarms then
the CNC statements between G999 and N999 are read and performed.
G999
has to be in all programming lines $1 $2. If using G999 and at some
time you want to turn off this function then turn off soft key in
auto
mode "Lastprt" and the codes between G999 and N999 are always
skipped no mater what MODE your in. Mode G700 is in affect at the
beginning of G999 by default. The code "M98 H_" was developed for
this command. See "M98 H"
$1 $2
M98H1
M56
G999 G999
M5M53 M98H1
T3000
N999 N999
M2 M2
M99 M99
N1
"(CODES FOR BACK WORK)
M99
!1= line $1
!2= line $2
Example...
O1234(queuing example)
$1 $2
GSE3010 Block (this has many options of tooling, double holders use
R1)
T1100,T1100R1, back=T5100,T5100R1
T1200,T1200R1, back=T5200,T5200R1
T1300,T1300R1, back=T5300,T5300R1
T1400, back=T5400
T200 -This rapids above the bar stock (longest tool) then
positions tool
station 2 above the stock waiting for the next command.
Special options...
T0202 X.2 Z.3 -This first rapids above the bar stock then goes to
a
position of X.2 and Z.3 and turns on offset #2
while
indexing to T200.
T5200 X.2 Q3 -Q3 will force Z2 axis to go home for the tool
change.
If ommitted Z2 moves back 5mm or .1968" first,
then indexes
the tool.
T5200R1 -R1 is used to call the 2nd tool of a dbl holder
on the
GSE3010 block. R1 is the outside tool.
T2300 W-.1 -If in G620 mode and W is NOT on the line Z2 goes
to home position first then indexes and comes
back
in to work. If W is on the line, Z2 goes to W
amount incrementaly.
T2100 S-1. -If in G610 mode and you have a shifted tool (the
tool
is set diff. from normal tool set zero) it may
hit when
using G610 and T2100 high speed positioning
function.
Use the S argument to change the position of Z2
when calling
up this tool only used on the first T2x00 tool
after G610.
Note- Any other codes must be before the T command on the line. Also if
you are using G96 you must cancel with G97 before any T????
command.
T303
G96 S250
"
"
G1 X.025
X.5 A30. (control calculates the Z position)
Z1.
G1 Z.7
Z1. A10. (control calculates the X position)
X.625
,R- Put a radius on the part but the control does all of the
calculations.
X.2 F.004
G1 X.5 E.001 ,R.015 (The radius feeds at F.001)
Z1. (feeds at F.004)
G2 X.5 Z1. R.1 F.002 E.001, R.05(The G2 feeds at .002 and ,R feeds
.001)
G1
(END OF PROGRAM)
E0 (Setting E to 0 will make the default feed of chamfer back to
modal F feed)