If it is ATV312 :- The ATV312 drive does not have pump under load or pump dry run protection function, since the drive is not designed for pump application. However it can be used for pump application with dry run protection, If you are using dry run sensor. The dry run or level sensor output (digital only) should be connected to drive digital input to stop the motor.
If it is ATV312 Solar :- If you use ATV312 solar drive, it has a dedicated function of "Pump Under Load - UL" protection, which can be used to stop the pump during dry run. Please refer the extracted pages from manual will guide you for the dedicated parameter setting of under load protection. This function does not require a external dry run sensor.
If you are using dry run sensor, the dry run sensor relay output (digital only) should be connected to drive's any of digital input to stop the motor. In this case the drive parameter "External Fault Ass - ETF" should be configured