Hi,
I don't think the circuit does what the OP wants.
I've just re-read the whole thread.
So I assume the OP want's some inverting function.
When there is no signal my led should light up.
I assume "no signal" is the opposite to "24V"
--> 0V = LED ON.
Three points*
* one need to ensure a valid LOW level when there is not 24V
* one needs to limit V_GS on the mosfet
* the Mosfet should invert the function.
I'd use a P-Ch-mosfet. Source to 24V, drain to anode of LED
Rest: Cathode_of_LED - Rv - GND
Now that we don't know the exact dropout voltage when the output is "24V" and we don't know V_gs_th of the mosfet we need to calculate somehow conservative.
Worst case: dropout of 3V, threshold 1.5V.
Let's create a string of three resistors: 24V - R1 - R2 - R3 - GND
To limit current let's calculate with R3= 10k
Gate on the R1 - R2 node.
Barrier on the R2 - R3 node
If we now make R1 = R2 = 10k, too, then we ensure
V_GS = 1.5V when output = 21V (= 24V - 3V dropout) => LED OFF
V_GS = 8V when output = OPEN. => LED ON
All just assumptions....
Klaus