You can use the Limit function block to start a pump that drains a tank when it is full. In this example, the input to the Limit block is the tank level. When LIM_INDICATOR becomes True, the block sends a signal to a Discrete Output (DO) function block to turn the pump on and drain the tank. When LIM_INDICATOR goes to False (when OUT_LO_LIM is reached) the pump shuts off. The following figure is the function block diagram for this example: