Yellow parts tend to turn blue disk of 4 pins and to go down due to their weight.
Green spring forces pink pawl towards blue ratchet wheel to prevent the disk from rotation. Violet cam rotates continuously. In 1 revolution it pushes the pawl once to let the disk turn 90 deg. and one work go through.