Returned back square pulses. Have to fix negative values dor displacement.