// Set the acceleration of the generator gvarset (8131, 100000); timer = 30; do {timer -;} while (timer> 0); // Delay for 30ms // Convert spindle speed reference to frequency. // The value of the coefficient is selected in such a way as to convert // 12-bit spindle speed to generator frequency k = 123456; freq = eparam * k; // Calculate the raw value of the generator frequency // Send generator frequency value gvarset (8130, freq); timer = 30; do {timer -;} while (timer> 0); // Delay for 30ms exit (99); // normal exit