Detailed Description: https://www.zhihu.com/question/28512432/answer/41217074
The collector C (open drain analog)
When no input current Vin, the transistor is not turned on, LED lamp V + directly connected; Vin when the current flows, the transistor is turned on, so the transistor resistance should be less than V + LED current flows transistors, LED off.
Alternatively the N-type field effect transistor is open drain output transistor of the final circuit
A control terminal G extremely, DS is turned on when a very high level, S connected to the negative pole.
The control logic of the open-drain output is active high.
For PLC inside the NPN and PNP
Note analyze the role of the Zener diode and triode ended.
PNP output is high
NPN output a low level