Okay Thank you for the answer. That means I also have to maintain the instructions in the fold, as I did in this example:
Code
IF ( iakt_Mag == 1 ) THEN
TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO iAktPos = iKARTON_GP_VP
;FOLD PTP KARTON_GP_VP CONT Vel=100 % VP Tool[1] Base[1]:Magazin_A ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.old; Kuka.IsGlobalPoint=False; Kuka.PointName=KARTON_GP_VP; Kuka.BlendingEnabled=True; Kuka.MoveDataPtpName=PDAT1; Kuka.VelocityPtp=100; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=PTP
;ENDFOLD
$BWDSTART = FALSE
PDAT_ACT = PPDAT1
FDAT_ACT = FKARTON_GP_VP
BAS(#PTP_PARAMS, 100.0)
PTP XKARTON_GP_VP C_Dis
;ENDFOLD
ELSE
TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO iAktPos = iKARTON_GP_VP
;FOLD PTP KARTON_GP_VP CONT Vel=100 % VP Tool[1] Base[2]:Magazin_B ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.old; Kuka.IsGlobalPoint=False; Kuka.PointName=KARTON_GP_VP; Kuka.BlendingEnabled=True; Kuka.MoveDataPtpName=PDAT1; Kuka.VelocityPtp=100; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=PTP
;ENDFOLD
$BWDSTART = FALSE
PDAT_ACT = PPDAT1
FDAT_ACT = FKARTON_GP_VP
BAS(#PTP_PARAMS, 100.0)
PTP XKARTON_GP_VP C_Dis
;ENDFOLD
ENDIF
Display More
In this example, the base would have to change base depending on the variable value. But unfortunately this does not work as desired. Do I have to pay attention to anything else with the Fold statements?
With kind regards
Luke