MTB Tech Blog
MTB Tech Blog
MTBTechBlog
TBTechBlog
http://www.mtbtech.net/blog/rss.xml
Areyouthepublisher?Claimor
contactusaboutthischannel
BrowsingtheLatest
Snapshot
Embedthis
contentinyour
HTML
BrowseAllArticles(24
Articles)
Live
Browser
ChannelDescription:
MTBTechBlog
Search
Reportadultcontent:
clicktorate
09/08/1414:12:5Axis
MachiningDemystifiedPartFour
Account:(login)
MoreChannels
Showcase
RSSChannelShowcase8565473
RSSChannelShowcase1505617
RSSChannelShowcase2497775
RSSChannelShowcase1739077
ChannelCatalog
SubsectionCatalog
ArticlesonthisPage
(showingarticles1to10of
10)
09/08/1414:12:_5Axis
MachiningDe...
07/20/1510:41:_SIEMENSVector
prog...
07/20/1510:45:_FYItoPost
Process...
10/09/1506:40:_SIEMENSCIP
Arcs...
http://salzhauer27.rssing.com/chan14598779/latest.php
1/41
2016.12.5.
MTBTechBlog
01/19/1606:41:_FANUCG68.2
5Axi...
01/28/1607:51:_CreatingFANUC
Cust...
02/07/1618:21:_SIEMENS
CYCLE800...
02/09/1617:19:_SIEMENS
ManualVe...
06/07/1600:39:_CAMSoftware
Vendor...
10/06/1613:45:_FANUCG43.5
RTCPTy...
(showingarticles1to10of
10)
DualRotary Configurations
http://salzhauer27.rssing.com/chan14598779/latest.php
2/41
2016.12.5.
MTBTechBlog
CalculateRotaryAnglesfromVectorComponents
(AMechanicalPrimary/BMechanicalSecondary)
TheAAxisrotatesabout(parallelto)theXaxis.
TheBAxisrotatesabout(parallelto)theYaxis.
VectorComponentI=0.48038447
VectorComponentJ=0.83205029
VectorComponentK=0.27735010
IFVectorK>0.0Then
'VectorKisabovehorizonofXYPlane
http://salzhauer27.rssing.com/chan14598779/latest.php
3/41
2016.12.5.
MTBTechBlog
AngleB=ATN(VectorI/VectorK)*(1)
AngleB=ATN(0.48038447/0.27735010)*(1)
AngleB=ATN(1.73205082)*(1)
AngleB=60.000*(1)
AngleB=60.000(Roundedto3places)
AngleA=ATN((VectorJ/VectorK)*COS(Angle
B))
AngleA=ATN((0.83205029/0.27735010)*
COS(60.000))
AngleA=ATN(2.99999996*0.5)
AngleA=ATN((2.99999996)*COS(60.000))
AngleA=ATN(1.49999998)
AngleA=56.310(Roundedto3places)
ELSEIFVectorK=0.0Then
'VectorKisathorizonofXYPlane
'PreventDivisionbyZeroErrorby
'Assigningthesmallestnonzerodouble
precisionvalue
VectorK=0.0000000000000001
AngleB=ATN(VectorI/VectorK)*(1)
AngleA=ATN((VectorJ/VectorK)*
COS(AngleB))
ELSE
'VectorKisbelowhorizonofXYPlane
'+180.0adjustmentindicatesVectorK
belowhorizonofXYPlane
AngleB=ATN(VectorI/Vector
K)+180.0)*(1)
AngleA=ATN((VectorJ/VectorK)*
COS(AngleB))
ENDIF
CalculateIntermediateLocationPoint
We now have the Rotary Axis Angles needed for performing our
Drilling Cycle. Our next set of calculations will be calculating
the X,Y,Z location of the hole to be drilled. We start with the
initial X,Y,Z location in our Cutter Location Data generated by
our CAM System. This data is PRIOR to any rotation. Keep in
mind that all our X,Y,Z locations are referencing the Center of
Rotation The intersection point of the rotary axis center
lines.
HoleLocationinCLData
http://salzhauer27.rssing.com/chan14598779/latest.php
4/41
2016.12.5.
MTBTechBlog
X=1.93730251
Y=6.23427374
Z=1.67372321
Hypotenuse=SQRT(X+Z)
Hypotenuse=2.5601739
Our next calculation is the included angle of our triangle.
IncludedAngle=ATN(Z/X)
IncludedAngle=
ATN(1.67372321/1.93730251)
IncludedAngle=ATN(0.86394520)
IncludedAngle=40.825(Rounded
to3Places)
IntermediateX=Hypotenuse*COS(Included
Angle+ABS(AngleB))
IntermediateX=2.5601739*COS(40.825+60.0)
IntermediateX=2.5601739*COS(100.825)
IntermediateX=2.5601739*0.18781363
IntermediateX=0.48083556
IntermediateY=YCLPoint
IntermediateY=6.23427374
IntermediateZ=Hypotenuse*SIN(Included
Angle+ABS(AngleB))
IntermediateZ=2.5601739*SIN(40.825+60.0)
IntermediateZ=2.5601739*SIN(100.825)
IntermediateZ=2.5601739*0.98220539
IntermediateZ=2.51461662
http://salzhauer27.rssing.com/chan14598779/latest.php
5/41
2016.12.5.
MTBTechBlog
IntermediatePoint
X0.48083556,Y6.23427374,Z2.51461662
CalculateFinalLocationPoint
Hypotenuse=SQRT(Y+Z)
Hypotenuse=6.72231104
IncludedAngle=ATN(Z/Y)
IncludedAngle=
ATN(2.51461662/6.23427374)
IncludedAngle=ATN(0.40335357)
IncludedAngle=21.967(Roundedto3
Places)
FinalX=IntermediateXPoint
FinalX=0.48083556
FinalY=Hypotenuse*COS(IncludedAngle+
AngleA)
FinalY=6.72231104*(COS(21.96756.310)*1)
FinalY=6.72231104*(COS(78.277)*1)
FinalY=6.72231104*0.20318036
FinalY=1.36584157
http://salzhauer27.rssing.com/chan14598779/latest.php
6/41
2016.12.5.
MTBTechBlog
FinalZ=Hypotenuse*SIN(IncludedAngle+
AngleA)
FinalZ=6.72231104*(SIN(21.96756.310)*1)
FinalZ=6.72231104*(SIN(78.277)*1)
FinalZ=6.72231104*0.97914132
FinalZ=6.58209250
FinalHoleLocationPoint
X0.48083556,Y1.36584157,Z6.58209250
NCCodeforDrillCycle
(X,Y,A,BRAPIDPOSITIONING)
G00G90X0.4808Y1.3658A56.310B60.0
(RAPIDTO2.0ABOVEHOLELOCATION)
Z8.5821
(DRILL2.0DEEPHOLE/RPLANE=0.1ABOVETOPOFHOLE)
G81G98X0.4808Y1.3658Z4.5821R6.6821F10.0
http://salzhauer27.rssing.com/chan14598779/latest.php
7/41
2016.12.5.
MTBTechBlog
CalculateRotaryAnglesfromVectorComponents
(AMechanicalPrimary/CMechanicalSecondary)
TheAAxisrotatesabout(parallelto)theXaxis.
TheCAxisrotatesabout(parallelto)theZaxis.
VectorComponentI=0.48038447
VectorComponentJ=0.27735010
VectorComponentK=0.83205029
IFVectorK>0.0Then
'VectorKisabovehorizonofXYPlane
'PreventDivisionbyZeroErrorby
'Assigningthesmallestnonzerodoubleprecision
value
IFVectorJ=0.0Then
VectorJ=0.0000000000000001
ENDIF
AngleC=ATN(VectorI/VectorJ)
AngleC=ATN(0.48038447/0.27735010)
AngleC=ATN(1.73205082)
AngleC=60.000
AngleC=60.000(Roundedto3places)
AngleA=ATN((VectorJ/VectorK)/COS(Angle
C))
AngleA=ATN((
0.27735010/
0.83205029)/COS(60.000))
AngleA=ATN((0.33333333)/COS(60.000))
AngleA=ATN(0.33333333/0.5)
AngleA=ATN(0.66666666)
AngleA=33.690(Roundedto3places)
ELSEIFVectorK=0.0Then
'VectorKisathorizonofXYPlane
'PreventDivisionbyZeroErrorby
'Assigningthesmallestnonzerodouble
precisionvalue
http://salzhauer27.rssing.com/chan14598779/latest.php
8/41
2016.12.5.
MTBTechBlog
VectorK=0.0000000000000001
IFVectorJ=0.0Then
VectorJ=0.0000000000000001
ENDIF
AngleC=ATN(VectorI/VectorJ)
AngleA=ATN((VectorJ/VectorK)/
COS(AngleC))
ELSE
'VectorKisbelowhorizonofXYPlane
IFVectorJ=0.0Then
VectorJ=0.0000000000000001
ENDIF
'+180.0adjustmentindicatesVectorK
belowhorizonofXYPlane
AngleC=ATN(VectorI/VectorJ)
AngleA=ATN((VectorJ/VectorK)/
COS(AngleC+180))
ENDIF
CalculateIntermediateLocationPoint
We now have the Rotary Axis Angles needed for performing our
Drilling Cycle. Our next set of calculations will be calculating
the X,Y,Z location of the hole to be drilled. We start with the
initial X,Y,Z location in our Cutter Location Data generated by
our CAM System. This data is PRIOR to any rotation. Keep in
mind that all our X,Y,Z locations are referencing the Center of
Rotation The intersection point of the rotary axis center
lines.
HoleLocationinCLData
X=1.93730251
Y=1.67372321
Z=6.23427374
http://salzhauer27.rssing.com/chan14598779/latest.php
9/41
2016.12.5.
MTBTechBlog
NOTE:CalculationsfromTopViewofXYPlane
IntermediateX=Hypotenuse*COS(Included
Angle+AngleC)
IntermediateX=2.5601739*COS(40.825+60.0)
IntermediateX=2.5601739*COS(100.825)
IntermediateX=2.5601739*0.18781363
IntermediateX=0.48083556
IntermediateY=Hypotenuse*SIN(Included
Angle+AngleC)
IntermediateY=2.5601739*SIN(40.825+60.0)
IntermediateY=2.5601739*SIN(100.825)
IntermediateY=2.5601739*0.98220539
IntermediateY=2.51461662
IntermediateZ=ZCLPoint
IntermediateZ=6.23427374
IntermediatePoint
X0.48083556,Y2.51461662,Z6.23427374
CalculateFinalLocationPoint
http://salzhauer27.rssing.com/chan14598779/latest.php
10/41
2016.12.5.
MTBTechBlog
NOTE:CalculationsfromRightViewofYZPlane
FinalX=IntermediateXPoint
FinalX=0.48083556
FinalY=Hypotenuse*COS(IncludedAngle+
AngleA)
FinalY=6.72231104*COS(68.033+33.690)
FinalY=6.72231104*COS(101.723)
FinalY=6.72231104*0.20318036
FinalY=1.36584157
FinalZ=Hypotenuse*SIN(IncludedAngle+
AngleA)
FinalZ=6.72231104*SIN(68.033+33.690)
FinalZ=6.72231104*SIN(101.723)
FinalZ=6.72231104*0.97914132
FinalZ=6.58209250
FinalHoleLocationPoint
X0.48083556,Y1.36584157,Z6.58209250
http://salzhauer27.rssing.com/chan14598779/latest.php
11/41
2016.12.5.
MTBTechBlog
NCCodeforDrillCycle
(X,Y,A,CRAPIDPOSITIONING)
G00G90X0.4808Y1.3658A33.69C60.0
(RAPIDTO2.0ABOVEHOLELOCATION)
Z8.5821
(DRILL2.0DEEPHOLE/RPLANE=0.1ABOVETOPOFHOLE)
G81G98X0.4808Y1.3658Z4.5821R6.6821F10.0
We now have the final X,Y,Z location for our hole to be drilled.
We have used the same part, mounted to our rotary table the
same way but in two different rotary axis configurations with
two different home reference positions. The one common
element is the center of rotation. The net effect of this is that
the hole location is calculated to be at the exact same X,Y,Z
position, regardless of the method used.
http://salzhauer27.rssing.com/chan14598779/latest.php
07/20/1510:41:SIEMENSVector
12/41
2016.12.5.
MTBTechBlog
07/20/1510:41:SIEMENSVector
programmingfor5Axis
http://salzhauer27.rssing.com/chan14598779/latest.php
13/41
2016.12.5.
MTBTechBlog
14/41
2016.12.5.
MTBTechBlog
15/41
2016.12.5.
MTBTechBlog
YouneedFlashPlayerinordertoviewthis.
NAS979(NationalAerospaceStandard)TestPart
NAS979TestPartprogrammedusingSIEMENS
840DVectorFormatandbackplottedusingCIMCO
EditV7.5x.5AxisMotionstartsat3:30Best
viewedinHD.
07/20/1510:45:FYItoPost
ProcessorDevelopersregarding
SIEMENSandG17,G18&G19
16/41
2016.12.5.
MTBTechBlog
told which direction to apply the tool length offset using the
TOFF or TOFFL command.
While this will work if you actually want to see G18 & G19 and
cut arcs in those planes, it is unnecessary. For anyone who
wants to cut 3D arcs with SIEMENS, your choices are use CIP
arcs for everything, (Brute Force but it will work) or simply
insure that arcs in the G18 & G19 planes are formatted as
shown below.
Make sure treat axis addresses and arc centers as nonmodal.
G02/G03 X Z I K F
G02/G03 Y Z J K F
No G18/G19 code required at all as SIEMENS will automatically
process the arcs for the proper planes while the active plane is
still G17!
Helical Arcs in the G17 XY plane must have all 3 addresses
(XYZ) present in the line of code. Modality of the axis
addresses is not supported for Helical Arcs.
Sections 8.2 & 5.8 of the SIEMENS Fundamental Programming
Manual (6FC53981BP403BA1) deal with Plane Selection and
programmable tool offsets.
Paying attention to this basic code formatting information will
eliminate costly machine crashes and down time.
10/09/1506:40:SIEMENSCIP
ArcsAreyouusingthem?
17/41
2016.12.5.
MTBTechBlog
01/19/1606:41:FANUCG68.2
5AxisTiltedWorkPlanes
18/41
2016.12.5.
MTBTechBlog
G68.2
G68.2
G68.2
G68.2
G68.2
P0
P1
P2
P3
P4
(Euler Angles)
(RollPitchYaw Angles)
(3 Points)
(2 Vectors)
(Projection Angles)
19/41
2016.12.5.
MTBTechBlog
Since Roll, Pitch and Yaw Angles are the most common used in
Aerospace, let's construct a G68.2 command using Roll, Pitch
and Yaw Angles.
G68.2 Roll Pitch Yaw Syntax
G68.2 P1 Q123 X_ Y_ Z_ I_ J_ K_
P1indicatesaTiltedWorkPlanesdefinitionviaRoll,
PitchandYaw.
X,Y,ZdefinethelocationoftheOriginoftheTilted
WorkPlaneusingthebaseWCS(WorkCoordinate
System)ofthepartasthereference.
I,J,KdefinetheRoll(aboutX),Pitch(aboutY)and
Yaw(aboutZ).
TheQ123indicatestheorderinwhichtherotaryaxes
arerotated.
Q123isthedefaultfortheI,JandKvalues.IftheQis
notspecified,Q123isassumed.
20/41
2016.12.5.
MTBTechBlog
http://salzhauer27.rssing.com/chan14598779/latest.php
21/41
2016.12.5.
MTBTechBlog
01/28/1607:51:CreatingFANUC
CustomGCodes&MCodes
22/41
2016.12.5.
MTBTechBlog
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
M code that
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
9001
9002
9003
9004
9005
9006
9007
9008
9009
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
http://salzhauer27.rssing.com/chan14598779/latest.php
23/41
2016.12.5.
MTBTechBlog
Ex.
T02 M06 is called in the Main NC program.
The CNC immediately reads O9001 as a subprogram triggered
by the M06. The Tool Number called is retrieved from system
variable #4120 and assigned to local variable #20. The coolant
is turned off and the spindle is stopped. The machine the
performs a reference return in the ZAxis, orients the spindle
and then actually executes the standard M06 defined in the
control PMC. Absolute mode (G90) is established and with the
M99 the control returns to the next block in the NC program.
Our custom M06 is just a simple example for a custom MCode.
The next example will demonstrate a realworld example of a
custom GCode function. As with custom MCodes, FANUC has
parameters that control the assignment of the actual code
integer as well as the actual program number used to define
that custom Gcode.
Custom GCode Parameters
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
=
=
=
=
=
=
=
=
=
=
G
G
G
G
G
G
G
G
G
G
code that
code that
code that
code that
code that
code that
code that
code that
code that
code that
calls
calls
calls
calls
calls
calls
calls
calls
calls
calls
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
the custom
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
macro of program
number
number
number
number
number
number
number
number
number
number
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
24/41
2016.12.5.
MTBTechBlog
http://salzhauer27.rssing.com/chan14598779/latest.php
25/41
2016.12.5.
MTBTechBlog
02/07/1618:21:SIEMENS
CYCLE8005AxisTiltedWork
Planes
In our previous post we dealt with how FANUC handles 5Axis Tilted Work
Planes for a 5Axis Machine with a Head/Head (C/A) kinematic
configuration.
FANUC G68.2 5Axis Tilted Work Planes
In this post we will explain how the SIEMENS 840D sl Control's CYCLE800
function is used for handling 5Axis Tilted Work Planes for the same
Machine with a Head/Head (C/A) kinematic configuration. Since
is really a continuation of our previous post on 5Axis Tilted Work Planes,
it may be helpful to reread that post before continuing.
The CYCLE800 Tilted Work Plane function allows user to define the Work
Plane by the following Swivel Modes.
Axis by Axis (Euler Angles or RollPitchYaw)
Solid Angle
Projection Angle
Direct Rotary Axis Angles
NOTE: Parameter MD10600 $MN_FRAME_ANGLE_INPUT_MODE
whether Euler angles or RPY Angles are to be used
.
Users can change the order to the Standard Interpretation of Roll, Pitch
and Yaw by selecting the X,Y, Z Axis Sequence from the Sequence of Axes
dropdown list in the Program Guide or by using the proper explicit
programming syntax.
http://salzhauer27.rssing.com/chan14598779/latest.php
26/41
2016.12.5.
MTBTechBlog
CYCLE800 Syntax
The standard CYCLE800 consists of 16 individual argument values
separated by commas and listed between parentheses.
CYCLE800(#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12,#13,#14,#15,#16
Since we are dealing with a Head/Head type machine, we'll explain each
argument in that context.
Argument #2
This is the label of the Swivel Data Record in the Machine Setup area. Thi
contains the kinematic definition of the rotary axes. This label will always
be within closed quotation marks to indicate it is a text label.
Argument #3
This value is dependent upon both the kinematic configuration as well as
the commissioning of the machine by the machine builder. In our example
http://salzhauer27.rssing.com/chan14598779/latest.php
27/41
2016.12.5.
MTBTechBlog
the value will always be100010. The 5th & 6th digits, 10, indicate that
the tool tip will track in a fashion similar to TRAORI.
Argument #4
This value indicates the mode with which CYCLE800 will function.
57 = Axis by Axis Mode w/ Axis Order X, Y, Z
45 = Axis by Axis Mode w/ Axis Order X, Z, Y
54 = Axis by Axis Mode w/ Axis Order Y, X, Z
30 = Axis by Axis Mode w/ Axis Order Y, Z, X
39 = Axis by Axis Mode w/ Axis Order Z, X, Y
27 = Axis by Axis Mode w/ Axis Order Z, Y, X
64 = Solid Angle Mode
185 = Projection Angle Mode
192 = Direct Rotary Axis Angle Mode
http://salzhauer27.rssing.com/chan14598779/latest.php
28/41
2016.12.5.
MTBTechBlog
Argument #16
29/41
2016.12.5.
MTBTechBlog
02/09/1617:19:SIEMENS
0
ManualVectored
Retract/ApproachofToolfor5Axis
http://salzhauer27.rssing.com/chan14598779/latest.php
30/41
2016.12.5.
MTBTechBlog
http://salzhauer27.rssing.com/chan14598779/latest.php
31/41
2016.12.5.
MTBTechBlog
32/41
2016.12.5.
MTBTechBlog
You will now see the current rotary axis values for the current
kinematic configuration. In this case the CAxis value & AAxis
Value.
You can now press the Jog Plus Sign (+) button and the head
will move in the positive direction along the current tool
vector. Press the Jog Minus Sign () button and the head will
move in the negative direction along the current tool vector.
When you have moved the required distance along the vector,
Press MDI. Enter the commands to cancel any active FRAMES.
Press CYCLE START.
06/07/1600:39:CAMSoftware
VendorsandPostProcessors
http://salzhauer27.rssing.com/chan14598779/latest.php
33/41
2016.12.5.
MTBTechBlog
34/41
2016.12.5.
MTBTechBlog
35/41
2016.12.5.
MTBTechBlog
10/06/1613:45:FANUCG43.5
RTCPTypeIIVector
Programmingfor5Axis
http://salzhauer27.rssing.com/chan14598779/latest.php
36/41
2016.12.5.
MTBTechBlog
When viewing from the right side of a C/A 5Axis Head, the
rotary command A90.0 causes a movement of axis A without
any linear axis movements that would keep the tool in contact
with the part.
Vector Programming
Mathematically, a Tool Vector is represented by its component
values that are relative to the linear X, Y and Z axes. These
component values typically use the addresses I, J and K. The
relationship of the vector component is defined as the
directional cosine. The directional cosines of a vector are the
cosines of the angles between the vector and the three
coordinate axes. A Tool Vector is always referenced with its
start point at the tip of the tool along its centerline. It is
generally terminated with its end point at the tool gauge line
the intersection of the tool holder taper and the spindle taper.
http://salzhauer27.rssing.com/chan14598779/latest.php
37/41
2016.12.5.
MTBTechBlog
38/41
2016.12.5.
MTBTechBlog
39/41
2016.12.5.
MTBTechBlog
http://salzhauer27.rssing.com/chan14598779/latest.php
40/41
2016.12.5.
MTBTechBlog
http://salzhauer27.rssing.com/chan14598779/latest.php
41/41