Generating a 0-40 ohm signal

That requires measuring voltage and current.
"signal" could be DC, or not.
Leo..