Fig. 01: Connection of a four-wire sensor
Fig. 02: Connection of a three-wire sensor
Fig. 03: Current measurement with a two-wire sensor
References :
https://support.industry.siemens.com/cs/document/40913432/how-do-you-connect-a-sensor-to-the-analog-signal-modules-of-simatic-s7-1200?dti=0&lc=en-WW
http://www.plctalk.net/qanda/showthread.php?t=12390