
FUNCTION FC45 : bool
VAR_TEMP
    i: INT;
END_VAR
VAR_INPUT
    section: INT;
    typeChariot: INT;
END_VAR

//renvois vrai ou faux si le chariot en position 0 de la section X est de type Y : type=> 0: sans rack; 1: rack vide; 2: rack plein
FC45 := false;
FOR i:=1 TO 9 DO
    IF "GestionChariotDB".chariot[i,0] = section AND "GestionChariotDB".chariot[i,2] = 0 AND "GestionChariotDB".chariot[i,1] = typeChariot THEN
        FC45 := true;
    END_IF;
END_FOR;
END_FUNCTION
