You can divide the 12V or 24V DC voltage into 0-10V range so that the F1616-BA can use its analog input to measure the voltage. Since F1616-BA analog inputs all have low impedance 20.0K ohm inputs, it is quite easy to do because all you need is to connect a resistor of suitable value in series to the 12V or 24VDC and it automatically divides down to the range.
For 12VDC, you can add a 10K Ohm resistor in series and the voltage measured by the ADC = 20/(10+20)*12 = 8V when incoming voltage = 12V and will be lower with lower input voltage.
For 24VDC, add a 39K resistor : 20/(39+20)*24 = 8.13V when input voltage is 24V.
You can decide what is the voltage that will trigger the shut down notification routine. You should then use a clock pulse to periodically execute a custom function to monitor your ADC input and once a power down is detected then trigger the custom function.