I was reading the AS language manual today, specifically, the sample palletizing program and was wondering:
How would i add a vertical stack to the program?
Code
.Program palletize()
1;Initial settings (3 rows, 4 columns, X shift = 90 mm, Y shift = 100 mm,
;SPEED 100%, ACCURACY 100 mm)
2row.max = 3
3col.max = 4
4xs = 90
5ys = 100
6SPEED 100 ALWAYS
7ACCURACY 100 ALWAYS
8OPENI
9;Start palletizing
10FOR row = 1 TO row.max
11FOR col = 1 TO col.max
12JAPPRO #a,100;Steps 12 through 17 pick up the part from the parts feeder.
13SPEED 30
14ACCURACY 1
15LMOVE #a
16CLOSI
17LDEPART 200
18;
19JAPPRO put, 200;Steps 19 through 24 place the part on the pallet.
20SPEED 30
21ACCURACY 1
22LMOVE put
23OPENI
24LDEPART 200
25;
26;Calculate the pose for the part in the next row.
27POINT put = SHIFT(put BY xs, 0, 0)
28END
29;
30;Calculate the pose for the part in the next column.
31POINT put = SHIFT(start BY 0, ys*row, 0)
32END
.END
Display More
Also, when it does the column shift on step 31, why is the 'y' shift value multiplied by the value called 'row'?