What's new
What's new

Heidenhain cycle 7 / general 5 axis programming

BRIAN.T

Cast Iron
Joined
Jul 23, 2018
Location
Los Angeles
This is going to be specific to heidenhain/mastercam. But ill make it as general as possible for you fanuc people.

When i first started programming 5 axis about a year ago the machine apps guy told me to change WCS and Tplane for each plane change, as long as i had the same fixture offset number everything worked fine with my post, and is actually a really easy way to program. in this situation my post took advantage of heidenhain's cycle 7. (if you're unfamiliar ill explain below).

My post builder later told me this was incorrect, and that WCS should be left at "top" (which is how the rest of the world does it), in this situation, no cycle 7, but everything works just fine.

Cycle 7 on heidenhain is a code that switches your coordinate system to wherever you're Tplane is built. So if you're drilling .500 deep holes in a 2" cube (you've probed the center and top of that cube as your work offset). The hole drilled on the top of the part with B at 0, your control will show a drill depth of -.500, tilt the table 90 degrees and your control will change coordinates to show a drill depth of z-.500, as opposed to z +.500 from the probed position. i find cycle 7 to be helpful for set up, as well as when my guys change tools, they can single block to make sure their tool is in approximately the right spot (z+.1 above top of part at 90 degrees, instead of z+3.925 or whatever)

So when you guys are doing 5 axis work, at the control do you expect all your numbers to come from the probed position, or do you take advantage of plane shift type codes (not sure what fanuc calls it).

Furthermore, what would then be the purpose of cycle 7? i see 4 different scenarios.

