This paper introduces a non-time-based control scheme for active position and vibration control of two-degree-of-freedom systems by applying it to the path-tracking and swing control of a system composed of a trolley and a simple pendulum. The basic idea behind such a scheme is to make the path reference of the trolley a function of the time and of a time delay. This latter, which is affected by the measured oscillation, is calculated on-the-fly in order to reduce the swing phenomenon. The effectiveness of the proposed control scheme, which may have application to the control of overhead cranes, is proved experimentally.