How to build impedance meter
Auto-ranging RLC meters will step thru constant current source levels and measure voltage and keep reducing current until out of over-flow range. Dynamic range of DMM and desired range of impedance will determine the number of steps you need to measure voltage. e.g a 12 bit ADC converter may need 3 steps to achieve 6 decade range or a 16 bit converter may need 2 steps. An AC sine wave current source then generates a voltage proportional to impedance at that frequency.

Alternatively a successive approximation type ADC generating a current source instead of measuring a voltage could use a peak-detect &amp; comparator to determine the inserted current to reach a linear operating voltage.  This may change widely depending on if you are measuring milli-ohms or Megaohms so a wide range of binary stepped inputs with a defined range as above like 12 bit or 16 bit are needed.

Complex impedance instruments such as Vector Network Analyzers use more expensive methods but offer more precision relative to 50 ohms and displayed as a "s11 parameter" in dB or on a Smith chart with swept frequencies.

Intuitively, the simplest method is to inject a fixed voltage with a digital pot in series, increasing the value until the 50% input voltage drop  at the applied point is reached. However the test Engineer needs to know what the maximum applied value can be at that point and choose a suitable voltage or current. These digital Pots are not designed for this purpose so the range is limited.  

So as not to influence DC bias a series capacitor is needed that does not affect impedance nor create a huge DC time constant, so a stepped range of values may be needed.

Are you interested in GigaOhm range or milliOhm range or just MegaOhm range?