main function of the M12 terminal resistor plug is to act as an impedance matching element at the end of the network, which is used to absorb signal reflections and thus ensure the quality of data transmission.