This is the first time I am attempting to edit a post processor so I would really appreciate some help=)
The lathe is a Mori seiki SL3B with Yasnac 2000B and it uses extremely limited code. Here are the main areas where it differs from generic Fanuc lathe G code;
1. No program numbers or other header info.
2. G50 plus each tools Z and Z WCS instead of a G54's.
3. X plus direction is negative i.e G1 X-5000 will produce a 50 mm diameter part.
4. No comma or dots are used and only two decimals are allowed in metric system or three in english system. The only exception is an extra allowed decimal for E in precision thread lead.
5. Extremely limited number of G and M codes. Is there a way to "block off" codes which the control can't use?
6. In G76 canned threading there is no "A" for thread angle or "P" for changing infeed method.
7. There is no G28 or similar to return to home. Instead the tools WCS is typed in a G00 move.
8. Normal spindle rotation needs an M4 and reverse needs an M3.
I am sure there is more, but if I could get the above sorted I could at least generate code from MC which would be faster to edit.
Here is an example of a hand written program containing a few lines, arcs and an M40x2 canned thread cycle to illustrate.
N001 G50 X-12006 Z15010 (THE WCS FOR TOOL 3 IS 120.06 MM DIAM. IN X AND 150.10 MM IN Z)
N002 G00 T303 M42 (THE TOOL OFFSET IS ONLY USED FOR TIP WEAR COMP.)
N003 G96 S120 M04 (THIS IS NORMAL SPINDLE ROTATION)
N004 G00 X-1500 Z500
N005 G01 Z0 F50
N006 X-2400 F15
N007 G02 X-4000 Z-800 K-800 (COUNTERCLOCKWISE ARC)
N008 G01 X-1800
N009 G03 X-6000 Z-2800 I-1000 (CLOCKWISE ARC)
N010 G01 X-7000
N011 G02 X-8000 Z-3300 K-500 (COUNTERCLOCKWISE ARC)
N012 G04 U200 (2 SECOND DWELL)
N013 G00 U-500 (PULLS 5 MM DIAM. AWAY FROM WORK PIECE)
N014 G00 X-12006 Z15010 T0300 (THIS CANCELS WEAR OFFSET AND RETURNS TO HOME)
N015 G50 X-12543 Z15898 (THE WCS FOR TOOL 4 IS 125.43 MM DIAM. IN X AND 158.98 MM IN Z)
N016 G00 T404 M41
N017 G97 S450 M04
N018 G00 X-5000 Z500 M23 (CHAMFER ON)
N019 G76 X-3754 Z-1500 I0 K123 D38 F200 (IF E IS USED FOR PRECISION LEAD THREE DECIMALS IS ALLOWED)
N020 G00 X-12543 Z15898 T0400 M24 (RETURN AND CANCEL WEAR OFFSET AND CHAMFER)
I am sure fixing all this is difficult, but if I could only figure out how to ad the minus to X and get the arcs correct it would mean I could use master cam for nose raduis compensation and get all the main moves done. The rest is eaiser to edit by hand.
Any help or ideas would be fantastic!
Last edited by Andy Fritz; 04-20-2011 at 12:01 PM. Reason: Typos