What's new
What's new

Incremental values and Q par programming Heindenhain iTNC540

SepticVoid

Plastic
Joined
Sep 19, 2018
Hello,

Im programming with Heidenhain iTNC 540 and am diving into Q-parameter programming.
The basic concept of exanging numbers with parameters is familiar with me but I was wondering
how to use incremental decrease or increase of a value with Q-paramter programming.

Lets take a rectangle with 45 degree angle slants on it
total x length = 140.0 mm
total y length = 90.0 mm
total Z height = 60.0 mm

The rectangle on top of the slants in the center is ofcourse X100 long and Y50 long

the rectangle has 45 angle slants on it that are 20.0 wide in x/y planes (so actual width are 28.28mm).

My main question is: Can I use Q-parameters and LBL repeats to program a rectangle that incrementally gets bigger in X/Y by +2.00 and IZ-1.00??
Im aware that there is a multipass CYCLE231 for slants too but I was wondering about incremental programming with Q parameters.

Thanks and greets!! :willy_nilly:

Richard
 
yes you can,
If your not concerned about the tool corner radius, or have a sharp corner tool you could do it as follows

Write a label for the rectangle shape at the top of the part, assuming XY 0 is the center of the stock and Z0 is the top
Code:
LBL20
APPR LT X-50 Y+25 LEN 20 RL
L X+50
L Y-25
L X-50
L Y+25
DEP LT LEN 20
LBL 0

then call tool spindle on etc

set some q values that wont be used by cycle 25, safe to start at Q20 for example
Code:
Q20 = -1 ; Z START
Q21 = +1 ; X/Y STEP OUT START
Q22 = +0 ; START Z VALUE
Q23 = -20 ; FINISH VALUE

then call cycle 14 with label 20
Code:
CYCL DEF 14.0 CONTOUR GEOMETRY
CYCL DEF 14.1 CONTOUR LABEL20

then call cycle 25, inside a Label, we will substitute some values with our q values

Code:
LBL 1
CYCL DEF 25 CONTOUR TRAIN
Q1 = +Q20  ;MILLING DEPTH
Q3 = +Q21  ;ALLOWANCE FOR SIDE
Q5 = +Q22  ;SURFACE COORDINATE
Q7 = +50   ;CLEARANCE HEIGHT
Q10 = +Q20 ;PLUNGING DEPTH
Q11 = +150 ;FEED RATE FOR PLNGNG
Q12 = +500 ;FEED RATE F. ROUGHING
Q15 = +1   ;CLIMB OR UP-CUT 
CYCL CALL
FN0:Q20 = +Q20-1 ;STEP DOWN 1MM IN Z
FN0:Q21 = +Q21+1 ;STEP OVER 1MM IN X/Y 
FN11:IF +Q21 GT +Q23 GOTO LBL 1
FN9:IF +Q21 EQ +Q23 GOTO LBL 1
L Z+200 FMAX M05
LBL 0

This will run a cutter around the rectangle and step down and across 1mm until it reaches -20
this is a very simple solution and doesnt take into account tool corner radius.

you can do a bit more math with trig etc and come up with a soloution that allows for tool corner rad and also allows the angle to be programmed too.
this would allow you to machine a draft on any shape defined by a contour train.

hope this helps

Andrew
 
Last edited:
Thanks for the help, but it didn't give the desired result. :nutter:
It did give me insight on how to incrementally move axis movements with Q-parameter programming though.
After the CYCLE CALL in LBL 1 you wrote:

FN0:Q20 = +Q20-1 ;STEP DOWN 1MM IN Z
FN0:Q21 = +Q21+1 ;STEP OVER 1MM IN X/Y


but aren't the FN0's supposed to be FN2 and FN1? FN2 being substraction and FN1 being adding?
It also didnt take the contour into consideration. It just build a pyramid from Z0 to Z-unendless with a -1 in incremental difference.
Would be nice to fix this but I thank you already for pointing me in the right direction. :dunce:

Example1.jpg
 
Ok we had downtime on the machine so I went straight at it and solved it: :codger:

BEGIN PGM test1 MM

TOOL CALL 1 Z S1500 F500
L X-70 Y+25 R0 FMAX M3
L Z+0 R0 FMAX

Q20 = - 1 ; INCR Z MOVE
Q21 = + 1 ; INCR X/Y MOVE
Q22 = + 0 ; Z SURFACE START
Q23 = - 20; MAX Z DEPTH

