I have a PLC (take the "P" with a pinch of salt), it has some analogue inputs (4-20 mA) that I need to use to detect if 24 V is present or not. 
I can program the logic to say above X mA 24 V must be present, below X mA it mustn't be present (the reason is I have some controllable relay outputs, but there is no feedback to say which state it is in and the only spare inputs are analogue). Is it simply a case of I = V/R, so on the analogue input common I stick 0 V DC and on the input I put a 1200 Ohm resistor and the 24 V DC into that. My logic could then be if >10 mA 24 V must be present, <10 mA it isn't?