[ I0.1 ]---[ / M0.1 ]---[ TON, PT=5s ]----------------( M0.1 ) (Once barrier is up, start a 5s timer. M0.1 is the timer's done bit.)

[ M0.1 ]---[ / I0.2 ]-----------------------------------( Q0.1 ) (After 5 seconds and if not fully down, lower the barrier until the lower limit switch.)

[ M0.0 ]---[ I0.1 ]-----------------------------------( RESET M0.0 ) (When the barrier reaches the top, unset the raise command.) [ M0.0 ]-----------------------------------------------( Q0.0 ) (Motor raises while commanded.)