What's new
What's new

Developing macros for dual slots

smartcolombyan

Plastic
Joined
Dec 24, 2020
I thought I'd try my hand at creating a macro in cutting two 2 slots outlined in red in the PIC (1). I have an old Matsuura machine with a Yasnac J300 Control. The critical dimension features are the horizontal straight edge distance variable #1 and the innermost width between the slots which is variable #2 . I also thought a little lead in distance #101 would be useful for the cutter comp as well.

REFERENCE PIC (2):

G91;
(MIRROR IMAGE ON);
M95;
( 0 );
(SETTING ORIGIN POINT);
G28 X0 Y0;
( 1 );
G01 X[D1+#101];
( 2 );
G46 G02 Y-[D1+#101];
( 3 );
G01 X-[D1+#101];
( 4 );
G45 G01 X-[#1/2];
( 5 );
G46 G02 Y[#101+D1+#101];
( 6 );
G45 G01 X[#1/2];
( 7 );
G29 X0 Y0;

(MIRROR IMAGE END);
M94;

I was hoping to shorten the code by being able to mirror this path across the x-axis (Repeating Steps 1-7) (PIC 3), but there might be an issue with having to reverse the circular interpolations of G02 to G03's...

Once I have a good working code for one slot, I was thinking of making the slot code a sub program and using the rotation command G68 and rotating it 180 degrees for the bottom slot (PIC 4).

I was hoping to get some tips on how best to tackle this coding project before stopping the machine to test with also keeping the code nice and short due to memory limits.

( 1 ).jpg( 2 ).jpg( 3 ).jpg( 4 ).jpg
 








 
Back
Top