Addendum: If the knocking was coming from something other than the normal knocking of the tipping arm on the shutoff switch, it would be slop in the bronze bushings on the connecting rod. To check this, simply shut off the compressor and unplug it from the electricity. Shut off your shop compressor and disconnect the inlet air line to the inlet fitting. Then bleed the pressure off the discharge with the pressure release knob. Once all pressure is bled off, you should easily be able to rotate the connecting rod by hand and watch for slop (relative movement) between the bronze bushings and the shafts on either end of the connecting rod.
The only other possibility might be that the pistons are traveling too far into the cylinders and striking the back check valves at the top of the compression stroke. But if it were doing this, you would not be able to build pressure at all. Since this is certainly not the case, as you've described, look elsewhere for trouble.
I suspect there is no trouble at all and the knocking is simply telling you that because you're getting close to the shutoff pressure, the tipping arm, which is designed to shut off the compressor when max pressure is reached, is about to hit the shutoff switch hard enough to shut off the compressor.
If it shuts off before your desired pressure is reached, a minute adjustment of the spring collar is in order (move the spring collar a bit more to the right. Conversely, if the compressor continues to run beyond your desired pressure, simply move the spring collar a bit to the left.
I know this is more information than you currently need, but you may find it to be helpful at some future date.
Have fun,
BeemanR7