Volvo idles erratically

1987 Volvo 780 with 118,000 miles idles fine when engine is cold. However, when it warms up it idles from a low of 500 rpm’s to a high of 1500 and then repeats the cycle every 3 seconds. Any thoughts?

I have similar problem with my 1988 volvo 780 with 265k. The engine surges (not always) when it is cold and hot. It is fine on the highway. I have not done anything yet. Would be nice to know what causes it. I suspect throtle body switch or idle valve.