The King had a go at handling an air defence missile launcher and met military families on a visit to a Hampshire barracks.