Hi there!
Can someone explain me this palletizer program. I understand variable definition, but main loop doesn't make sense for me.
AFAIK this program should allocate 16 boxes on pallet, how can i change it to allocate 9 boxes with space between equal 123mm?
Code
DEF USER_MAIN (PAR1 :IN,PAR2 :IN, PAR3 :IN,PAR4 :IN)
;Variable Declare
INT PAR1,PAR2,PAR3,PAR4
FRAME DELTA
;Initialisation
Par1=1
Par2=100
Par3=80
Par4=4
delta=$nullframe
;Counter i[3] for x and i[4] for Y
i[3]=i[3]+1
if (i[3]>par4) then
i[4]=i[4]+1
if (i[4]>par4) then
i[4]=1
endif
i[3]=1
endif
;Position offset in mm
delta.x=PAR2*(i[3]-1)
delta.y=PAR3*(i[4]-1)
END
Display More
Thanks.