No person or government agency shall operate any train in such a manner as to prevent vehicular use of any roadway for a period of time in excess of five consecutive minutes except under any of the following circumstances:
(1) When necessary to comply with signals affecting the safety of the movement of trains.
(2) When necessary to avoid striking any object or person on the track.
(3) When the train is disabled.
(4) When the train is in motion except while engaged in switching operations.
(5) When there is no vehicular traffic waiting to use the crossings.
(6) When necessary to comply with a governmental safety regulation.