Numeryx Home > User/Programmer

Rollerdie

An-111, Copyright © by Gil Hagiz
Last updated Jun-27-2006
For version 6.02 and higher


Introduction

This application note explains programming tools that are useful for rollerdie makers: projecting an XY program on XA axes while keeping dimensions and vector feed, internal sharp corners cutting, and repetitions. Any XY program can be projected, including engraving and drilling canned cycles.

M12/M13

M12 R_   start projecting Y on A
M13      end Y to A and cancel zero-shift

Definition

M12 and M13 are defined in the machine.cnx file as follows (for A= 4th axis):

[12] Y to A transformation
leader(4,2) leader(2,0)     \A is lead by Y, Y is ignored
gearbox(4,180/Ki/pi/R)      \A ratio: deg/mm or deg/inch
                            \Use negative ratio to reverse A
trans lead, gear            \Start
putplc(78,4)                \4th axis is displayed in graphic
mend

[13] Cancel Y to A transformation
trans off                   \cancel m12
g52 putplc(78,0)            \cancel zero-shift
mend

Programming

Before calling m12, Y must be zero.
Z=0 should be set at the rollerdie surface.
M12 is called with the rollerdie radius given under R. This code works in both inch and metric.
When M12 is active any Y command moves A; Y-displacement and the programmed feed are applied to the surface of the rollerdie. Also the graphic display shows XA rather than XY.
M12 sets Y-zero to current A, which needn't be zero. In the following example Y-zero will be A-180:

g x_ y z_ a-180 m12 R2
M13 is the default when starting a program and after M2 or Reset.
M13 cancels g52 (zero-shift) to leave Y unmodified.
Note: since Y controls A, even if A has automatic rewind it doesn't work unless m12 is canceled.

Feedrate

Rotary axis always uses feed in mm/min as deg/min.
The projection of Y on A converts feed to deg/min so that the programmed vector feed is maintained.
For a roller radius of 57.296 mm (180/pi, 2.2557") one mm at the perimeter is one degree. For a larger radius A turns slower and for smaller radius A turns faster. Based on the max programmed feedrate, if an axis reaches the feed limit all axes slow down to follow the programmed path.
If constant vector feed is important the programmed feed should not cause X and A to reach their respective limits.

M60/M61

M61 start internal corners
M60 end

Definition

M60 and M61 are defined in the machine.cnx file as follows:

[60]
putplc(77,0)
mend

[61]
putplc(77,TR*Ki+1)
mend

Programming

With m61 active, at every internal corner the tool stops and then moves to the programmed corner while Z goes to Z=0, then back. The motion is interpolated so that the tool remains tangent to both sides of the corner. This function covers all corners – line-line, line-arc, arc-line, arc-arc.
M61 doesn't affect external corners so if desired it can be turned on at the beginning of a program.
M60 is the default when starting a program and after M2 or Reset.


Repeat

Repeating a pattern in XA is done by a dual loop that does the calculations.
The variables can be entered via a menu program and later saved/recalled to/from a disk file.
Even the shape to cut can be selected from a menu and since it is a simple XY program any user can build his/her own library of shapes.
The following example requires assigning values to 4 parameters.
\#10 roller radius
\#11 X center to center
\#12 repetitions in A
\#13 repetitions in X

m3 s5500 
g y z.1 a m12 R#10                     \start Y to A

for #2=1 to #12                        \repeat along X
  for #3=0 to #13                      \repeat along A
    if #3==#13 then break end
    g52 y=gil(0,2*pi*#10) x=(#2-1)*#11 \zero shift

    \xy program

  next #3
  if #2<#12 then                       \skip on the last time
    m13                                \cancel m12 and g52					
    g x#11 y a m12 R#10                \electronically rewind A then resume Y to A
  end
next #2
                                    
g z+.2 m2

Note: M2 cancels M12 therefore M13 is required only if the program continues with direct commands to A.

A Menu Driven Repeat Program

A program, provided by Numeryx, can be used to automate the Repeat process.
Currently the program supports 3 shapes: Circle, Oval and Rectangle. However, the user can add his own shapes.
Upon CS the following menu is displayed:

The user can go up and down the menu as many times as desired and modify the data. The shape is selected from a sub-menu.
Once the data is okay another CS runs the program. It is recommended to run the program in test mode first.
The data is saved in parameters so that running the program a second time doesn't require re-entering the data.
If so desired the parameters can be saved and later loaded to/from a file.

Here is an example of rectangles with round corners.