Rana told me that in 40m, the PMCs are autolocked by reducing the gain of the loop and changing the ramp until the lock is acquired. Then the gain is increased back to operation point. I tried this method with our South PMC as the usual method being used of 'changing Blanking state' wasn't working anymore. However, even with the gain set all the way to -10 dB, the loop was not locking exactly at the center of the TEM00 mode. And was unable to skip higher-order modes. There is a header H1 which changes the input stage gain. Removing this header pin, reducing the input stage gain by a factor of 100. Even after doing this, I was unable to robustly acquire the lock by this method. Besides, this reduced gain was the case earlier (CTN/2427) and it was too low as the VCA U5A AD602 had to be kept at maximum 30dB gain. So I did not want to reduce this first stage gain.
Somewhat similar to our FSS loops, I find it much cleaner to just not close the loop until we have reached near the lock point. This could be done fairly easily with the existing code. I just had to change the loopStateEnable variable from Engage (which changes the Blanking pin on U5A AD602) to input switch (FP1TEST for South and FP2TEST for North). So now, when finding a lock point, the input is changed to terminated inputs and the loop is closed when lock point is found. This works very nicely, just like the FSS autolocks.
This has finally fixed any problems with PMC autolocks.