(1) Any person walking or driving a VEHICLE and approaching a railroad-highway grade crossing under any of the circumstances stated in this section shall stop within 50 feet but not less than 15 feet from the nearest rail of such railroad and shall not proceed until he or she can do so safely. The foregoing requirements apply when:
(a) A clearly visible electric or mechanical signal device gives warning of the immediate approach of a railroad train;
(b) A crossing gate is lowered or a law enforcement officer or a human flagger gives or continues to give a signal of the approach or passage of a railroad train;
(c) An approaching railroad train emits an audible signal or the railroad train, by reason of its speed or nearness to the crossing, is an immediate hazard; or
(d) An approaching railroad train is plainly visible and is in hazardous proximity to the railroad-highway grade crossing, regardless of the type of traffic control devices installed at the crossing.
(2) No person shall drive any VEHICLE through, around, or under any crossing gate or barrier at a railroad-highway grade crossing while the gate or barrier is closed or is being opened or closed.
(3) A violation of this section is a noncriminal traffic infraction, punishable pursuant to chapter 318 as either a pedestrian violation or, if the infraction resulted from the operation of a VEHICLE, as a moving violation.