subroutine TopDrive_OffMode Use TopDrive_VARIABLES IMPLICIT NONE TDS%N_new = 0.d0 !================================================================== ! Rate limit for off Mode if (((TDS%N_old-TDS%N_new)/TDS%time_step)>(2.d0*TDS%RateChange)) then ! baraye 0 shodan RateChange ro *2 karde ??? TDS%N_ref = (-(2.d0*TDS%RateChange)*TDS%time_step)+TDS%N_old Call TopDrive_Solver !================================================================== else TDS%N_ref = 0.d0 TDS%N_new = 0.d0 TDS%N_old = 0.d0 TDS%Speed = 0.d0 TDS%TDS_wOld = 0.d0 TDS%OperationFaultLed = 0 TDS%Speed = 0.d0 !Speed [RPM] TDS%RpmGaugeOutput = TDS%Speed TDS%RPMUnityOutput = -TDS%RpmGaugeOutput TDS%SoundRPM = 0 TDS%Torque = 0.d0 ![ft.lbf] TDS%TorqueGaugeOutput = 0.d0 ![ft.lbf] TDS%OldPowerMode = 1 TDS%OldPowerMode = 0 End if end subroutine