(1) Whenever any person driving a vehicle approaches a railroad grade crossing under any of the circumstances set forth in this section, the driver of such vehicle shall stop within fifty feet but not less than fifteen feet from the nearest rail of such railroad and shall not proceed until he or she can do so safely. The requirements of this subsection shall apply when:
(a) A clearly visible electric or mechanical signal device gives warning of the immediate approach of a railroad train or on-track equipment;
(b) A crossing gate is lowered or a flagperson gives or continues to give a signal of the approach or passage of a railroad train or on-track equipment;
(c) A railroad train or on-track equipment approaching within approximately one-quarter mile of the highway crossing emits a signal audible from such distance and such railroad train or on-track equipment, by reason of its speed or nearness to such crossing, is an immediate hazard;
(d) An approaching railroad train or on-track equipment is plainly visible and is in hazardous proximity to such crossing;
(e) A stop sign is erected at such crossing; or
(f) A passive warning device is located at or in advance of such crossing and an approaching railroad train or on-track equipment is audible as described in subdivision (c) of this subsection or plainly visible and in hazardous proximity to such crossing. For purposes of this subdivision, passive warning device means the type of traffic control device, including a sign, marking, or other device, located at or in advance of a railroad grade crossing to indicate the presence of such crossing but which does not change aspect upon the approach or presence of a railroad train or on-track equipment.
(2) No person shall drive any vehicle through, around, or under any crossing gate or barrier at a railroad crossing while such gate or barrier is closed or is being opened or closed.