Hello,
Definitely posted in the wrong spot before
I'm currently programming a palletizing robot for a project at my work. I'm not the most experienced but think I've picked up on it okay for not having been to a training or done one before. I'm running into a problem now in my structure or formatting of my program. I can post more of my program if needed to answer the question but the section below is where the error is being thrown. It actually says line 33 of the program which is the first 'CASE TRUE' but if I comment out the section in red (not sure if color formatting works inside the code section, but its the section inside the asterisks) the program runs fine. Can you not put an IF statement in a CASE X OF scenario?
Regardless of this, what I'm working towards is to monitor the three pallet overall heights so that the movements can be lower if there are less boxes and then dynamically change as the pallets get built. Any help is appreciated.
.PROGRAM pal1_pat1();
ACCURACY 5 ALWAYS
SPEED 1000 MM/S ALWAYS
JMOVE #abovepal1_pat1
POINT pal1_pat1 = #pal1_pat1
palletHeight1 = BITS(1133,7)
palletHeight2 = BITS(1140,7)
palletHeight3 = BITS(1147,7)
ztotal1 = BITS(1175,9)
zshift1 = BITS(1230,9)
layer1 = BITS(1163,4)
row1 = BITS(1154,3)
xshift1 = BITS(1202,9)
POINT pal1_place1 = TRANS(xshift1*row1,0,ztotal1*layer1)+pal1_pat1
SPEED 1000 MM/S ALWAYS
ACCURACY 1 ALWAYS
POINT pal1_place1 = SHIFT(pal1_place1 BY 0,0,zshift1)
TWAIT 0.05
JAPPRO pal1_place1,(ztotal1+100)
SPEED 800 MM/S ALWAYS
LMOVE pal1_place1
SIGNAL 39 ; TURN VACUUM OFF
SWAIT 1039 ; VACUUM IS OFF
LDEPART 100
SIGNAL 61 ; Load1 Cnt
ACCURACY 5 ALWAYS
SPEED 1000 MM/S ALWAYS
JMOVE #abovepal1_pat1
SIGNAL -61 ; Load1 Cnt
SPEED 700 MM/S ALWAYS
JMOVE #place_approach
5
CASE TRUE OF
VALUE SIG(1041):
RETURN
END
CASE TRUE OF
VALUE SIG(1042):
CALL lane2
END
;*****************************
;CASE TRUE OF
;VALUE SIG(1043):
; IF palletHeight1>53 THEN
; LDEPART 300
; HOME 1
; END
; ELSE
; HOME 1
; END
;END
;*****************************
CASE FALSE OF
VALUE SIG(1041),SIG(1042),SIG(1043),SIG(1044),SIG(1045):
GOTO 5
END
.END
Display More