Firecrews dismantled the equipment to free the “badly injured” 27-year-old, who was then to hospital with a police escort.
A specialist trauma team was called to treat the man following the incident in the Leith area of Edinburgh this morning (Tues).
A spokeswoman for Lothian and Borders Fire and rescue said: “At five past nine we were called to assist the Scottish Ambulance Service. There was one male casualty trapped by his arm.
“Our crews supported the casualty and dismantled the machinery to allow the extraction to take place.”
She added that he was taken to Edinburgh Royal infirmary by the specialist medical team.
A police spokesman confirmed they had provided the support on the journey to hospital.
He said: “We attended with a fast escort to the hospital.”