Controlled transitions between metastable states of 2D magnetocapillary crystals