Ok
First, a RC filter can be simulated in software using the equation
vout=exp(-T/(R*C))*vout+(1-exp(-T/(R*C)))*vin
Were T is the period or update time.
I will choose a period of 10 milliseconds so T = 0.010 second
This means there will be 100 duty cycles per second. It looks like the T could be chosed to be one millisecond but I doubt the PLC part can update the counter that fast. Every 10 milliseconds looks like a good place to start.
To provide 10 bit resolution the PWM output must be able to change the duty cycles from 0/1024 to 1024/1024. In some cases the hardware my only allow 0/1024 to 1023/1024. So there are 100 cycles per second and each one is divided into 1024 parts so the frequency input to the counter is counter is 100*1024=102400
The counter can be programmed to provide pulse outputs. I have seen this done a couple of ways and it depends on the microcontroller used. In all ways I have seen there are two registers. The most common way I have seen the PWM implemented there is 1 register that controlled the on time and another that controllers the off time. The sum of the two registers must be equal to 1024. Hopefully the PLC software deal with this.
Ripple. How much does the volatage output change worse case?
If you look at the equation above and assume vout=0 and apply and apply a 10 volt input over 10 milliseconds then
vout(T)=vout(0)*(1-exp(-T/(R*C))*10volts
since
vout(0)=0 and vin=10
vout(T)=(1-exp(-T/(R*C))*vin
This can be approximated by
vout(T)=(T/RC*T)*vin(T)
If RC=0.1 seconds an T=0.01 the ripple will be approximately
vout(T)=(1-exp(-T/(R*C))*vin
or about 0.9 volts. That is a lot of ripple even if it is worse case. The ripple can be reduced by about a factor of 10 by making the PWM cyclee rate faster by a factor of 10 or making the RC time constant longer by a factor 10. Both solutions aren't very good. First, I doubt the PLC microcontroller can update the PWM registers every millisecond. You could be satified with just updating the counters whenever you can after a one millisecond period expired. Note, this also means you need to program the counter to have an input 10 time higher or about 1024000 counts per second. Second, increasing the time constant by a factor of 10 makes the RC time constant 1 second which is very long. It will take 5 time constants for the signal to reach within 1% of the 10 volt input signal. I asked this before, how quickly must the valve be able to respond? Since the 1 millisecond sample time is doubtful the only other practical option is to lengthen the time constant or just use the ripple as a dither.
About time constants. Calculating the time constant is easy. Just multiply the resistor valve by the capacitor value. For example, a 100K ohm resistor used with a 1 microfarad capacitor will provide a 0.1 second time constant. Another option is a 10K ohm resistor and a 10 microfard will do. The practical aspect of this is that capactitors in the microfard range are relatively large.