Citizen Mcode
Citizen Mcode
K16F K16EVII
M00- Program stop. Force the program to stop. Press Cycle start and the
program
M0- starts again.
M03-
M3- Main spindle forward rotation "M3 S1=1000" If commanded wrong "M3
S1000"
without "S1=" then the main spindle is commanded by default.
10000 RPM max 200 RPM min
M04-
M4- Main spindle reverse rotation "M4 S1=500"
M05-
M5- Main spindle stop
M06-
M6- (macro) Collet close (main spindle). Use it alone on the line
because it is a macro!
M07-
M7- (macro) Collet open (main spindle). Use it alone on the line!
M08-
M8- Short cut program. Used when using a bar loader. M8 shifts control
of the BLOCK DELETE button to the bar loader end of bar switch. This
lets one section of a program, or a sub-program, run only if the end
of
bar switch on the bar feeder is tripped.
Main Program
M9(beginning- safety)
"
" O8000(BAR CHANGE SUB)
G1X-.1F.002(CUT-OFF) M3S1=300M53
M8 G0 X#814+#815 W-2.(Z OUT OF GB/X ABOVE
STOCK)(or X.85)
M8(CONFIRM M8) M54(STOP BAR PUSH)
/M98P8000(if EOB) M7
M9 M55(START LOAD/WAIT UNTIL DONE)
M6
M3S1=#817(or S1=any RPM)
(M26) (ONLY IF HEX OR SHAPED STOCK)
G99G1W2.F.01
M52
X#824F#822(or X=-.1 F=.002)
M99
M108-(macro)
This has the same function as the B12 series machines
Used when using a bar loader. If the loader sends a signal that the
bar is done then the remnant is de-burred, pulled out, and a new bar
is loaded. If the bar is still there then M108 is skipped. The RPM
and IPR are taken from the Mach Data for the cut-off opperation.
M108 U.04 C.005 D.04 B.23 S1000 W1.5 F.02 A1. R1 K1 M1 T
-CDB are used only if de-burring the remnant before removing from
GB.
U.04 = Amount above the stock size from the data page, to position
before changing bars (diam value)
C.005 = Feed in IPR(mm/rev) for de-burring.
D.04 = Z axis movement for de-burring.
B.23 = X axis position to go to for de-burring.
S1000 = Spindle speed used while pulling out remnant.
W1.5 = Z axis amount of pull back from GB to remove remnant.
F.02 = Feed in IPR(mm/rev) for pulling out of GB.
A1. = Dwell after bar load before closing collet.
R1 = R1 or R0 If R1 then spindle runs during bar change.
K1 = Use K1 to keep the coolant on ommit to tuen coolant off
M1 = Use M1 to perform phasing for the GB and spindle
T1 = Dwell time in seconds to allow the coolant to come on. If
omitted 3 seconds is used.
-If any or all options are omitted then default values are used.
If all defaults are OK, you can use M108U W S F R1 alone on the
line.
O1234(MAIN PROGRAM)
M9
G99/M52
M6
G4U.5(SOME BARLOADERS)
G50Z-.005
""
""
T100(CUT-OFF)
G50W-.094
M3S1=3500M24S2=3500
G0Z.5T1
G650
!1!2L650
G231X-.1A-.03F.001
G50W.094
(STILL NEEDS TO BE TESTED BUT SHOULD NOT NEED M8 M8 / )
(M8)
(M8)
(/)M108 S200 W1.5 F.02 A1 R1 T1(S = less than 2000)
M9
M7
G4U.5(SOME BARLOADERS)
G0X-.05Z-.005T0
G999
(M6)(SOME BARLOADERS WANT THE COLLET CLOSED/NO DWELL IS NEEDED HERE)
N999
M56
M2
or
This style of code is from the manual and will also work but the
'M8 M8 / ' is not needed.
M8
M8
/M108 S200 W1.5 F.02 A1 R1 T1(S = less than 2000)
M9
M09-
M9- Cancels M8. Returns control of the BLOCK DELETE to the BLOCK DELETE
button. If using M8 then put a M9 at the beginning of your program as
a safety command if starting the program after a problem bar change.
M10-(macro) Moves the knock-out rod forward to eject the part from the
back
spindle. If the back spindle is running or the collet is closed M10
won't work. M10 moves an air cylinder to performe the knock out.
M3S1=3500
T300
G4U.5
M12
(rest of program)
M16-(macro) Back spindle collet open. If in spindle sync and the spindle
speed
is still changing, the M16 will wait for the spindles to reach speed
before
opening.
M18-(macro) (only with "C" axis option) References the "C" axis and goes
to
position specified. Only used if simple indexing in 1 deg increments
and
to enable the axis.
M20-C-Axis off. But not needed as M3/M4/M5 will turn off C-Axis also.
M26-G/B phase adjustment. Used in the sub program when using a bar loader
with hex or odd shape stock. M26 will line up the spindle and the GB
so when the stock is pushed into the GB it is lined up properly.
See M8. "Phasing" in preperation is used with the hex chuck sleeve to
set the
GB zero position with the spindle 0 position. The hex chuck sleeve is
an
option.
M320 -nothing else on line then catcher move up to catch part with
default positions. This usually works fine.
X.2 -When X1 gets to .2 then bring the catcher up. Less chips
in the catcher.
W -After the part is caught then the catcher moves back to Z0
or the amount of W from Z0. Used if Parts per 1/chucking is
used to save time. Normally not used.
U -Used to change the position of X2 . 24.881 positions the
catcher into a standard position. Normally don't use.
Z -Used to change the position of Z2 . 5.708 positions to the
GB.
Normally don't use.
R -"1" or "0" If "1" then Z2 positions back a little to
accommodate
for a left hand cut-off tool. You could use Z instead of R.
Normally not used.
F -Feed rate for the Z2 axis. Usually rapid so don't use.
$1 $2
(No T3?00 in $2 or $1 M34 won't work)
G600 G600
"
T0200(ANY GANG TOOL)
M34(dump part/ see M34)
"
T0100(CUT-OFF)
G50W-.094
G0X1.1Z1.T01
(if chamfer put here)
M320X.2 (catch part when X=.2)
G1X-.1F.002
M141(MOVE Z2 BACK)
G50W.094
G600 G600
G50Z0
$2
M33 (position to dump)
G0Z1.279(33mm move into parts
chute)
M16(open PO chuck)
M10(knock out)
G4U.2(confirm M10)
Z0M11
M34-(macro) Series of commands needed for parts ejection from the P.O.
spindle all in one command. Collet open, parts catcher in/out, knock
out
forward, air ect. This can be commanded from $1 or $2 but has two
very
different functions. If M34 in $1 then dump the part from the catcher
mounted on the sub spindle. If M34 from $2 then eject the part from
the
sub spindle into the parts box. There are many command options that
can
be used but usually just "M34" is all you need. See the different
command options below.
If M34 from $1 and the part is in the catcher basket by using M320 then
...
You must be in G821 mode. See M32. Also there can't be any "T3?00" in
the $2 program or M34 will function like in $2 and try to knock out a
part.
M34 W D U E Z F T S B X
M34 -nothing else on line then catcher moves away and dumps the part.
M34 -nothing else on line then catcher moves away and ejects the
part.
M48-(macro) Back spindle "C" axis on. (only with "C2" axis option)
References
the "C" axis on the PO spindle and goes to position specified. Only
used
if simple indexing in 1 deg increments and to enable the axis.
M48 C0
G1 XYZ
M48 C180.(M48 issued a G0 C?? internally)
XYZ
M50-Check cut-off tool breakage by spindle RPM. You command the main
spindle
and then use M50. M50 will check if S2 is turning, if so then alarm.
If
you don't have spindle sync. then you need to free wheel the sub
spindle
or you get alarms just turning the spindles off.
T0100 T3000
G0Z2.T1 G50Z0
M3S1=300M24S2=300
G114.1H1D-2
G650 G650Z-.1
!L1 G98G1Z.5F50.
S1=3500 M77
G1X-.1 M15
M5M25 !L1
G113 G600
M3S1=100 G50Z0
G4U1.
M50(IF S2 IS TURNING THEN CUT-OFF IS BROKE! ALARM)
(ELSE IF S2 NOT TURNING THEN OK, SKIP OVER M50)
G600
M5
T0100 T3000
G0Z2.T1
G650 G650Z-.1
!L1 G98G1Z.5F50.
M3S1=100 M15
G4U.7 !L1
M3S1=500 600
G4U.7 G50Z0
M3S1=1000
G4U.7
M3S1=1500
G4U.7
M3S1=2000
"
"
G1X-.1F.001(CUT-OFF PART)
M5M25
G4U2.
M3S1=300
G4U.5
M50(IF S2 IS TURNING THEN CUT-OFF IS BROKE! ALARM)
(ELSE IF S2 NOT TURNING THEN OK, SKIP OVER M50)
G600
M5
$1
G50Z-.005
M6
M51 Z-.02 X.3
M52-Coolant oil ON
M55-Bar loader material replace -Tells bar loader to load a new bar.
Then waits until the new bar is in position. See M8.
M61-
M62-
M63- EXTRA M-CODES FOR SPECIAL CUSTOMER USE
M64-
M65-
B1- B1 to B256 are also available if using a PLC to read the signals.
With M61-M65 there are 5 possible functions. B has 256!
M72-Back spindle air blow ON -clears chips from P.O. collet surface.
M86-Cutting block start interlock ON. Used to save time by not waiting
for Spindle codes completion.
M87-Cutting block start interlock OFF. This will wait for S1 to reach
speed.
M88-Interference checking OFF. Safety zones of all axis are turned off to
work very close to the back spindle collet. (Be careful)
Don't just command in the beginning of your program!
M98-Sub program call. If commanded "M98 P1111 L5" from line $1 of a main
program then the line $1 of sub program O1111 is looped 5 times.
If "M98 P1111" is in line $2 of a main program then program line $2
of program O1111 is looped only one time. When the sub is finished
M99 returns to the line after the M98 command in the main program.
There is one other option to M98. "M98 H1" This command jumps down
in the programming line you are in to sequence number N1 and returns
when M99 is commanded, to one line after the "M98 H1" command. This
is
special to make the G999-N999 command easier. Search G999- Also if
you
use sub programs a lot, this helps to only have one program number to
upload/download for your file storage system.
-A new argument ,D1 allows to call a sub program stored on a flash
card!
M98 P H L ,D1
$1 $2
G99M52
M98H1 (goes to line sequence # N1)
(M99 returns to here)
M56
G999 G999(only if in one cycle mode)
M98H1 (goes to line sequence # N1)
N999 (M99 returns to here)
N999
M2
M99 M2
M99(returns to beginning of $2)
N1
T3100 (CODES NEEDED TO COMPLETE THE PART)
T3000
M99(return to line after M98H1)
M99-If commanded in sub program then return from sub program to main
program. If commanded in the main program then return to the
beginning.
If using "M98 H1" then return to the line after "M98 H1"
Also:
M99 P100
P= Return to a diff line number in the program that had the M98
call
instead of the line after M98.
M108-
M122-Back spindle torque limit 25% ON. Used with G114.1 to help eliminate
marking on the part from diff. spindle power. 75% of the torque of
the back spindle is cut.
M123-Back spindle torque limit 50% ON. Used with G114.1 to help eliminate
marking on the part from diff. spindle power. 50% of the torque of
the back spindle is cut.
M212- Y1 axis mirror image on. If you have the GSE1110 working on the
front or
face, inside the T1100-1300 call, M212 is used.
T1100
G4
M212
M140 Z-?? If you want to change the position the Z2 axis rapids up
to instead of all the way up. The Z2 position is based
off
of the Z1 axis position's currant location.
M140 W-.5 If you want to change the position the Z2 axis rapids up
to instead of all the way up. The Z2 axis moves to the
Z2 machine position less the W value.
M141 Z-?? If you don't want Z2 to go all the way back because you
want to leave it near the G.B. Z-1. = 1" away from part
based off the Z1 axis position's currant location.
M141 W1. If you don't want Z2 to go all the way back because you
want to leave it in near the GB W1. = 1" away from the
Z2 rear position.
M151-(macro) Gang tool post retract. Move the X1 axis to return position.
After commanding M151 the X1 axis cannot be commanded until after
the
next G600 or G800 command.
M176-Rotary Guide Bushing torque reduction ON. This will set the GB toque
to 0%. This is used if you are getting vibration from the GB motor
holding position servo gain.
M177-Rotary Guide Bushing torque reduction OFF. This will set the GB
toque
to 100% if used M176 above.
M190- C2-C1 superimpose ON. Used to hold parts with both spindles and
be able to move C1 to do secondary work and C2 stays supporting.
Inside M190 is "G156C2=C1"
$1 $2
M80S3=3000
G98
T700
G0X1.1Z2.5+.59 M16
M18C0 M48C0
G650 G650
M72
G0Z-.05
G98G1Z.5F80.
M15
M73
!1!2L650 !1!2L650
M190(C2 follow C1)
G50W-.59
G0X1.1Z2.5T7
"
G0 C180.(or M18C180.)
"
G0X1.1T0
G50W.59
M82
!1!2L651 !1!2L651
M191(off in $2)
M79
M260- oN
M261- OFF
M262- oN
M263- OFF
M264- oN
M265- OFF
M266- oN
M267- OFF
M268- oN
M268- OFF
$1
M350Z800 (800IPM)
T1200(drill)
G0Z-.05T12
G83 Z1. F.003 Q.1
G80G0Z-.05T0
M351(set X1 Y1 Z1 back to full default rapid)
$2
M350Z800 (800IPM)
T3200(drill)
G0Z-.05T32
G83 Z1. F.003 Q.1
G80G0Z-.05T0
M351(set X2 Z2 back to full default rapid)
X1= 50 msec
Y1= 50 msec
Z1= 66 msec