Generating a 0-40 ohm signal

Are you trying to drive a known current ito a sensor? if so what current? ac or dc ?
if ac, what frequency?

How accurately do you need the 0 ohm end? if you can tolerate maybe 5 ohms or a bit less
something might be done.

Ifr you could provide details of the sensor we'd all be able to help you better...

regards

Allan