Locking and Unlocking of knee joint mechanism