the light emitting diode to the transistor is interrupted when the corresponding yarn guiding arm is in its non feeding area position the respective collectors of the transistors 27 30 are connected to positive voltage supply wherein the respective emitters are connected to input terminals of a microcomputer 31 fig2 shows a circuit diagram of the error detection unit in accordance with the present invention the light emitting diodes 23 26 are connected in series to a resistor which in turn is connected to a source of positive voltage the collectors of the photo transistors 27 30 are connected to input terminals 40 43 of a microprocessor 31 in the preferred embodiment this microprocessor 31 is an intel type 8748 a first output terminal of this microprocessor 31 is connected through a switching transistor to a fault indication lamp 32 which is switched on by the microprocessor 31 if it turns off the knitting machine in response to the detection of a yarn breakage and or a yarn over feed and or a yarn change fault a second output terminal of the microprocessor 31 is connected through another switching transistor to a stop relay 37 interrupting the power supply of the knitting machine and thereby turning off its operation a first pulse generator 38 which generates one pulse per revolution of the knitting machine is connected to an input terminal of the microprocessor 31 similarly a second pulse generator 39 generating a pulse train the pulse train having a frequency which is proportional to the rotory velocity of the knitting machine is connected to a further input terminal of the microprocessor 31 this pulse.