Ignore my previous post about swapping leads. I thought at first glance that U1B was supposed to be an inverting amplifier with a variable gain set by the series combination of R5, R6, and VR1. As @KrisBlueNZ pointed out, it is a Schmitt trigger, which has only two states: output near positive...