Produce and amplify analog signal with microcontroller (For PLC)
There is a simpler way to do that with PWM + Filter, you don't need a DAC and is much easier to translate to 10V and is cheaper.

The opamp is a buffer stage that is optional and depends if your PLC has a high impedance or not. You need a rail to rail opamp (might need a different part that there is on the schematic).

PWM signal is directly 0-3V or 0-5V and the output is 0-10V. The output might not be directly linear, but this you can adjust in the code.

This circuit will have a small ripple, you can add more R-C filter stages or increase C1 to reduce it.







simulate this circuit &ndash; Schematic created using CircuitLab