Using KR16 and in KRC2 how to arrange cubes in 4X4 matrix with distance between each placement is 100mm...a pre placement should 100mm in Z-axis before each placement of cubes in 4X4 manner...
Thankyou,
With regards
Vivek.D
Using KR16 and in KRC2 how to arrange cubes in 4X4 matrix with distance between each placement is 100mm...a pre placement should 100mm in Z-axis before each placement of cubes in 4X4 manner...
Thankyou,
With regards
Vivek.D
Are you after exact code or ideas on how to do it?
If you create a two dimensional array with your offsets from a corner of the cubes then you could use base shifting to arrange them.
DECL FRAME grid[4,4]
grid[0,0]={x 0,y 0,z 0,a 0,b 0,c 0}
grid[0,1]={x 100,y 0,z 0,a 0,b 0,c 0}
grid[0,2]={x 200,y 0,z 0,a 0,b 0,c 0}
grid[0,3]={x 300,y 0,z 0,a 0,b 0,c 0}
grid[1,0]={x 0,y 100,z 0,a 0,b 0,c 0}
grid[1,1]={x 100,y 100,z 0,a 0,b 0,c 0}
grid[1,2]={x 200,y 100,z 0,a 0,b 0,c 0}
grid[1,3]={x 300,y 100,z 0,a 0,b 0,c 0}
Declare a couple of integer variables row & depth and manipulate them in a loop to call your grid array before each set of moves.
Something like this: hand-program the point for the first block of the array. For this example, I will call it StartPoint.
DECL INT GridX, GridY
DECL FRAME ShiftFrame
FOR GridX = 1 TO 4 ; index along X axis of Base
FOR GridY = 1 TO 4 ; index along Y axis of Base
ShiftFrame = $NULLFRAME ; zero out all values
ShiftFrame.X = ((GridX-1) * 100) ; when Grid? is zero, offset will be 0
ShiftFrame.Y = ((GridY-1) * 100) ; Each increment of Grid? will move the point by 100mm
ShiftFrame.Z = 100 ; approach shift 100mm above drop point
PTP ShiftFrame : xStartPoint ; move to point 100mm above shifted position
ShiftFrame.Z = 0
LIN ShiftFrame : xStartPoint ; move straight down to drop point
; open gripper here
ShiftFrame.Z = 100
LIN ShiftFrame : xStartPoint ; move straight up to departure point
; go get next block here
ENDFOR ; Y axis pattern
ENDFOR ; X axis pattern
Display More
This is a fairly naive application using FOR loops. The pattern is laid out along the Y axis first, then shifts 100mm in X and repeats the Y pattern again, four times. The X and Y axes of the pattern will be parallel to the X and Y of the active Base. If you teach a Base frame aligned properly with how you want your blocks laid out, this will work well.
thank u...
It was helpful...