0 votes
14 views
in cnc programming by (9.0k points)

In this article, we describe how to use Siemens CYCLE840 code on CNC machines with all details and examples.

The tool drills at the programmed spindle speed and feedrate to the entered final thread
depth.
With this cycle, tapped holes with compensating chuck can be made as follows:

Format

CYCLE840 (RTP, RFP, SDIS, DP, DPR, DTB, SDR, SDAC, ENC, MPIT, PIT, _AXN, _PTAB, _TECHNO)

RTP = Retraction plane (absolute)
RFP = Reference plane (absolute)
SDIS = Safety clearance (enter without sign)
DP = Final drilling depth (absolute)
DPR = Final drilling depth relative to the reference plane (enter without sign)
DTB = Dwell time at thread depth: ( always in effect if >0 programmed, Value range: 0<=DTB )
SDR = Direction of rotation for retraction ( Values: 0: (automatic reversal of direction of rotation); 3 or 4: (for M3 or M4)
SDAC = Direction of rotation after end of cycle
Values: 3, 4 or 5: (for M3, M4, or M5)
ENC = Tapping with/without encoder
Values: 0: with encoder, without dwell time
1: without encoder, program feed rate before cycle
11: without encoder, calculate feed rate during cycle
20: with encoder, with dwell time
MPIT = Thread pitch as thread size
Range of values:
3 (for M3) … 48 (for M48)
PIT = Thread pitch as a value
Range of values: 0.001 … 2000.000 mm), the sign determines the direction of rotation in the thread:
if _PTAB=0 or 1: in mm
if _PTAB=2: in thread grooves per inch
if _PTAB=3: in inches/rotation
_AXN = Tool axis
Values: 1: 1st geometrical axis
2: 2nd geometrical axis
otherwise 3rd geometrical axis
_PTAB = Evaluation of thread pitch PIT
Values: 0: corresponds to programmed measuring system inch/metric
1: pitch in mm
2: pitch in thread grooves per inch
3: pitch in inches/rotation
_TECHNO = Technological settings
Values :
UNITS DIGIT: Exact stop behavior
0: as programmed before cycle call
1: (G601)
2: (G602)
3: (G603)
TENS DIGIT: Feed-forward control
0: as programmed before cycle call
1: with feed-forward control (FFWON)
2: without feed-forward control (FFWOF)
Note: To repeat the cycle in more than one position, MCALL must be written at the beginning of the cycle. The MCALL command is active until the next call. If it is written after positioning the command, MCALL will be canceled.

MCALL Example :

X30. Y20.;
MCALL CYCLExx …….. ;
X10. Y10. ;
X-140. Y35. ;
MCALL;
M30;

Example

Siemens CNC Cycle840 Program Example

Tapping without encoder

In this program, a thread is tapped without encoder at position X35 Y35 in the XY plane; the tapping axis is the Z axis. The parameters SDR and SDAC for the direction of rotation must be assigned; parameter ENC is assigned the value 1, the value for the depth is the absolute value. Pitch parameter PIT can be omitted. A compensating chuck is used in machining.

N10 G90 G0 D2 T2 S500 M3 ; Specification of technology values
N20 G17 X35 Y35 Z60 ; Approach drilling position
N30 G1 F200 ; Setting the path feedrate
N40 CYCLE840 (59, 56, , 15, , 1, 4, 3, 1)
;Cycle call, dwell time 1 s, SDR=4, SDAC=3,
;no safety clearance, parameters MPIT, PIT
;are not programmed, i.e., the pitch
;results from the relationship of
;user-programmed F and S values
N50 M30 ; Program end

Tapping with encoder

In this program, a thread is tapped with encoder at position X35 Y35 in the XY plane. The
drilling axis is the Z axis. The pitch parameter must be defined, automatic reversal of the

direction of rotation is programmed. A compensating chuck is used in machining.

DEF INT SDR=0 ; Definition of parameters with
DEF REAL PIT=3.5 ; Value assignments
N10 G90 G0 D2 T2 S500 M4 ; Specification of technology values
N20 G17 X35 Y35 Z60 ; Approach drilling position
N30 CYCLE840 (59, 56, , 15, , , , , , , PIT)
;Cycle call, without safety clearance, with
;absolute depth specification, SDAC ENC, MPIT
;omitted (e.g., have a value of zero)
N40 M30 ; Program end

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...