Metra expects an automatic braking crash-prevention system will be ready sometime this fall on its BNSF Line, officials said at a Wednesday meeting.

Positive train control uses technology to stop a train if there’s danger of an imminent crash. Congress mandated major railroads to install the upgrade after a deadly 2008 commuter train crash in California, but the system is expensive and complicated.

Freight railroads are more advanced with positive train control than most commuter ones. The Union Pacific Railroad will be testing PTC later this year while Metra intends to be finished on its lines by the third or fourth quarter of 2019.

“You don’t just flip a switch and everything’s on,” Chief Engineering Officer Bruce Marcheschi said, adding it can take months as equipment is commissioned one by one.

On train lines Metra operates, which include the Milwaukee District and North Central Service, 78 percent of the hardware has been installed in locomotives and cars. Track work is continuing, along with completing the computer operating system, equipping radio towers and training employees.

The cost to set up PTC on Metra’s rail lines is about $385 million. Also on Wednesday, federal lawmakers announced the railroad was receiving $20 million in grant funding.

Typically, the stop system is triggered if an engineer fails to do something such as stop at a red signal. The technology will calculate factors such as the weight of the train, speed and how many feet it will require to stop.

“If you don’t do something at a certain point, you’ll get a warning,” Executive Director Don Orseno said. If the engineer fails to heed the warning, PTC “will safely stop the train,” he said.

Directors also approved a $11 million contract to modernize cameras on its trains. The move will replace old equipment, such as forward-facing cameras on locomotives. It also includes inward-facing cameras on locomotives and railcars, which are not on Metra trains now. The change follows Federal Railroad Administration rules. Cameras would record what train crews are doing to ensure they are operating safely and monitor passengers in case of problems or crime.