Input: pink slider-pawl driven by yellow pneumatic cylinder.
Output: blue octagon 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 45 deg. rotation.
The mechanism is used only for light duty work because the violet spring pin can’t turn the wheel of heavy load.