main:
let dirsA = 16
let dirsB = 255
let dirsC = 0
Cell_4_4:
serout B.7, N4800, (254, 128, "COLOCAR BAG | ")
serout B.7, N4800, (254, 192, "EM POSICAO V ")
Cell_7_4:
if pinC.1=1 then
goto Cell_7_6
end if
goto Cell_7_4
Cell_7_6:
let varA = 0
let varB = 0
let varC = 0
Cell_7_10:
if pinC.3 = 1 then
goto Cell_10_10
end if
if pinC.4 = 1 then
goto Cell_10_17
end if
if pinC.5 = 1 then
goto Cell_10_24
end if
if pinC.6 = 1 then
goto Cell_10_31
end if
serout B.7, N4800, (254, 128, "SELECIONAR QUANT")
serout B.7, N4800, (254, 128, " 5L 10L 15L 20L ")
goto Cell_7_10
Cell_10_31:
high B.5
pause 1000
Cell_13_31:
if pinC.2 = 1 then
goto Cell_16_31
end if
pause 5000
Cell_13_28:
serout B.7, N4800, (254, 128, "Se erro corrigido")
serout B.7, N4800, (254, 128, "Prima botao 20L ")
if pinC.6 = 1 then
goto Cell_13_31
end if
goto Cell_13_28
Cell_16_31:
high B.4
pause 2000
low B.4
let varH = 150
let varI = 20
Cell_22_6:
high B.6
high B.3
if pinC.0 = 1 then
goto Cell_25_2
end if
goto Cell_22_6
Cell_25_2:
pause 0
let varA = varA + 1
if varA = 2 then
goto Cell_28_7
end if
Cell_25_13:
if pinC.7 = 1 then
goto Cell_28_13
end if
if varB = 30 then
goto Cell_28_16
end if
Cell_25_23:
if varC = varH then
goto Cell_28_23
end if
let varG = varC / 3
bintoascii varG, varTEMPBYTE1, varTEMPBYTE2, varTEMPBYTE3
serout B.7, N4800, (254, 128, "A ENCHER -> ", varTEMPBYTE1,varTEMPBYTE2,varTEMPBYTE3,"L")
bintoascii varI, varTEMPBYTE1, varTEMPBYTE2, varTEMPBYTE3
serout B.7, N4800, (254, 192, "SELEC BAG ", varTEMPBYTE1,varTEMPBYTE2,varTEMPBYTE3,"L ")
goto Cell_22_6
Cell_28_23:
low B.6
low B.3
pause 2000
low B.5
let varA = 0
let varB = 0
let varC = 0
let varH = 0
let varG = 0
Cell_28_35:
if pinC.1 = 1 then
goto Cell_28_37
end if
goto Cell_4_4
Cell_28_37:
serout B.7, N4800, (254, 128, " CICLO COMPLETO ")
serout B.7, N4800, (254, 128, " RETIRAR BAG ")
goto Cell_28_35
Cell_28_16:
let varB = 0
let varC = varC + 1
goto Cell_25_23
Cell_28_13:
stop
Cell_28_7:
let varA = 0
let varB = varB + 1
goto Cell_25_13
Cell_10_24:
high B.5
pause 1000
Cell_13_24:
if pinC.2 = 1 then
goto Cell_16_24
end if
serout B.7, N4800, (254, 128, "Erro Torre ")
serout B.7, N4800, (254, 128, "Verifique posicao")
pause 5000
Cell_13_21:
serout B.7, N4800, (254, 128, "Se erro corrigido")
serout B.7, N4800, (254, 128, "Prima botao 10L ")
if pinC.5 = 1 then
goto Cell_13_24
end if
goto Cell_13_21
Cell_16_24:
high B.4
pause 2000
low B.4
let varH = 75
let varI = 10
goto Cell_22_6
Cell_10_17:
high B.5
pause 1000
Cell_13_17:
if pinC.2 = 1 then
goto Cell_16_17
end if
serout B.7, N4800, (254, 128, "Erro Torre ")
serout B.7, N4800, (254, 128, "Verifique posicao")
pause 5000
Cell_13_14:
serout B.7, N4800, (254, 128, "Se erro corrigido")
serout B.7, N4800, (254, 128, "Prima botao de 5L ")
if pinC.4 = 1 then
goto Cell_13_17
end if
goto Cell_13_14
Cell_16_17:
high B.4
pause 2000
low B.4
let varH = 38
let varI = 5
goto Cell_22_6
Cell_10_10:
high B.5
pause 1000
Cell_13_10:
if pinC.2 = 1 then
goto Cell_16_10
end if
serout B.7, N4800, (254, 128, "Erro Torre ")
serout B.7, N4800, (254, 128, "Verifique posicao")
pause 5000
Cell_13_7:
serout B.7, N4800, (254, 128, "Se erro corrigido")
serout B.7, N4800, (254, 128, "Prima botao de 3L ")
if pinC.3 = 1 then
goto Cell_13_10
end if
goto Cell_13_7
Cell_16_10:
high B.4
pause 2000
low B.4
let varH = 1
let varI = 3
goto Cell_22_6