we’ve had a similar job a few weeks ago: a laser for distance measurement, operating on 24V, gives 4-20 mA, that the Controllino shall read as analogInput.
The manufacturer offers an adaptor cabling with a 250 Ohm shunt between the laser’s signal output and ground, to produce 0-5 V analog current. Should work on the Controllino’s X1-port, but the mechanical attachment is not really good for single wires … so the 24V ports are preferred.
So for our usage, we modified this resistor into 820 Ohm for 8-16V, and if you would take 1k Ohm, you will end at somewhere about 6-20V.
AnalogRead () now gets values between 80 and 550, that’s a good enough range for our application.