P5: Oscillation - only 840D sl
11.5 Examples
Extended Functions
674 Function Manual, 03/2013, 6FC5397-1BP40-3BA1
Program code Comment
; motion-synchronous actions:
; set marker with index 2 on 1 (initialization)
WHEN TRUE DO $AC_MARKER[2]=1
;
; always, when the marker with index 2 equals 0
; and the current position of the oscillating
axis
; does not equal the reversal position 1
; then set the marker with index 1 to 0.
;
WHENEVER ($AC_MARKER[2] == 0) AND $AA_IW[Z]>$SA_OSCILL_REVERSE_POS1[Z])
DO $AC_MARKER[1]=0
; always, when
the current position of the oscillating axis
; is less than the start of reversal range 2
;
; then set the axial override of the feed axis
; to 0 and set the marker with index 0 to
; 0
WHENEVER $AA_IW[Z]<$SA_OSCILL_REVERSE_POS2[Z]-6 DO $AA_OVR[X]=0 $AC_MARKER[0]=0
;
; always, when the current position of the oscillating axis
; is equal to the reversal position 1,
; then set the axial override of the oscillating axis
; to 0 and set the axial override of the
; infeed axis to 100% (so that the
; previous synchronized action is cancelled!)
WHENEVER $AA_IW[Z]==$SA_OSCILL_REVERSE_POS1[Z] DO $AA_OVR[Z]=0 $AA_OVR[X]=100
;
; always, when the distance-to-go of the partial infeed equals
0
;
; then Set the marker with index 0 to 1 and
; set the marker with index 1 to 1 and
WHENEVER $AA_DTEPW[X]==0 DO $AC_MARKER[0]=1 $AC_MARKER[1]=1
;
; always, when the marker with index 0 equals 1,
; then set the axial override of the feed axis
; to 0 to prevent a new premature
; infeed!
WHENEVER $AC_MARKER[0]==1 DO $AA_OVR[X]=0
;