CYCL DEF 14.0 CONTOUR GEOMETRY
CYCL DEF 14.1 CONTOUR LABEL20

LBL 1
CYCLE DEF 25 CONTOUR TRAIN
Q1= +Q20 ;MILLING DEPTH
Q3= +Q21 ;ALLOWANCE FOR SIDE
Q5= +Q22 ;SURFACE COORDINATE
Q7= +50 ;CLEARANCE HEIGHT
Q10= -Q20 ;PLUNGING DEPTH
Q11=+150 ;FEED RATE FOR PLNGING
Q12=+500 ;FEED RATE F. ROUGHNG
Q15= +1 ;CLIMB OR UP-CUT
CYCL CALL
FN 2: Q20 =+Q20 - +1
FN 1: Q21 =+Q21 + +1
FN 11: IF +Q20 GT +Q23 GOTO LBL 1
LBL 0
L Z+1700 R0 FMAX M2 OR M30

LBL 20
APPR LT X-50 Y+25 LEN20 RL
L X+50
L Y-25
L X-50
L Y+25
DEP LT LEN20
LBL 0

END PGM TEST1 MM


What basicly happens here is you keep repeating the allowance for side and milling depth+plunging depth from CYCL 25 in a LBL described in CYCL 14 until the depth (incremental Z-1) is Greater Than Q23 (maximum depth) and then it stops repeating the LBL and read the program further to an M2 or M30 stop.

Thanks a lot for helping!

Greets R.
 
Hi yes there was a few mistake in the as I was programming from memory.
the FN 0: should have been a formula
I did get it to work, however there was an issue with the finished shape having rounded corners due to the way increasing the finishing allowance works.
I then came up with a different solution which does what i wanted:

Again assuming the datum is set at the center of the rectangle.
(i downloaded the tnc programing station and ran the code and it works fine.)
Capture.jpg
Code:
FN 0:Q20 = +100 ;X SIDE LENGTH
FN 0:Q21 = +50 ; Y SIDE LENGTH
FN 0:Q22 = +1 ; X/Y STEPOUT
FN 0:Q23 = -20; Z FINISH DEPTH
FN 0:Q24 = -1 ; Z FIRST PASS DEPTH
LBL 1
CYCL DEF 14.0 CONTOUR
CYCL DEF 14.1 CONTOUR LABEL20
CYCL DEF 25 CONTOUR TRAIN
Q1 = +Q24
Q3 = +0
Q5 = +0
Q7 = +50
Q10 = +Q24
Q11 = +150
Q12 = +1500
Q15 = +1
CYCL CALL
Q20 = Q20 + Q22
Q21 = Q21 + Q22
Q24 = Q24 - Q22
FN 11:IF Q24 GT Q23 GOTO LBL 1
FN 9:IF Q24 EQ Q23 GOTO LBL 1
L Z200 R0 FMAX M05
LBL 0
M2
LBL 20
Q25 = Q20 / 2
Q26 = Q21 / 2
APPR LT X-Q25 Y+Q26 LEN20
L X+Q25
L Y-Q26
L X-Q25
L Y+Q25
DEP LT LEN20
LBL 0

so in this example I am directly manipulating the size of the rectangle in label 20 with q values that are incremented inside label 1
this results in a rectangle with sharp corners like it should.

You dont need to use contour train but it automatically handles all the Z moves and clearances etc.

hope this makes a bit more sense
 
Thanks a lot for responding!

To make the programmingn truly dependable on a few Q parameters you shouldnt link the incremental steps of X/Y to Z
also if you give the total length a divide of 2 + the increment of x/y you only take half of the increment in x/y and full in Z,
resulting in a 60 degrees angle and not 45.

I gave the incremental steps for Z-axis a seperate Q parameter and i removed the division by 2 and simply put in half of the length in total length, and half of total width in width so it wouldnt need the division by 2 thus creating a 60 degrees angle.

Now im gonna try some tapering too and see if i can implement the angles in the formulas.
The possibilities are almost endless in this way, I can stay away from EdgeCam now for the simple contours! :willy_nilly:
 
Hi yes, it is indeed very powerful for making even relativley complex stuff right at the control.
Im am very new to Heidenhain controls, I only started using 5 weeks ago so I am still learing alot, and on a tnc415 which is far less powerful than the iTNC530 like the Cincinatti FTV1800 we also have.
 








 
Back
Top