CWP = potentiometer.
S = 0 - 2000mm
1500 = 1500mm max range
V = 0 - 10V voltage output.
Red 24V supply, Black supply ground, Yellow 10V output, White output ground.
You will need a voltage divider on the 10V output to drop the voltage to less than 3.3V to be fed to an analog input. I have little experience with the ESP32, but have read that the analog to digital converter in the ESP32 is not the best. Here is a tutorial on the ESP32 ADC.