The trim limit switch is a ( on / off) type of switch in rotary form.
the drive should trim up with the TRIM switch only and stop when the limit switch is opened. The trailer switch (which works all the time when used)
For a basic set up on land, do this,
With the out drive all the way down, remove the trim lmit switch, look closely at the center hex, there is a bump on it, look closely at the shell just outside the hex, there will be another bump (or mark/line) line the two up to each other. Now reinstall the entire switch so that the two screw holes are as cenetered in the slots as possible. lightly tighten the screws so you can still adjust it but it wont move on its own when the drive moves up or down.
This should get you close to where you need to be.
My rule of thumb is the trim rams should extend ~ 3 to 3 1/2 inches from the fully down position. the rams have or should have black paint on them and when fully closed it should be almost to the trim ram cyclinder end cap. When you trim it up and the switch stops the drive the amount of unpainted ram should measure the distance above from the cylinder end cap to the paint..
what this should do is allow for trim up with NO cavitation. If it does cavitate the the distance must be reduced and if it does not cavitate the distance can be increaded (both by adjusting the switch rotationaly clockwise or counterclockwise). this can only be done in the water while testing it under power to see if or where this occurs.