1)one part, one work offset, all coordinates coming from probed position
2)one part one work offset, all coordinated shifted to various faces/planes of part- cycle7
3)two parts, two work ordinates, coordinates coming from each independent work offset
4)two parts, one work offset, cycle 7 controlling coordinate shift for each part (only adjustable in CAM, and per my post builder, the correct way to use cycle 7, which to me seems pointless.



CYCLE 7.jpg
 
In my setup things are done with PLANE AXIAL (rotates plane around) or M128 for some funky stuff.
My system has not generated or used CYCL 7 for some time.

I always work from 1 work offset (typically probed top and center)

Which cycles are used has changed over the last 14 years with various controller updates and bugs.

This is on an iTNC530.

So I would expect you do probe once (there's one machine coordinate system so CYCL DEF 247 Q339=<something> only happens once.)
In the CAM system, various planes may be set up as secondary working planes (in solidcam MAC1 (1-position) and MAC1 (2-position) - as example.

The G-code for this kind of 3+2 stuff looks like:
PLANE AXIAL B-90.0 C+0.0 STAY ; particular example I just coded up
L B-90.000 F50000
....
<machine the side of the part>

....
I don't know anything about mastercam or its posts.
 
In my setup things are done with PLANE AXIAL (rotates plane around) or M128 for some funky stuff.
My system has not generated or used CYCL 7 for some time.

I always work from 1 work offset (typically probed top and center)

Which cycles are used has changed over the last 14 years with various controller updates and bugs.

This is on an iTNC530.

So I would expect you do probe once (there's one machine coordinate system so CYCL DEF 247 Q339=<something> only happens once.)
In the CAM system, various planes may be set up as secondary working planes (in solidcam MAC1 (1-position) and MAC1 (2-position) - as example.

The G-code for this kind of 3+2 stuff looks like:
PLANE AXIAL B-90.0 C+0.0 STAY ; particular example I just coded up
L B-90.000 F50000
....
<machine the side of the part>

....
I don't know anything about mastercam or its posts.


Thanks for the reply, i suppose its less specific to mastercam post and more related to the code itself. see below. ive posted two sections of cude, one with cycle 7 and the other without. given that you dont use cycle 7, i think i know my answer, but ill ask anyway. in the code below ive removed a lot of the unimportant lines, this is just for discussion.


-----------------------------------------------

With cycle 7 -

38 ; --- drill top hole ---
39 PLANE RESET STAY
40 CYCL DEF 7.0 DATUM SHIFT
41 CYCL DEF 7.1 X0.0000
42 CYCL DEF 7.2 Y0.0000
43 CYCL DEF 7.3 Z0.0000

44 PLANE SPATIAL SPA+0.000 SPB+0.000 SPC+0.000 STAY SEQ- TABLE ROT
45 L M140 MB MAX
46 L X+0.0000 Y+0.0000 F MAX M03
47 L B+0.000 C+0.000 R0 F MAX M126
48 L Z+2.0000 F MAX
49 CYCL DEF 200 DRILLING ~
Q200 = 0.1 ;Setup Clearance ~
Q201 = -0.5 ;Total Depth ~
Q206 = +876 ;Plunge Feedrate ~
Q202 = 0.5 ;Plunge Depth ~
Q210 = 0 ;Dwell at Top ~
Q203 = 0 ;Surface Position ~
Q204 = 2 ;Final Setup Clearance ~
Q211 = 0 ;Dwell at Bottom

/
/
/
81 ; --- drill left hole ---
81 PLANE RESET STAY
82 CYCL DEF 7.0 DATUM SHIFT
83 CYCL DEF 7.1 X1.0000
84 CYCL DEF 7.2 Y0.0000
85 CYCL DEF 7.3 Z-1.0000

86 PLANE SPATIAL SPA+0.000 SPB+90.000 SPC+0.000 STAY SEQ+ TABLE ROT
87 L M140 MB MAX
88 L X+0.0000 Y+0.0000 F MAX M03
89 L B+90.000 C+0.000 R0 F MAX M126
90 L Z+2.0000 F MAX
91 CYCL DEF 200 DRILLING ~
Q200 = 0.1 ;Setup Clearance ~
Q201 = -0.5 ;Total Depth ~
Q206 = +876 ;Plunge Feedrate ~
Q202 = 0.5 ;Plunge Depth ~
Q210 = 0 ;Dwell at Top ~
Q203 = 0 ;Surface Position ~ <--- note surface position at B90
Q204 = 2 ;Final Setup Clearance ~
Q211 = 0 ;Dwell at Bottom
92 ;------ Start Cycle ------
93 L X+0.0000 Y+0.0000 F MAX M99
94 ;------ End Cycle ------
95 ;Macro '3_PLUS_2_END_STANDARD' Selected.


-------------------------------------------------------

without cycle 7


39 ; --- drill top hole ---
40 PLANE RESET STAY
41 CYCL DEF 7.0 DATUM SHIFT
42 CYCL DEF 7.1 X0.0000
43 CYCL DEF 7.2 Y0.0000
44 CYCL DEF 7.3 Z0.0000

45 PLANE SPATIAL SPA+0.000 SPB+0.000 SPC+0.000 STAY SEQ- TABLE ROT
46 L M140 MB MAX
47 L X+0.0000 Y+0.0000 F MAX M03
48 L B+0.000 C+0.000 R0 F MAX M126
49 L Z+2.0000 F MAX
50 CYCL DEF 200 DRILLING ~
Q200 = 0.1 ;Setup Clearance ~
Q201 = -0.5 ;Total Depth ~
Q206 = +876 ;Plunge Feedrate ~
Q202 = 0.5 ;Plunge Depth ~
Q210 = 0 ;Dwell at Top ~
Q203 = 0 ;Surface Position ~
Q204 = 2 ;Final Setup Clearance ~
Q211 = 0 ;Dwell at Bottom
51 ;------ Start Cycle ------
52 L X+0.0000 Y+0.0000 F MAX M99
53 ;------ End Cycle ------
/
/
/
81 ; --- drill left hole ---
82 PLANE RESET STAY
83 CYCL DEF 7.0 DATUM SHIFT
84 CYCL DEF 7.1 X0.0000
85 CYCL DEF 7.2 Y0.0000
86 CYCL DEF 7.3 Z0.0000

87 PLANE SPATIAL SPA+0.000 SPB+90.000 SPC+0.000 STAY SEQ+ TABLE ROT
88 L M140 MB MAX
89 L X+1.0000 Y+0.0000 F MAX M03
90 L B+90.000 C+0.000 R0 F MAX M126
91 L Z+3.0000 F MAX
92 CYCL DEF 200 DRILLING ~
Q200 = 0.1 ;Setup Clearance ~
Q201 = -0.5 ;Total Depth ~
Q206 = +876 ;Plunge Feedrate ~
Q202 = 0.5 ;Plunge Depth ~
Q210 = 0 ;Dwell at Top ~
Q203 = 1 ;Surface Position ~ <--------surface position z + 1.0"
Q204 = 2 ;Final Setup Clearance ~
Q211 = 0 ;Dwell at Bottom
93 ;------ Start Cycle ------
94 L X+1.0000 Y+0.0000 F MAX M99
95 ;------ End Cycle ------


---------

heidenhain itnc530 shows programmed drill depth as either z-.500 from cycle 7 plane or z+.500 from probed position without cycle 7.
 
OK, surface position is in "Z" (at least for the tool) - and you have rotated the coodinate system around a point on the top. So the Z of the top face is 0, but the Z of the side face (left face in example below) is 0.5" (on a 1" cube.) If you set the WCS up to be in the middle of the stock (hard to probe that), then Q203 should be 1/2 cube dimension for both top and side.

Here's similarly snipped for brevity code - but this is solidcam using a post that generates PLANE AXIAL. WCS is top center of the top face of the cube. 2nd hole is on the "left face" - so just a B-90 to get at it.

5 CYCL DEF 247 DATUM SETTING ~
6 Q339=+1 ;DATUM NUMBER

16 TOOL CALL 1 Z S1000 ; DRILL
17 M3
19 PLANE AXIAL B+0.0000 C+0.0000 STAY
20 L B+0.0000 F5000
21 L C+0.0000 FMAX
22 L X+0.0000 Y+0.0000 FMAX
23 L Z+1.0000 FMAX
24 CYCL DEF 200 DRILLING ~
Q200=+0.1000 ;SET-UP CLEARANCE ~
Q201=-0.3251 ;DEPTH ~
Q206=+13 ;FEED RATE FOR PLNGNG ~
Q202=+0.3251 ;INFEED DEPTH ~
Q210=+0 ;DWELL TIME AT TOP ~
Q203=-0.0000 ;SURFACE COORDINATE ~ ; Z is 0 because we're at the face we probed in the middle of the cube
Q204=+0.9000 ;2ND SET-UP CLEARANCE ~
Q211=+0.0 ;DWELL TIME AT DEPTH
25 L X+0.0000 Y+0.0000 FMAX M99 ; X0 and Y0
26 ; OPERATION NAME = D-DRILL1
27 M129

33 PLANE AXIAL B-90.0000 C+0.0000 STAY ; this will rotate the coordinates so the same WCS is facing B-90 - due left.
34 L B-90.0000 F5000
35 L C+0.0000 FMAX
36 L Z+1.5000 F5000
37 L X-0.5000 Y+0.0000 F5000
38 CYCL DEF 200 DRILLING ~
Q200=+0.1000 ;SET-UP CLEARANCE ~
Q201=-0.3251 ;DEPTH ~
Q206=+13 ;FEED RATE FOR PLNGNG ~
Q202=+0.3251 ;INFEED DEPTH ~
Q210=+0 ;DWELL TIME AT TOP ~
Q203=+0.5000 ;SURFACE COORDINATE ~ ; Z+0.5 is 1/2 width of cube - if 0 would be starting in middle of stock.
Q204=+0.9000 ;2ND SET-UP CLEARANCE ~
Q211=+0.0 ;DWELL TIME AT DEPTH
39 L X-0.5000 Y+0.0000 FMAX M99 ; note the X-5 (x is up/down now) - X0 is former Z0 which was top of part....

That's all with solidcam programmed in one style of coodinate system setup, which only requires probing one location.

(Has this answered your question? I guess the main point is that I wouldn't be fiddling about with cycl 7...)
 








 
Back
Top