George, as the linear motor(s) raise the top part of the bar two heavy duty spring loaded clamps or claws for lack of a better name would engage two new 1/2 in pins mounted on the lower portion of the bar firmly locking it in place.Kind of like the metal clips we used to hang in our garages on a wooden board on the wall to put broom and rake handles in,but much more heavy duty.They would latch with the bar raising and release when lowering.Look ma, no hands!.HMMM.
Actually to make it even simpler you could install two 12 v plungers, like the electric deadbolts you see advertised flush mounted in the upper half of the frops with the beveled side toward the front of the tractor with corresponding holes in the fixed section of the bar.As the top section raises the spring loaded "door latches" compress riding on the fixed portion of the bar until they both arrive at their respective holes and then decompress just like a door latch at home.Linear motors have internal limit switches which will kick in when the holes are met.You are now securely locked in the up position.To unlock and lower, have the 12v lock cylinders wired to the down side of the switch for the linear motor(s) retracting them.They will not be powered in the up position relying on the spring pressure to engage them at the holes.
I've got WAY too much time on my hands!.