Electronic dummy load with low value shunt (current sensing) resistor. This circuit can be driven from any DAC or even Arduino PWM with RC filter applied, thanx to the second opamp configured as noninverting amplifier, witch is amplifying voltage drop on shunt resistor. In CC mode 1V is 1A. In CV mode 5V is 30V (due to zener diode 30V is max). Second opamp should be bipolar powered or rail to rail.