Professional Documents
Culture Documents
WINSEM2020-21 ECE2008 ETH VL2020210502875 Reference Material I 01-Jun-2021 Programming
WINSEM2020-21 ECE2008 ETH VL2020210502875 Reference Material I 01-Jun-2021 Programming
routine PICK
-- Pick a work piece from the pallet
var
TARGET : position -- target pose
begin
IR1=IR1+1
If IR1>NR1
then
IR1=1
IC1=1+1
If IC1>NC1
Then
IC1=1
-- get a new pallet
dout[OSIG1]=true
-- notify pallet changer
wait for din[ISIG1]+
-- wait for input line to go high
Contd.
routine PLACE
-- Place a work piece on the output pallet
var
TARGET : position -- target pose
begin
IR2=IR2+1
If IR2>NR2
then
IR2=1
Contd.
IC2=1+1
If IC2>NC2
Then
IC2=1
-- get a new pallet
dout[OSIG2]=true
-- notify pallet_changer
wait for din[ISIG2]+
-- wait for input line to go high
-- meaning pallet has been changed
dout[OSIG2]=false
-- turn off our output signal
-- compute target pose
endif
endif
TARGET=BASE2
-- start with (1,1) pose
shift (TARGET,(IR2-1)*DR2+(IC2-1)*DC2)
-- shift for row and col offset
Main program
begin
IR=0 ;IC1=0
IR2=0;IC2=0
initialize other variable
--
-- BASE1,NR1,NC1,DR1,DC1,ISIG1,OSIG1
--
-- BASE2,NR2,NC2, DR2,DC2,ISIG2,ISOG2
--
-- numerical pose defined omitted here
Open hand1
while true do -- loop
pick
place
endwhile
end PALLET
INDUSTRIAL APPLICATION
Contd.
Contd.