CNC-Calc Post Processor - Basic Configuration

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Basic con iguration of the CNC-Calc post processor using the Global

variables section

One of the new features in CNC-Calc ver. 7 is the addi of a Post Processor. This makes it possible
for the end user to format the created NC program.

The Post Processors are in Java Script. Java script was selected because it made it possible to
variables with both global and local scopes. It also gives the end user the possibility to declare
and de ne func ons that can be used in ng and calcula The writer of the post processor
has access to all standard mathe al de in standard Java Script and all the
standard features that this language contains.

CNC-Calc and the post processor cooperate to format and create the correct NC program. This
coope is established with various f that are called from CNC-Calc with the necessary
parameters. The parameters are then used to calculate and output one or more lines of code in the
NC program.

At the start of the Post Processor there is a called Globals. This sec contains variables
that enables the end user to gure a post processor to handle the most common setup changes.

The following table lists these variables and describes how they ect the output:

Name Normal Values D


decimalMark ‘.’ Or ‘,’ This variable the decimal mark that should
be used when decimal values are shown.
linebreak "\n" D the character sequence that should be
used to terminate the lines in the NC program.
variableDelimeter "" When more than one variable is shown in a single
line the variableDelimeter nes how they
should be separated.
tolerance 0.02 The tolera ce is normally used in the user
program to de ne the smallest en ty that should
be handled. If for instance a very small circular
movement is made, the controller may mistake
this as being a 360 degree movement.
showSequenceNumbers true/false If showSeque N rs is set to true, all blocks
in the NC program will be fo with a line
number. This is used in the writeBlock
that can be by the programmer.
sequenceNumberStart 10 If showSeque N rs is set to true
seque NumberStart will ne the
number used for the rst block. This is used in the
writeBlock that can be modi ed by the
programmer.

Page 1 of 4
sequenceNumberIncrement 5 sequenceNumberIncrement is only used if
showSequenceNumbers is set to true. The
sequenceNumberIncrement de nes the jump in
block numbers between blocks. This is used in the
writeBlock that can be modi ed by the
programmer.
useRadius true/false Circular moves are normally wr en using the R
(radius) or I, J, and K values (center coordinates).
When useRadius is set to true circular moves it
will use the R value. This is used in the f
onCircular that can be mo by the
programmer.
absoluteArcCenter true/false If useRadius is set to false, the circular moves will
use the I, J, and K values. The value of
absoluteArcCenter determines whether these
values should be given as absolute center
coordinates or re to the start of the move.
This is used in the n onCircular that can be
by the programmer
xDiameterProg true/false This is only in post processors for lathes. The
value of xDiameterProg determines whether the
X values should be output as diameter values. If it
is set to true, the X values will be output as
diameter, otherwise they will be output as radius.
iDiameterProg true/false This is for post processing for lathes only. If
useRadius is set to false, the circular moves will
use the I, J, and K values. The value of
iDiameterProg indicates how I values of circular
moves should be ed. If iDiameterProg is
true, the I values will be given as diameter values,
otherwise they will be given as radius. This is used
in the n onCircular that can be modi ed by
the programmer

In the Globals it is thus possible to take one of the post processors included with CNC-Calc
and make it comply with a given machine.

Page 2 of 4
How to set up backplot to re lect the settings in the Globals section

Figure 1 ISO Milling Setup Backplot

Figure 1 shows the Backplot Con gura for ISO Milling, and we will now see how we need to
change the setup to re ect the variables in the Globals

The only part of the milling setup that can be in uenced by the variables in the Globals is the
Arc Type dr The Arc Type is the dropdown that is shown as dropped in Figure 1 The choice
in this dropdown depends on the Globals variables useRadius and absoluteArcCenter, and in the
table below the values of the variables and the corresponding Arc Type are

Variable values Correct Arc Type Sel


useRadius = true absoluteArcCenter = false Radius Value
useRadius = true absoluteArcCenter = true Radius Value
useRadius = false absoluteArcCenter = false R to Start
useRadius = false absoluteArcCenter = true Absolute Arc Center

In turning there are two more values in the Globals sec on that will ence the setup of the
back Figure 2 below shows the backplot c gur for ISO Turni

Page 3 of 4
Figure 2 ISO Turning Backplot Setup

The ISO turning Arc Type should be selected from the Arc Type dropdown based on the Globals
variables useRadius and absoluteArcCenter, exactly as described under milling. When looking at
turning we also have to consider the regarding diameter programming. In the post
processor, the diameter programming are handled by the Globals variables xDiameterProg and
iDiameterProg. These variables correspond to the elds Diameter programming and Arc Center is
speci ed as diameter. The following table shows how the values of the Globals variables correspond
to the elds in the turning setup.

Variable Values Correct Backplot Setup


xDiameterProg = false Diameter programming is unchecked
iDiameterProg = false Arc Center is speci ed as diameter is unchecked
xDiameterProg = false Diameter programming is unchecked
iDiameterProg = true Arc Center is speci ed as diameter is unchecked
xDiameterProg = true Diameter programming is checked
iDiameterProg = false Arc Center is speci ed as diameter is unchecked
xDiameterProg = true Diameter programming is checked
iDiameterProg = true Arc Center is speci ed as diameter is checked

If the Arc Type dropdown sele and the checkboxes Diameter programming and Arc Center is
speci ed as diameter are checked resp unchecked as described above, the backplot should
show the correct tool paths.

Page 4 of 4

You might also like