The function of the Gastrocnemius is to elevate the heel (known as plantar flexion).
The function is the Soleus is exactly the same as the Gastrocnemius: to raise the heel. The only difference is that it works in a different position: with the knee bent.