Software CNC Lathe Machine Simulator © Virtlabs Software
Software CNC Lathe Machine Simulator © Virtlabs Software
Software CNC Lathe Machine Simulator © Virtlabs Software
10 Number of tools 8
The software simulates a set of cutting tools (turning tools and drills), including 185
items. The types of replaceable cutting inserts used for turning tools are presented in table 2.
Table 2 – Types of Interchangeable Cutting Plates Used Turning Tools
Letter
Designation Name of the Plate Main Angle
Plate Geometric Shape
According to Geometric Shape in the Plan
ISO13399
S Square 90
T Triangular 60
C 80
D 55
E 75
Rhombic
F 50
M 86
V 35
W Trigonal 80
R Round -
Also in the model, cutters with special thread-cutting plates and drills are used. Figure 1
shows a geometric model of a turning tool.
Figure 1 – Geometrical Model of a Turning Tool and Designation of the Main Characteristics of
an Interchangeable Cutting Plate: Main Angle in the Plan (φ1), Auxiliary Angle in the Plan (φ2),
Diameter of the Inscribed Circle (D), Radius of Rounding at the Vertex ®
GEOMETRIC MODELING METHODOLOGY
In the simulator, a simplified model of shaping the workpiece is used, based on the
assumption that the axial symmetry of the part is constant throughout the entire turning process
[1, 2]. This model excludes the possibility of constructing screw surfaces, and threaded elements
of parts are depicted conditionally - by sections of concentric ribbing. Basic calculations using
this technique are formalized by the geometric problem of intersecting two flat closed loops in
the working plane of the machine — the contour of the workpiece and the contour of the cutting
tool. Based on the shape-forming contour, which is a logical difference at the intersection of the
two source loops, a three-dimensional surface of the simulated part is formed by uniformly
turning the shape-forming contour around the main axis of the machine (axis of rotation of the
workpiece). The applied method makes it possible to simulate the shaping of a part such as a
body of revolution in real time at relatively low computational costs.
The initial stage of the algorithm is the formation of many points Wi of the contour of the
workpiece (Fig. 2.a). In the initial state (before the start of the processing process), the part
contour includes four points, while the longitudinal section of the part is represented by a
rectangle. In subsequent iterations of the algorithm, the initial contour of the part is the
previously calculated shape-forming contour. The contour is described counterclockwise.
At the second stage of the algorithm, the contour of the turning insert of the turning tool
is formed taking into account its geometric characteristics – overall dimensions, the main angle
in plan and the radius of rounding at the apex. The contour of the insert is described by points Cj
in the opposite direction with respect to the contour of the part (clockwise).
W1 W6 F1 F12
С4 С5 F7 F8
С3 I2 F6
W4 W5 F10 F11
С2 F5
F9
С6
I1 F4
W2 W3 F2 F3
С1
a b
The third stage of the algorithm is to determine the set of intersection points Ik of the
original contours. Moreover, the found intersection points are indexed in accordance with how
much closer they lie to the starting point of the part’s contour, and are included in the
generalized set of points of both contours in the indexing order. The coordinates of the
intersection points are determined for two segments belonging to two different contours (Fig. 3).
L1 L2
P1(x1,y1)
P4(x4,y4)
P3(x3,y3) P2(x2,y2)
Figure 3 – To the Determination of the Coordinates of the Intersection Point of Two Segments
For the segments P1–P2 and P3–P4 belonging to two intersecting straight lines L1 and L2,
it follows:
L1 A1 x B1 y C1 ,
L A x B y C ,
2 2 2 2
A1 y2 y1 ,
B1 x1 x2 , (1)
A2 y3 y4 ,
B2 x3 x4
The x, y coordinates of the intersection point of the lines L1 and L2 are determined by the
matrix equation:
A1 B1 x C1
A
B2 y C2
(2)
2
hence:
1
x A1 B1 C1
y A B C
2 2 2
B1 C1 (3)
x 1 B2
y A B A B A
1 2 2 1 2 A1 C2
The points of the generalized set belonging to the contour of the cutting insert, outside the
intervals between the points of intersection, are excluded from the generalized set of points of
both contours. Thus, the final set of points Fn is formed that describe the shape-forming contour
of the part (Fig. 2.b). The resulting contour is described in the same direction as the original
contour of the workpiece.
The considered algorithm is a simplified version of the Weiler–Atherton cut-off
algorithm [3]. A number of simplifications of the algorithm is due to the geometric features of
the problem being solved, namely: a constant condition for the convexity of the cutting insert
contour, conditions for detecting collisions of inoperative elements of the cutter (holder) with the
workpiece, the condition for excluding the completely cut-off part of the part from the
computational process when modeling the operation segments, etc.
Due to the fact that the shaping of the part is carried out during the movement of the
cutting tool, at each iteration of the algorithm, a discrete change in the coordinates of the points
of the contour of the cutting insert relative to the contour of the workpiece occurs. The step of
discreteness in this case is due to a given parameter of the movement of the cutting tool (the
value of the working feed) and the iteration time of the simulation cycle. In this case, the step of
discreteness of movement of the tool (δ) can exceed the linear dimensions of the overlapping
area of the contours of the cutting insert and the workpiece (Fig. 4.a), which leads to the
appearance of artifacts («uncut» sections) of the forming contour of the part (Fig. 4.b )
a b
Feed Direct
Minimal Convex
Hull
Figure 5 – Construction of a Minimal Convex Hull Around the Contours of the Cutting Plate in
Two Successive Discrete States
In this case, the intersection of the contour of the workpiece with the contour of the
minimum convex shell is calculated, which provides the required overlap area in the gaps
between the discrete states of the cutting tool. When constructing a minimal convex hull, the
condition of invariance of the circumvention of its contour is especially important. The minimum
convex hull can cover several discrete states of the cutting insert, provided that the direction of
the working feed of the tool does not change in these conditions (the tool moves along a straight
path).
In the project under consideration, an alternative method of eliminating artifacts of the
formative contour is used, based on the Ramer-Douglas-Peker generalization algorithm [4, 5],
which is widely used in topography and cartography problems. The main goal of the recursive
generalization procedure is to reduce the number of vertices of the polyline based on a given
threshold value of the distance between the vertices. The initial condition for the algorithm to
work is to select the most distant point with respect to the starting point of the polyline of the
contour. In subsequent iterations of the algorithm, the distances between the intermediate points
of the polyline are determined and compared with the threshold value. The connection of points
in the approximating polyline is carried out provided that the distance between them exceeds a
predetermined threshold value (Fig. 6).
Iteration 1 Iteration 2
Current
Approximation
Original
Polyline
Previous
Approximation
Iteration 3 Iteration 4 (Finish)
Main Axis
of the Machine
Ri
Figure 9 – Normal Vectors at the Vertices of the Faceted Model of the Workpiece
PRINCIPLES OF NUMERICAL PROGRAM CONTROL SIMULATION
List of the Main Functions of the Machine Control
As a linguistic basis for programming the basic technological operations during material
turning, G-M codes of Fanuc numerical control system were released:
G00/G01 – linear interpolation at accelerated/working feed;
G02/G03 – circular interpolation clockwise / counterclockwise;
G04 – time delay;
G20/G21 – data entry in inches/millimeters;
G28 – return to the reference point;
G32/G34 – threading with constant/variable pitch in single-pass;
G40–G42 – automatic tool radius compensation;
G50 – setting the maximum spindle speed;
G53–G59 – switching between working coordinate systems №1–6;
G70–G76 – main turning cycles;
G80–G83 – drilling cycles;
G90 – the cycle of the main turning of the external/internal diameter;
G92 – constant-pitch threading cycle;
G94 – cycle of the main external/internal end turning;
G96/G97 – constant cutting/spindle speed;
G98/G99 – feed rate [mm/min]/ feed rate [mm/rev];
M00/M01 – software stop with confirmation;
M02/M30 – completion of the control program;
M03/M04 – start spindle rotation clockwise/counterclockwise;
M05 – spindle rotation stop;
M07–M09 – turning on/off the coolant supply;
M38/M39 – opening/closing of automatic doors;
M97–M99 – call and end of internal/external routines.
Structure and Format of the Control Program Code
The control program code is represented as a sequence of lines (frames). The simulator
allows you to develop and execute control programs up to 999 frames (taking into account the
first uneditable line containing the number of the control program). Each frame consists of a
sequence of words, which is a combination of an alphabetic address and a numerical parameter.
No spaces are allowed between the address and the parameter. The typing of the control program
is carried out in alphanumeric characters using a monospace font. Some special characters are
allowed. Any group of characters that cannot be parsed should be enclosed in parentheses or
written after the characters «;» or «/». This information is considered a comment on the code and
is not analyzed during the simulation. The addresses of the preparatory (G) and auxiliary (M)
functions are programmed with integer parameters defining the numbers of these functions.
Numerical positioning parameters (after addresses X, Z, U, W, I, K, R, etc.) can be specified in
fractional or integer values. The «minus» sign is allowed here.
After starting the simulation process, the control program code is automatically checked
for compliance with the format. In case of errors, the corresponding messages are displayed.
Brief Description of Control Program Parsing Algorithm
Syntactic analysis (parsing) of the control program code and simulation of its execution
are carried out according to the standard algorithm [6], the block diagram of which is shown in
Figure 10.
Frame Reading
No Yes
Program End End
0 Z
ZB ZC ZA
B
XB
C
XC
XA
A
X
Z B Z A 2 X B X A 2
tS (7)
F
Linear interpolation at rapid feed is programmed with the modal function G00 (this
function is active in the initial state of the CNC system). Linear interpolation at the feed rate is
programmed with the modal function G01. After these functions, the coordinates of the end point
of the straight section of the path are set. The current position of the tool is always taken as the
starting point. The set feedrate for rapid traverse is ignored. The coordinates of the end point can
be specified in absolute values (X, Z), that is, relative to zero of the working coordinate system,
or in relative (incremental) values (U, W), that is, relative to the starting point of a rectilinear
trajectory. If one of the coordinates is omitted, movement along its axis is not carried out.
Circular interpolation is used to grind curved surfaces, the shape of which is described by
an arc of a circle of a certain radius. Two arc programming methods are used. The first method is
to specify the coordinates of the center of the arc and the end point, while the radius of the arc is
calculated automatically. The second method involves specifying the radius of the arc and the
coordinates of the end point, while the coordinates of the center of the arc are automatically
calculated. Clockwise circular interpolation is set using function G02, and counterclockwise
circular interpolation is set by function G03, respectively.
Let us consider one of the cases of circular interpolation counterclockwise indicating the
center of the arc (Fig. 12.a). When the calculated point C moves from point A to point B along an
arc with a constant feed rate, both coordinates can also be interpolated in time. The trajectory of
motion is determined by the position of the end point B and the position of the center of the arc
O in incremental coordinates (i, k) relative to the starting point A.
The angular position of the radius vectors OA, OB and OC is described by the
trigonometric angles φA, φB and φC, respectively.
a b
k
0 Z Z
0
ZB ZC ZA ZO ZB ZA
XA A
XC C
r
B φA i O– r–
XB φC
XA A
φB
XO r+
O
XB
B O+
X X
Figure 12 –Tool Path During Circular Interpolation Counterclockwise with the Programming of
the: Center of the Arc (a); Arc Radius (b)
Denoting the start time of the movement as tA, and the end time as tB, the angle φC
corresponding to the current time tC can be determined by the linear interpolation formula:
tC t A
C A A B , (8)
tB t A
where φA, φB – trigonometric angles of radius vectors of the starting and ending points of the arc:
3 k
A arctan , (9)
2 i
XA i XB
B arctan (10)
A
Z k Z B
Note: when calculating the trigonometric angles of the extreme points of the arc, it is
necessary to take into account situations in which the arc tangent function takes singular values.
The Cartesian coordinates of point C are defined as:
X A r sin C , (11)
Z A r cosC , (12)
where
r i2 k 2 (13)
The final travel time is determined by the expression (6). In this case, the time tS spent on
moving along the arc at a constant feed rate F (mm/min) can be determined using the expression
for the length of the arc:
R B A
tS (14)
180 F
The incremental coordinates of the center of the arc are programmed with addresses I and
K in the directions of the X and Z axes, respectively. When programming circular interpolation
with the center of the arc, it is necessary that the radius vectors of the start and end points of the
arc have the same length.
Circular interpolation is always performed on the working feedrate.
The second method of programming an arc is to indicate the radius of the arc circle. In
this case, two cases of setting the radius are allowed – with a positive or negative value. If the
radius value is positive, the arc angle is less than 180 degrees. Otherwise, the angle of the arc is
more than 180 degrees (Fig. 12.b). When defining an arc with a radius, the CNC system
automatically determines the position of the center of the arc (O+ or O– depending on the sign of
the radius). In this method of defining an arc, the condition must be met: the radius modulus
cannot be less than half the length of the chord (AB) of the arc.
Figure 13 shows an example of the formation of a curved surface when programming
circular interpolation counterclockwise.
ZW
W
M ZM ZR
R
XM XW XR
–20
10
Programming with respect to machine zero is carried out via function G53. This function
is not modal, and is executed in the block in which it is programmed. The function temporarily
cancels the modal functions of the G54–G59. In this case, all movements are counted in the
coordinate system of the machine with the beginning at point M, and the active zero corrector is
temporarily canceled. The G53 function must be programmed whenever it is necessary to specify
the coordinates relating to machine zero. The syntax of the function does not imply the presence
of parameters after the word G53. The function is programmed in any block that has path control
commands (for example, «G53 G00 X0 Z120»). Figure 16 shows the position of the origin of the
working coordinate system during the operation of function G53.
Figure 16 – Illustration of the Position of the Origin of the Working Coordinate System During
the Operation of Function G53
Implementation of Basic Turning and Drilling Cycles
The implemented control program parsing algorithm allows simulating the execution of
turning and drilling cycles of the Fanuc system. When each cycle is performed, a so-called buffer
list of frames is created in the memory of the computing device, including intermediate tool
movements when a programmed part contour is received. Turning cycles are defined by one or
two consecutive initiating frames, in which the main parameters of the cycle are prescribed -
roughing and finishing allowances, cutting depth during roughing with the cutter, number of
roughing with the cutting, amount of cutting back, parameters of the cutting mode, etc. The part
contour is programmed by a sequence of frames with the required numbering of the first and last
block.
The stock removal cycle parallel to the Z axis is initiated by function G71. The loop
parameters are programmed in two consecutive blocks in the format:
G71 U_ R_
G71 P_ Q_ U_ W_ F_ S_
where [first frame]: U – the depth of cut for the roughing passes (programming mode in the
radius), R – distance of retract after the end of each pass; [second frame]: P – number of the first
frame of the contour sequence; Q – number of the last frame of the contour sequence, U – the
value (programming mode in diameters) and the direction of removal of the finishing allowance
on the X-axis, W – the value and the direction of removal of the finishing allowance on the Z-
axis; F – feed rate for roughing; S – spindle speed/cutting speed during finishing.
Figure 17 shows the tool paths during the G71 turning cycle. The green lines show the
movements of the cutter in the working feed, the purple lines show the accelerated feed. As can
be seen from the figure, the processed circuit may include curved sections programmed by the
method of circular interpolation.
G71 U4 R1;
G71 P10 Q20 U2 W1 F0.5;
N10 G00 X40;
G01 Z0;
Z-20;
X54;
U6 W-4;
Z-50;
G03 X80 Z-60 R10;
G01 X100;
N20 X102;
Figure 17 – Cutting Tool Path During the Execution of the Turning Cycle G71 and Control
Program Code Fragment
The stock removal cycle parallel to the X axis is triggered by function G72. The
programming principle of this cycle is similar to the G71 cycle. The execution of rough passes
by the cutter is carried out in the direction of the X axis of the working coordinate system. The
loop parameters are programmed in two consecutive blocks in the format:
G72 W_ R_
G72 P_ Q_ U_ W_ F_ S_
where [first frame]: W – the depth of cut for the roughing passes, R – distance of retract after the
end of each pass; [second frame]: P – number of the first frame of the contour sequence, Q –
number of the last frame of the contour sequence, U – the value (programming mode in
diameters) and the direction of removal of the finishing allowance on the X-axis, W – the value
and the direction of removal of the finishing allowance on the Z-axis, F – feed rate for roughing,
S – spindle speed/cutting speed during finishing.
Figure 18 shows the tool paths during the G72 turning cycle.
G72 W4 R1;
G72 P20 Q30 U1 W0.1 F0.8;
N20 G01 X0;
G01 W-2;
G02 U20 W-10 I0 K-10;
G01 Z-40;
N30 G01 X80;
Figure 18 – Cutting Tool Path During the Execution of the Turning Cycle G72 and Control
Program Code Fragment
The stock removal cycle parallel to the specified contour is initiated by function G73. The
loop parameters are programmed in two consecutive blocks in the format:
G73 U_ W_ R_
G73 P_ Q_ U_ W_ F_ S_
where [first frame]: U – the value (programming mode in the radius) and the direction of
removal of the total allowance on the X-axis, W – the value and the direction of removal of the
total allowance on the Z-axis, R – the number of consecutive passes when removing the rough
allowance, including a half-pass; [second frame]: P – number of the first frame of the contour
sequence; Q – number of the last frame of the contour sequence; U – the value (programming
mode in diameters) and the direction of removal of the finishing allowance on the X-axis, W –
the value and the direction of removal of the finishing allowance on the Z-axis, F – feed rate for
roughing, S – spindle speed/cutting speed during finishing.
Figure 19 shows the tool paths during the G73 turning cycle.
G73 U4 W4 R3;
G73 P70 Q80 U1 W0.1 F0.9;
N70 G00 U-60 W-3 F0.35;
G01 G42 W-2;
G01 W-7;
G01 U6 W-8;
G01 W-5;
G01 U16 Z-32;
G03 X52 Z-37 R5;
G01 Z-50;
N80 G01 X80;
Figure 19 – Cutting Tool Path During the Execution of the Turning Cycle G73 and Control
Program Code Fragment
The finishing cycle is triggered by function G70. The loop parameters are programmed in
one block in the format:
G70 P_ Q_ F_ S_
where P – number of the first frame of the contour sequence, Q – number of the last frame of the
contour sequence, F – feed rate for finishing, S – spindle speed/cutting speed during finishing.
The G70 Finishing cycle completes the cycles G71, G72 and G73. It allows you to finish
the contour after applying the cycles of rough turning. Using the G70 cycle as an independent
cycle is impractical.
Programming the machining of the external/internal and end grooves is carried out using
special cycles G74 and G75.
The grooving/drilling cycle with a rebound is initiated by function G74. The loop
parameters are programmed in two consecutive blocks in the format:
G74 R_
G74 X(U)_ Z(W)_ P_ Q_ F_
where [first frame]: R – the distance that the tool retracts after completing the grooving step;
[second frame]: X(U) – the X-axis coordinate of the endpoint, Z(W) – the Z-axis coordinate of
the endpoint, P – the X-axis groove pitch (microns), Q – the Z-axis groove pitch (microns), F –
feed rate.
Figure 20 shows the tool paths during the grooving cycle of the face grooves G74. When
performing this cycle, the tool after each working pass is retracted by the specified rebound
value in order to remove chips from the machined groove. The G74 cycle can also be used to
program end hole drilling operations.
T0404;
G00 X24 Z2;
G74 R3;
G74 X40 Z-30 P5000 Q5000 F0.4;
Figure 20 – Cutting Tool Path During a Grooving Cycle of the Facing Grooves G74 and Control
Program Code Fragment
The groove cycle of the external/internal grooves with a rebound is initiated by the G75
function. The principle of using the G75 cycle is similar to the G74 cycle. The groove machining
is carried out in the direction of the X axis. The set value of the groove pitch along the Z axis
allows machining of grooves with overlapping. After each working pass, the tool is retracted by
the specified rebound value. The loop parameters are programmed in two consecutive blocks in
the format:
G75 R_
G75 X(U)_ Z(W)_ P_ Q_ F_
where [first frame]: R – the distance that the tool retracts after completing the grooving step;
[second frame]: X(U) – the X-axis coordinate of the endpoint, Z(W) – the Z-axis coordinate of
the endpoint, P – the X-axis groove pitch (microns), Q – the Z-axis groove pitch (microns), F –
feed rate.
Figure 21 shows the tool paths during the grooving cycle of the external groove G75.
X52 Z-33;
G75 R1;
G75 X28 Z-14 Q2500 P3000 F0.2;
G00 X60;
Figure 21 – Cutting Tool Path During the Grooving Cycle of the External/Internal Grooves G75
and Control Program Code Fragment
To process threaded connections, a multi-pass threading cycle is initiated, initiated by the
G76 function. The loop parameters are programmed in two consecutive blocks in the format:
G76 Pxxyyzz Q_ R_
G76 X(U)_ Z(W)_ R_ P_ Q_ F_
where [first frame]: xx – a two-digit number of screw steamers; yy – a two-digit number that
specifies the chamfer size, zz – a two-digit number that specifies the angle of the cutting edge of
the tool, Q – the minimum depth of thread in microns (programming mode in the radius), R – the
depth of cut for finish pass; [second frame]: X(U) – the X-axis coordinate of the threading
endpoint, Z(W) – the Z-axis coordinate of the threading endpoint, R – the X-axis offset when
cutting tapered thread (not programmable when cutting cylindrical thread), P – the height of the
thread (microns), Q – thread depth for the first pass (microns), F – the Z-axis thread pitch.
Figure 22 shows the tool paths during a multi-pass cylindrical thread G76 cycle. Blue
lines indicate the movement of the thread-cutting tool on the working feed.
G0 X22 Z7;
G76 P020060 Q100 R0.05;
G76 X17.55 Z-49 R0 P1225 Q400 F2;
G00 G28 U0 W0 M09;
Figure 22 – Cutting Tool Path During a Multi-Pass Cylindrical Threading Cycle G76 and
Control Program Code Fragment
The G76 cycle also allows you to program the machining of tapered threads (Fig. 23).
Figure 23 – Cutting Tool Path During a Multi-Pass Taper Thread G76 Cycle and Control
Program Code Fragment
When programming the machining of threaded joints, an alternative constant-pitch
threading cycle initiated by function G92 can be used. The loop parameters are programmed in
one block in the format:
G92 X(U)_ Z(W)_ R_ F_
where X(U) – the X-axis coordinate of the threading first pass endpoint, Z(W) – the Z-axis
coordinate of the threading first pass endpoint, R – the X-axis offset when cutting tapered thread
(not programmable when cutting cylindrical thread), F – the Z-axis thread pitch.
Each working pass with a thread-cutting tool is programmed as a separate block, which
goes in the general sequence of frames after the G92 cycle initialization block. In this case, only
the X coordinate is specified, that is, the diameter value at which the calculated point of the
cutter is located on the current working pass.
Figure 24 shows the tool paths during a taper cycle with a constant pitch of G92.
Figure 24 – Cutting Tool Path During a Threading Cycle with a Constant Step G92 and Control
Program Code Fragment
To program the grooving of long cylindrical or conical sections of the part, the cycle of
basic turning of the outer/inner diameter, initiated by the G90 function, is used. The structure of
the cycle is similar to the threading cycle G92. Before the start of the cycle, the cutter is
displayed at the starting point. The loop parameters are programmed in one block in the format:
G90 X(U)_ Z(W)_ R_ F_
where X(U) – the X-axis coordinate of the first pass endpoint, Z(W) – the Z-axis coordinate of
the first pass endpoint, R – changing the radius of the cone base, F – feed rate.
Each working pass with the cutter is programmed by a separate block, which goes in the
general sequence of frames after the G90 cycle initialization block. In this case, only the X
coordinate can be specified, that is, the diameter value at which the calculated point of the cutter
is located on the current working pass. Also in the frames of the description of the working
passages, the Z coordinate can also be set in case it is necessary to process the stepped part of the
part. Figure 25 shows the tool paths during the main turning cycle of the outer / inner diameter
G90.
X104 Z2;
G90 X90 Z-70 F0.5;
X80 Z-55;
X70;
X60;
X50;
X40 Z-30;
G00 X110 Z5 M09;
Figure 25 – Cutting Tool Path During the Execution of the Main Turning Cycle of the
External/Internal Diameter G90 and Control Program Code Fragment
The machining of the end surfaces of the parts can be programmed using the main
external/internal end turning cycle initiated by the G94 function. The loop parameters are
programmed in one block in the format:
G94 X(U)_ Z(W)_ R_ F_
where X(U) – the X-axis coordinate of the first pass endpoint, Z(W) – координата the Z-axis
coordinate of the first pass endpoint, R – changing the radius of the cone base, F – feed rate.
By analogy with the G90 cycle, the cutter passes are programmed in separate blocks after
the G94 cycle initialization block. In this case, for each passage, the coordinates Z and / or X can
be set, as well as the parameter R, which determines the change in the radius of the base of the
cone. Figure 26 shows the tool paths during the main external/internal end turning cycle G94.
X104 Z0.5;
G94 X-2.4 Z0 F0.3;
X30 Z-5;
Z-10;
Z-15;
X50 Z-20;
Z-25;
G00 Z5 M09;
Figure 26 – Cutting Tool Path During the Execution of the Cycle of the Main External/Internal
Face Turning G94 and Control Program Code Fragment
The simulation model also allows programming of end hole drilling operations using
constant cycles: simple single-pass drilling, single-pass drilling with a shutter speed at the
bottom of the hole and multi-pass (intermittent) drilling (Fig. 27).
A simple single-pass drilling cycle is initiated by the G81 function, and has a frame
format:
G81 X(U)_ Z(W)_ R_ F_
where X(U) – the X-axis coordinate of the endpoint, Z(W) – координата the Z-axis coordinate
of the endpoint, R – the absolute Z-axis coordinate of the tool removal plane, F – feed rate.
The single-pass drilling cycle with a shutter speed at the bottom of the hole is initiated by
the G82 function and has a frame format:
G82 X(U)_ Z(W)_ R_ P_ F_
where X(U) – the X-axis coordinate of the endpoint, Z(W) – the Z-axis coordinate of the
endpoint, R – the absolute Z-axis coordinate of the tool removal plane, P – the time delay at the
bottom of the hole in milliseconds, F – feed rate.
The intermittent drilling cycle is initiated by the G83 function and has a frame format:
G83 X(U)_ Z(W)_ R_ P_ Q_ F_
where X(U) – the X-axis coordinate of the endpoint, Z(W) – the Z-axis coordinate of the
endpoint, R – the absolute Z-axis coordinate of the tool removal plane, P – the time delay at the
bottom of the hole in milliseconds, Q – z-axis drilling pitch (microns), F – feed rate.
The cancellation of the continuous drilling machining cycle is carried out by function
G80.
T0101;
G83 Z-110 R5 Q10000 F0.5;
1000 V
n , (15)
d
Number
№ Parameter Name Data Type
of Bytes
Throughout the entire session with the program, a navigation bar is displayed on the right
side of the screen. The first (top to bottom) button of the panel is designed to open the program
termination dialog. The program shutdown dialog displays warning information about a possible
data loss if the current project has not been saved to a file. Closing the dialog screen is also done
by pressing the corresponding button on the navigation panel again. The second button of the
navigation panel brings up the dialog screen of the built-in file manager (Fig. 29). The elements
of this dialog screen are three vertically arranged buttons: «New Project», «Open Project» and
«Save Project». The first (top to bottom) function button resets all parameters of the current
project to the default values. This action is accompanied by an additional confirmation dialog.
The second button displays the elements of the file system in the most traditional representation
(Fig. 30).
Figure 29 – Built-in File Manager Dialog Screen
A list of directories is presented on the left side of the file open dialog. The root directory
is created in the system during the installation of the program. Directories located above the root
hierarchy are not accessed through the built-in file manager.
Along with the workpiece, a turret with a tool installed in it is also shown in the
dimension reference drawing field. If the turret is equipped with an axial tool, the drawing
simultaneously shows a drill with a nominal longitudinal reach of Zm and a cutter for external
machining with a nominal lateral reach of Xm (Fig. 36.a). When using tools only for external
machining, the axial tool is not shown in the drawing (Fig. 36.b).
a b
Figure 36 – Various Configuration Options for the Turret when Using an Axial Tools (a) and
without Using an Axial Tools (b)
The reference position of the turret is determined so that a theoretical tool with nominal
overhangs Zm and Xm has a safe longitudinal Z' and transverse X' indentation from the lower
right corner of the workpiece contour in plan. The safety margins Z' and X' are not adjustable
and are 30 mm.
When setting the dimensions of the workpiece, the compliance with the conditions for
preloading long workpieces by the rear center is automatically controlled. So, if the offset value
L3 exceeds 3 workpiece diameters, the tailstock quill with the rear center installed in it is
displayed in the drawing field. When changing the setting of the part after the first machining,
the machine is not readjusted with respect to the workpiece binding and the zeros of working
coordinate systems.
The fourth button of the navigation panel brings up the tool settings dialog box (Fig. 37).
On the left side of the screen is a list (catalog) of tools, including 185 names of various tools for
external and internal processing of parts. Each list item begins with an interactive tool icon that
outlines the shape of the plate and the recommended directions for the feeds. To the right of the
tool icon are a serial number and a short text description of the tool, including its geometric
characteristics and the type of turning in which it is recommended to use this tool. The tool list
has a vertical scroll bar.
On the right side of the tool parameter settings screen, a row of square cells with serial
numbers from 1 to 8 is located at the top, which corresponds to the positions of the turret.
Figure 37 – Tool Settings Dialog Screen
To set the tool in the desired position of the turret, you must move the mouse pointer over
the icon with the image of the tool in the list, then press the left mouse button and hold it
pressed, move the icon to a free cell in the upper right part of the screen, and then release the
mouse button. If the tool moves to an already occupied position, it will be automatically returned
to the catalog. When working on a device with a touch screen, the movement of tool icons is
carried out in a similar way by continuously touching the screen with moving around the screen.
The installed tool is returned to the catalog by a similar movement of the icon. In this
case, the icon of the returned tool can only be moved to any area of the tool list field.
To rearrange an already installed tool from one position to another (free or occupied by
another tool), it is enough to move the icon within the position block of the turret. If at the same
time the cell into which the tool moves is already occupied by another tool, these tools will be
swapped.
Below the block of positions of the turret head is a drawing of the dimensional reference
of the tool, showing the model of the tool and equipment in plan, the actual values of the
longitudinal and transverse flights, as well as the geometric diagram of the tool insert in the plan.
The position of the zero point of the tool, indicated by the corresponding icon , cannot
be changed, and corresponds to the center of the hole in the plane of the front surface of the
turret.
Departures of the tool can be changed depending on the type of tool using the buttons to
increase/decrease the offset value located in the lower right part of the dimension reference
drawing field (Fig. 38). For external tools, the lateral offset along the X axis changes to a smaller
side, and for axial tools, a longitudinal offset along the Z axis changes to a greater or lesser side.
Setting tool offset is one of the stages of setting up a machine. Shortening the outreach of
the axial tools by deepening them into the cavity of the tooling (and, accordingly, the turret)
allows you to expand the boundaries of the working space of the machine when machining the
outer surface near the cartridge, provided that both the axial tools and the tools for external
processing are fixed in the turret.
Switching between tools installed in the turret is carried out using the corresponding
left/right buttons located in the upper right corner of the dimensional reference drawing field.
The main geometric parameters of the tool are displayed at the bottom of the drawing.
The axial tool is not used in case of preloading the workpiece by the rear center.
Moreover, if the turret is pre-equipped with an axial tool, and the dimensions of the workpiece
are changed in the second place, as a result of which the rear center is involved, the axial tool
automatically returns to the catalog. In order to avoid this situation, the turret must be completed
after dimensional adjustment of the workpiece.
The fifth button of the navigation panel displays on the main screen of the simulator a
built-in text editor of control programs (Fig. 39). The text editor has in the upper part a panel of
functional buttons necessary for working with the machine control program code. The main part
of the text editor is occupied by a text field equipped with vertical and horizontal scrollbars. The
button for showing/hiding the virtual keyboard is located in the lower right part of the editor.
Figure 39 – View of the Simulator Main Screen with an Open Control Programs Editor
Typing in a text field can be carried out using both physical and virtual keyboards
(Fig.40).
Figure 43 – Additional Elements of the Simulator Main Screen During the Simulation with a
Closed Text Editor
After processing the workpiece from the first setting, an additional button for changing
the setting is displayed on the left side of the main screen (Fig. 44.a). After changing the setup
from the first to the second contour of the part, it is mirrored with respect to the center of mass of
the initial workpiece in the direction of the Z axis, and the screen displays two additional buttons
for longitudinal displacement of the part (Fig. 44.b). Pressing the button 1 leads to a discrete
longitudinal displacement of the part to the left (towards the machine zero point). Pressing button
2 moves the part to the right.
a b
1 2
Figure 44 – Additional Buttons for Workpiece Setting Setup
Recalling the workpiece parameters dialog screen after machining the workpiece from the
first setting initiates the dialog for confirming the reset of the part contour changes.
In the lower part of the main screen of the program, the system information about the
resources is displayed in small print: the current value of the frame frequency (Frame Per
Second), the amount of video memory used in megabytes, the number of polygonal facets
displayed on the screen at a time, the number of drawings loaded in the memory, the number of
graphic sprites used, time drawing one full-screen frame in seconds and the number of points in
the workpiece contour.
In the lower left corner of the main screen there is a button for switching the virtual
camera mode (Fig. 45). The button shows the number of the target (next) camera mode to which
the screen will be switched. In total, 5 camera operation modes are provided.
Vertical
Camera Position Frontal Plane
Horizontal
Distance from the Plane
Camera to the Focus
Point
Camera Focus
Point
a b
1 2 3