I have no idea what this machine’s purpose is, but repair works were being done at the local railway and this was being used. Never give up. I put the No. into Wikipedia (B40 UM-2) and found it. It is a temping machine?
“A tamping machine or ballast tamper, informally simply a tamper, is a self-propelled, rail-mounted machine used to pack 8or tamp) the track ballast under railway tracks to make the tracks and roadbed more durable and level”. And now we know what it is.FOWC with Fandango: Giant