coolant_motor_start() { timer=10;do{timer--;}while(timer>0); gvarset(8131,1000000); //acceleration timer=10;do{timer--;}while(timer>0); x=gvarget(8133);//get the speed (frequency) k=gvarget(8132);//get the ratio x=x*k; //calculate the RAW frequency gvarset(8130,x); //send the raw frequency to the register timer=30;do{timer--;}while(timer>0); //wait a time for the frequency value to be delivered };