Hi wbv8090,
I agree with Joe Tauser, as I have already done something similar to what you are trying to do.
At first I read the feed back value and subtracted it from my command value and then with the new value that went to the analog out, but doing it this way meant that there was going to be 10-20ms lag just because of hardware update rates and your program scan rate.
So I made my own circuit board that that uses a instrument op-amp, that I connect the feed back (0-10V) to and my command (0-10V) to, it then sends the value to the valve, and it does this in microseconds, very fast.
The circuit board uses a DC converter that takes 24dc input and dual outputs, +15V & -15V for the op-amp, along with a few resistors, capacitors, and terminal blocks the board cost is around $50, the custom made board being the most expensive. (Expresspcb)
I wish Unitronics would add this kind of feature, because it would be nice to have a programmable gain setting.
Hope this helps!
Deke