diff --git "a/Paletiza\303\247\303\243o_v1/M\303\263dulos de programa/T_PROCESS/Main_Module_tProcess.mod" "b/Paletiza\303\247\303\243o_v1/M\303\263dulos de programa/T_PROCESS/Main_Module_tProcess.mod" index c27a2f6..2b6e584 100644 --- "a/Paletiza\303\247\303\243o_v1/M\303\263dulos de programa/T_PROCESS/Main_Module_tProcess.mod" +++ "b/Paletiza\303\247\303\243o_v1/M\303\263dulos de programa/T_PROCESS/Main_Module_tProcess.mod" @@ -30,13 +30,49 @@ MODULE Main_Module_tProcess !*** Verifica se o palete esquerdo foi retirado IF (DI_020_PAL_LEFT_RESET = 2) rReset_Pal 2; + !rBox_Fall; + ENDPROC !*** Reseta o palete (T_ROB1 / T_PROCESS) PROC rReset_Pal(num Pallet) - cPallet_Status{Pallet} := [0,1,1,0,0,FALSE]; + !cPallet_Status{Pallet} := [0,1,1,0,0,FALSE]; + !Incr cProduction_Part{Pallet}.Pallet_Rejected; ENDPROC + + !*** Rastreia queda de caixa + PROC rBox_Fall() + +! IF ( +! cSegment_Cur.Number = 22 OR +! cSegment_Cur.Number = 26 OR +! (cSegment_Cur.Number = 3 AND cProcess_Cur = 2) +! ) +! AND +! ( + +! ( +! ( +! cPallet_Drop{cPallet_Status{nCur_Pallet}.Pos_Cur}.Qtd_Box = 2 AND +! (DI_007_PRES_BOX_1 = 0 OR DI_008_PRES_BOX_2 = 0) +! ) +! OR bDry_Run = TRUE +! ) +! OR +! ( +! ( +! cPallet_Drop{cPallet_Status{nCur_Pallet}.Pos_Cur}.Qtd_Box = 1 AND DI_007_PRES_BOX_1 = 0 +! ) OR bDry_Run = TRUE +! ) + +! ) +! THEN +! Incr cProduction_Part{cPallet_Status{nCur_Pallet}.Part_In_Pallet}.Box_Fallen; +! STOP; +! ENDIF + + ENDPROC ENDMODULE \ No newline at end of file