A controller for the solenoid of the flat knitting machine is designed to prevent the overheating of the solenoid without using the heat radiating member or a thermistor for each solenoid as follows. The operation frequency and a cumulative temperature change Tsi of the solenoid are input into a table (36) and the temperature change -Tsi and an operation pulse width PWi for preventing the overheating of the solenoid are read from the table. The temperature change -Tsi is added to the cumulative temperature change Tsi for renewal. The solenoid is driven with the read pulse width PWi. Thereby, the overheating of the solenoid can be prevented. |