How to control 12v dc motor (peristaltic pump) using function

Thanks for replying

Well i was going to control the peristaltic pump based on the input. for example if the user input 300 for the tds then the peristaltic pump will turn on. And if the inputs are 500 or above the peristaltic pump turn on a bit longer.

TDS is total dissolved solids, its basically to measure how many minerals contained in the water.

As for the three TDS OUT nodes, its just copypaste from the first one.

I will try to make a simple formula first.