P5: Oscillation - only 840D sl
11.5 Examples
Extended Functions
Function Manual, 03/2013, 6FC5397-1BP40-3BA1
675
Program code Comment
; always, when the marker with index 1 equals 1,
; then set the axial override of the feed axis
; to 0 (to prevent a new premature
; infeed!) and set the
; axial override of the oscillation axis to 100%
; (so that the previous
; synchronized action is canceled!)
WHENEVER $AC_MARKER[1]==1 DO $AA_OVR[X]=0 $AA_OVR[Z]=100
;
; When the current position of the oscillating axis
; is equal to the reversal position 1,
; then reset the marker with index 2,
; release the first synchronized action (no
; infeed when reaching the start position
; == reversal position 1)
WHEN $AA_IW[Z]==$SA_OSCILL_REVERSE_POS1[Z] DO $AC_MARKER[2]=0
;
;----------------------------------
N750 OSCILL[Z]=(X) POSP[X]=(5,1,1)
; Assign axis X to the oscillation axis Z as infeed axis,
; this should infeed to end position 5
; in substeps of 1 and the sum of all sublengths
; should be exactly the same as the end position.
;
N780 WAITP(Z) ; release the Z axis
;
N790 X0 Z0
N799 M30 ; End of program
Description
The starting position matches reversal point 1. The WHEN .... synchronized actions (see
above) prevent an infeed when the starting position is reached.