Open crossing barrier plan for Ayrshire and Highlands
Barriers could be installed at 23 open level crossings on Scottish railway lines.
Network Rail has told MSP Dave Thompson that a new type of barrier system will be tested at two sites in Ayrshire.
If the trials are successful, the company plans to roll-out the system to the other crossings, all of them in the Highlands.
Mr Thompson, SNP MSP for Skye, Lochaber and Badenoch, has been campaigning for extra safety measures.
He said the new type of barrier could be installed for an average cost of £100,000.
The costs of putting in place older barrier systems runs to more than £500,000.
The trials will be held at two sites in Ardrossan.
Network Rail route managing director for Scotland, David Simpson, confirmed the details with Mr Thompson.
The MSP said: "I am relieved that we will soon see public safety at Scotland's level crossings improved dramatically through this measure.
"I believe that through this step, the current personnel at Network Rail are doing all they can to bring to an end the regular toll of accidents at level crossings and I commend them for that."
Mr Simpson said Network Rail was committed to enhancing safety on railways.
He added: "We are also seeking to close crossings where possible and investing in other additional safety measures such as police CCTV monitoring vans and additional fixed cameras for level crossings to deter driver misuse."