Hello all.
I am using the following equipment:
KUKA KRC4 with Profinet-Profisafe (KSS 8.6)
S7-1200 F PLC (Tia portal V15.1)
So far, I have set up the communication with the Robot controller and the PLC over Profinet/Profisafe, this works.
I made an I/O table for the Robot controller and the PLC to communicate. So, with a certain input I call a module where a motion program is written. At the end of this motion program I set that a job was done and then wait for the PLC to reset the input that triggered the execution of this module and then I also reset the job done bit.
Main program example:
DEF MainProg ( )
LOOP
WHILE di_GoHome
GoHome()
ENDWHILE
CONTINUE
while di_VstpTrk_P1_Start or di_VstpTrk_P2_Start
TrakPickup()
ENDWHILE
CONTINUE
WHILE di_VstTM1_Start or di_VstTM2_Start or di_VstTM3_Start or di_VstTM4_Start
TRF_2TM()
ENDWHILE
CONTINUE
while di_OdvTM1_Start or di_OdvTM2_Start or di_OdvTM3_Start or di_OdvTM4_Start
Odv_TM()
endwhile
CONTINUE
;--Natikanje matice--
ENDLOOP
END
Display More
Example of a module goHome() :
EF Home_Rutina ( )
;FOLD PTP HOME CONT Vel=100 % PDAT12 ColDetect[1];%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.old; Kuka.IsGlobalPoint=False; Kuka.PointName=HOME; Kuka.BlendingEnabled=True; Kuka.APXEnabled=False; Kuka.MoveDataPtpName=PDAT12; Kuka.VelocityPtp=100; Kuka.CurrentCDSetIndex=1; Kuka.MovementParameterFieldEnabled=True; IlfCommand=PTP
;ENDFOLD
$BWDSTART = FALSE
PDAT_ACT = PPDAT12
FDAT_ACT = FHOME
BAS(#PTP_PARAMS, 100.0)
SET_CD_PARAMS (1)
PTP XHOME C_Dis
;ENDFOLD
CONTINUE
do_VIzhod_VstpTrak = TRUE
CONTINUE
wait for not di_Izhodisce_VstpTrak
CONTINUE
do_VIzhod_VstpTrak = FALSE
ENDWHILE
END
Display More
In short this is how I wrote the logic in the Robot controller. Almost too simple, right?
But I have more complex modules where I have several motion commands, followed up by a gripper control and in the end always the same procedure that is in the goHome module. I set the ‘OK’ bit wait for the start bit to be reset and then reset the OK bit again. When this module is executing, I get this error: Sequence of instructions that cannot be approximated – KSS01442
What advice could you give me so that I avoid getting these errors.
Thanks
Cheers
Aleix