/// printf ( Vt_x n% f n , Vt_x);
//// printf ( dx n% f n , dx);
//// printf ( st n% f n , St);
//// printf ( xt n% llu n , Xt);
//// printf ( xc n% llu n , Xc);=(Yc-Yt); (((dy gt; 0) amp; amp; (Vt_y lt; 0 )) || ((dy lt; 0) amp; amp; (Vt_y gt; 0))) {NEXTSTATE=DEACCEL_S; } (abs (dy) lt;=indexstep_y) {NEXTSTATE=DEACCEL_S; } {_ y=indexstep_y + 1;=mainmass_y [indexstep_y] .dt;// v taktah (dy gt; 0) {if (++ phase gt; 4) {phase=1; }; }; (Dy lt; 0) {if (--phase lt; 1) {phase=4; }; };=Getoutbuf () amp; phases_mask_y; (temp | phases_signals_y [phase - 1]); ((indexstep_y == Vm_step_y) amp; amp; ((abs (dy) - 1) gt; indexstep_y)) {sost=CONST_S;} ((abs (dy)- 1) lt;=indexstep_y) {sost=DEACCEL_S;} ((indexstep_y lt; Vm_step_y) amp; amp; ((abs (dy) - 1) gt; indexstep_y)) {sost=ACCEL_S;}=WAIT_S;
//printf ( dt n% d n , dt);
//printf ( dt_ms n% d n , mainmass_y [indexstep_y] .dt_ms);
}; WAIT_S:
//секція входу (RUNENTRY) {
//printf ( WAIT n% d n );
//printf ( dt n% d n , dt);=ClockCycles () + dt;
//// printf ( clock n% d n , ClockCycles ());
//// printf ( TendStep n% d n , TendStep);
} (ClockCycles () gt;=TendStep) {= sost; (dy gt; 0) {Yt=Yt + 1; Vt_y=mainmass_y [indexstep_y] .V;} {Yt=Yt - 1; Vt_y=-mainmass_y [indexstep_y] .V;}
//if (Yt == 300) {task_x=1;}
//printf ( Vt_y n% f n , Vt_y);
//printf ( x n% d n , Yt);
}; DEACCEL_S:
//секція входу (RUNENTRY) {
//printf ( DEACCEL n% d n );
};=(Yc-Yt); ((((dy gt; 0) amp; amp; (Vt_y gt; 0)) || ((dy lt; 0) amp; amp; (Vt_y lt; 0))) amp; amp; (abs (dy) gt; indexstep_y)) {(indexstep_y lt; Vm_step_y) {NEXTSTATE=ACCEL_S; } Else {NEXTSTATE=CONST_S;}} {_ y=indexstep_y - 1;=mainmass_y [indexstep_y] .dt;// v taktah (dy gt; 0) {if (++ phase gt; 4) {phase=1; }; }; (Dy lt; 0) {if (--phase lt; 1) {phase=4; }; };=Getoutbuf () amp; phases_mask_y; (temp | phases_signals_y [phase - 1]); (indexstep_y == 0) {sost=BRAKE_S;} else {sost=DEACCEL_S;}=WAIT_S;
//printf ( dt_ms n% d n , mainmass_y [indexstep_y] .dt_ms);
}; CONST_S:
//секція входу (RUNENTRY) {
//printf ( CONST n% d n );
};=(Yc-Yt); ((((dy gt; 0) amp; amp; (Vt_y lt; 0)) || ((dy lt; 0) amp; amp; (Vt_y gt; 0))) || (abs (dy) lt;=indexstep_y)) {NEXTSTATE=DEACCEL_S; } {((abs (dy) - 1) lt;=indexstep_y) {sost=DEACCEL_S;} else {sost=CONST_S;} (dy gt; 0) {if (++ phase gt; 4) {phase=1; }; }; (Dy lt; 0) {if (--phase lt; 1) {phase=4; }; };=Getoutbuf () amp; phases_mask_y; (temp | phases_signals_y [phase - 1]);=WAIT_S;
}; STEP_S:
//секція входу (RUNENTRY) {
//printf ( CONST n% d n );
};
//dx=(Xc-Xt);
//if ((((dx gt; 0) amp; amp; (Vt_x lt; 0)) || ((dx lt; 0) amp; amp; (Vt_x gt; 0))) || (abs (dx) lt;=indexstep_x)) {NEXTSTATE=DEACCEL_Sx; }
//else {
//if ((abs (dx) - 1) lt;=indexstep_x) {sost=DEACCEL_Sx;} else {sost=CONST_Sx;} _ y=1;=mainmass_y [indexstep_y] .dt;// v taktah (dy gt; 0) {if (++ phase gt; 4) {phase=1; }; }; (Dy lt; 0) {if (--phase lt; 1) {phase=4; }; };=Getoutbuf () amp; phases_mask_y; (temp | phases_signals_y [phase - 1]);=BRAKE_S;=WAIT_S;
//} ;: work=0;
}//end swith
};
//_ y_init (void)
{= SYSPAGE_ENTRY (qtime) - gt; cycles_per_sec/1000 * Ttormoz_ms;
//printf ( sled_y_init n );
return 0;
};