Frequency signal voltage level shifter. Looking for an off-the-shelf solution.

I am building a PLC-based test machine that will simulate electrical and communication signals to be applied to various electronic devices under test. As part of the tests, we will generate PWM and PTO output signals in frequency ranges of 100 Hz to 20 kHz.

The problem is that we will need to generate these signals at variable output levels (5 V, 10 V, potentially others) and the PLC pulse generator modules have fixed 24 V outputs.

I am wondering if anyone knows of an off-the-shelf solution that can take the frequency signal as an input and shift it to a desired output level, configurable by means of a current or voltage input. DIN rail mounting is preferred.

Any guidance or advice would be greatly appreciated! Thanks.
I'm really reaching back into the dark distant past here, so don't bank on my memory being clear...
About 10 years ago, I was working as an intern. I built a test box that generated a PWM signal. I remember it had to be a bipolar square wave whose frequency, pulse width, and amplitude had to be variable. I remember starting with a 555 timer IC to establish the frequency, and maybe a second for the pulse width (or maybe a single 556 IC). I also remember using logic gates, a voltage divider, and saturated op-amps to get shift it to a bipolar signal. Then there was an output amplifier stage that set the output amplitude.

I have NO idea if I saved anything from that time or if I can find it. I'll try to look when I get a chance.

Edited to add:
I know you were looking for an off-the-shelf solution. I don't know of any. The circuit I built back then used pots to adjust the signal. It was intended for use with an oscilloscope. You might be able to build it so it uses a couple of analog inputs instead of the pots, but this is probably beyond the scope of what you're trying to do here.
I'm long out of the test and measurement instrumentation market, but I suspect that modern day waveform or frequency generators can make the signal wave forms you want and that an audio band amplifier is probably capable of creating the voltage range you need. Google is your friend.