P5: Oscillation - only 840D sl
11.5 Examples
Extended Functions
670 Function Manual, 03/2013, 6FC5397-1BP40-3BA1
11.5.3 Example 2 of oscillation with synchronized actions
Task
No infeed must take place at reversal point 1. At reversal point 2, the infeed must take place
at distance ii2 from reversal point 2; the oscillation axis must wait at this reversal point until
partial infeed has been executed. Axis Z is the oscillation axis and axis X the infeed axis.
Program section
Example 2: Oscillation with synchronized actions
Program code Comment
DEF INT ii2 ; Define variable for reversal area 2
;
OSP1[Z]=10 OSP2[Z]=60 ; explain reversal points 1 and 2
OST1[Z]=0 OST2[Z]=0 ; Reversal point 1: Exact stop fine
; Reversal point 2: Exact stop fine
FA[Z]=5000 FA[X]=100 ; Feed for oscillating axis, feed for infeed axis
OSCTRL[Z]=(2+8+16,1) ; Switch off oscillation motion at reversal point 2
; After delete distance-to-go, spark-out and end position
; Approach appropriately after delete distance-to-go
; Approach reversal position
OSNSC[Z]=3 ; 3 sparking-out strokes
OSE[Z]=70 ; End position = 70
ii2=2 ; Set reversal point range
WAITP(Z) ; permit oscillation for Z axis
;
; motion-synchronous actions:
; always, when the current position of the oscillating axis in the
; Machine Coordinate System
; less than the start of reversal area 2
; then set the axial override of the feed axis
; to 0%
; and set the marker with index 0 to value 0
WHENEVER $AA_IM[Z]<$SA_OSCILL_REVERSE_POS2[Z]-ii2 DO $AA_OVR[X]=0 $AC_MARKER[0]=0
;
; always, when the current position of the oscillating axis in the
; Machine Coordinate System
; greater or equal to reversal position 2
; then set the axial override of the oscillating axis
; to 0%
WHENEVER $AA_IM[Z]>=$SA_OSCILL_REVERSE_POS2[Z] DO $AA_OVR[Z]=0
;