That can be done, it will depend on the type of output that your transducer would put out.
Options:
1). If it puts out an analog signal realative to its range envolope at some set hiegth. I would use an Analog Card in a PLC and I would watch that Input with a PID LOOP that has a set point as your Ideal ht. Send the Change info to Mach through a BRAIN formula and send + output to a + Jog for your secondary Z, and same for -. I would give my self a certain percentange of Dead band in your formula.
2). Brian has made a C++ Plugin that does a PID Loop in Mach that you could try if you can get info on it, (send him an email, discribe your application, he will need to know your input/output types etc.
3). You could also send your Analog value to the Macro-Pump and have it dynamically control your Laser axis dynamically, (note this may react to slow).
4). Lastly, (and if I was doing this for a Machine for Commecial applications I would do this). I would Control the ht, with a PLC (Automation Direct) with PID loop, Analog card, AND, I would use a CTRIO (high Speed counter and Stepper Drive). You could have your PID loop drop adjustment values directly into the CTRIO Module that would independantly control your hiegth. You could Dynamically set, your "Set Point" of you PID (set point=perfect cuttin hiegth), From a DRO in Mach in your Setup screen or other place. This option would be the most expensive: DL06 = 200.00, CTRIO approx. 200.00, Analog module depending on type 150-200.00, (plus programming software unless you have it 500.00 (although they do have a FREE Data amount limited version you can download), plus programmining cables 16.00). Lastly you miscellanous supplies like PS, Termnators, DIN rail, enclosure, panel connectors, switchs, wire, etc.
scott