If your diverter isn't opening when the ramp shot is lit for lock, it could be one of several things...
Diverter is gummed up. Very common. Both STTNG I owned had this issue. Both were NASTY and needed to be cleaned and rebuilt with the typical expendable stuff (coil sleeves etc) to function properly.
Ramp entrance switch is intermittent or not working. If the game doesn't see that first switch, it doesn't open the diverter, IIRC.
FYI...optical switches are "normally closed." Borg Entry (swithch 48) is an opto. In switch test, stick you finger in the side of the ship. It should then show as "open" because you've cut the beam. I don't remember where "Borg Lock" is, unless it's the one under the shell where the locked ball sits to the right side of the entry. You might have to take the shell off to explore that one.
There's a crapton of optos on STTNG, and failure of one or two of them can cause a whole bunch of fun issues, and the borg lock itself for the ship only opens in specific uses, like during multiball, or after you've lit a lock but NOT collected the lock via the right orbit. I'm pretty sure once you take a right orbit lock, the borg lock is no longer available at all until that multiball is played, but it's been a while so I may not be 100% accurate on that. If all your optos work, play around with it, the rules are odd.