Input: pink slider-pawl driven by yellow pneumatic cylinder.
Output: blue square ratchet wheel (ratchet wheel teeth need not be saw-tooth shaped).
Key factor: when the pawl returns to its initial position, the violet spring pin turns the wheel a small angle but needed for the next 90 deg. rotation.
The mechanism is used only for light duty work because the violet spring pin can’t turn the wheel of heavy load.
It is a simplified embodiment of the design of U.S. patent 3548684.