Write your own controller
What is a controller, line by line? Write one in Structured Text, run it on the bench, and see how its edge cases show up in the tests.
The PI, written out
Pick Your own (ST) on the bench's controller list. It starts with the flow loop's PI written out in full: the error in % of span, the integral as a static, conditional integration for anti-windup, and tracking in manual. Run it and compare it with the built-in PI: the trends are identical, to the last decimal.
Leave out the edges
The same PI with the anti-windup and the manual tracking taken out (eight lines shorter). Now every test starts with a bump. Without tracking, its integral starts at zero instead of where the valve is, so its first move slams the valve (up to 54 % overshoot, IAE ten times worse). When the valve saturates it winds up too. Most of a real controller's code is about these edges, not the PID formula.
Now yours
Open either in the bench and change it. Try a gain that grows with the error (error-squared PI), a deadband, a different anti-windup, or a setpoint ramp in the controller. The Automation view turns your code into an FB (LL_Custom) for TIA Portal (with # prefixes) or any IEC 61131-3 PLC, with the call site.