@Zseven Which Duet board? The capabilities of each pin are listed in the wiki page for each board. I think you have a Duet 3 mainboard 6XD? If so, see: https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6XD_Hardware_Overview#inputoutput-port-capabilities
From that, you can see analogue input is supported on io3.in to io8.in. The inputs will tolerate up to 30V and have 10K series resistors. You also have differential signal, opto-isolated inputs for io5.in to io8.in, rated to 30V. Use M950 with the J parameter to define an input, see https://docs.duet3d.com/en/User_manual/Reference/Gcodes#configuration-examples-and-notes
Once the signal is connected to the Duet, what do you want to do with it? If you want it to trigger on a high input, you can set up a trigger to do this. See https://docs.duet3d.com/en/User_manual/Tuning/Triggers
Ian