Re-implemented Labview output. UNTESTED!!!