The blue slider during its every four double stroke gives the yellow slider only one double stroke by meshing lower end of the orange pin with a hole on the driven yellow slider.
The violet pin makes the orange pin rotate 90 deg. interruptedly. The end cam on the blue slider makes the orange pin move up/down.
A device for positioning the yellow slider at its rest position is not shown.