Achieving MPPT of a solar panel with LM2596
Although MPPT trackers are based around typically a buck converter, there's additional actions from a control loop, in hardware or programming, that actively tracks the point where maximum power is being drawn from the cell - this varies a little with solar intensity, so you might find a fixed voltage that is good enough for most conditions, but it also varies a lot with cell temperature, so the controller does need to be able to compensate.
Since the solar intensity and cell temperature can vary, an MPPT tracker constantly adjusts the set point up and down, and compares the power generated, and aims to settle at the peak.To be able to vary the input, the controller changes the duty cycle of the buck converter, but obviously this assumes that the load (the battery pack) is capable of taking the full output, and once the battery reaches full charge the controller needs to limit the output voltage too, and the power available at the solar cell goes unused. Regulating only the input voltage would risk overcharging.
Increasing the duty cycle increases the load and decreases the voltage at the solar cell, and a simple regulator wired with the feedback at the input would do the opposite.
You're far batter off getting a dedicated MPPT controller.
I doubt that would work, the output will start to oscillate trying to compensate the error.
If you want to do MPPT on your solar panel, perhaps the easier way is to use devices that are made for that.
One way of doing so is to use a buck topology to which the switching is controlled by a MCU and to write some simple MPPT algo.
The MPP is not a fixed point but is highly depending on the amount of light shining on the panel. A MPP-Tracker is always checking the input power, slightly changing the point on the IU-curve and checking the resulting power again. By comparison of the power values the Tracker is able to determin, if the MPP is reached or if the point on the curve has to be shifted a bit.
This means, that you are not able do set a fixed value for your converter.