subroutine Drawworks_Direction Use CDrillingConsoleVariables Use CDataDisplayConsoleVariables Use Drawworks_VARIABLES IMPLICIT NONE if (Drawworks%Switch==1) then !Up Drawworks%motion = +1 Drawworks%w_old_drum = Drawworks%w_drum !(pi*(Drawworks%N_old/Drawworks%Conv_Ratio)/30.d0) ? Drawworks%w_drum = (pi*(Drawworks%Speed/Drawworks%Conv_Ratio)/30.d0) ![rad/s] Drawworks%Hook_Height = Drawworks%Hook_Height+(((Drawworks%Diameter/2.0)*(Drawworks%time_step*0.5d0*(Drawworks%w_drum+Drawworks%w_old_drum)))/Drawworks%NumberOfLine) ![m] else if (Drawworks%Switch==-1) then !Down Drawworks%motion = -1 Drawworks%w_old_drum = Drawworks%w_drum !(pi*(Drawworks%N_old/Drawworks%Conv_Ratio)/30.d0) ? Drawworks%w_drum = (pi*(Drawworks%Speed/Drawworks%Conv_Ratio)/30.d0) ![rad/s] Drawworks%Hook_Height = Drawworks%Hook_Height-(((Drawworks%Diameter/2.0)*(Drawworks%time_step*0.5d0*(Drawworks%w_drum+Drawworks%w_old_drum)))/Drawworks%NumberOfLine) ![m] !else if (Drawworks%Switch==0) then !Off ! Drawworks%motion = 0 ! Drawworks%w_old_drum = 0.d0 ! Drawworks%w_drum = 0.d0 ! Drawworks%Hook_Height = Drawworks%Hook_Height end if !if (Drawworks%Conv_Ratio==1.d0) then ! ! ! IF (Drawworks%motion==+1) THEN ! Call Drawworks_Free_Traction_motor_Dir ! if (Drawworks%w_drum_Dir<=0.) then ! Drawworks%motion = 0 ! else ! Drawworks%motion = +1 ! Call Drawworks_Free_Traction_motor ! Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio ! Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio ! end if ! ELSE ! if (((Drawworks%F_fastline*(Drawworks%Diameter/2.0d0))-(((Drawworks%Diameter/2.0d0)*Drawworks%BreakLoad)*(Drawworks%ManualBreak/100.0d0)))<=0.) then ! Drawworks%motion = 0 ! Drawworks%w_drum = 0.0d0 ! Drawworks%w_old_drum = 0.0d0 ! Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio ! Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio ! Drawworks%Hook_Height = Drawworks%Hook_Height ! ! Drawworks%ia = 0. ! Drawworks%ia_old = 0. ! Drawworks%x = 0. ! Drawworks%x_old = 0. ! Drawworks%y = 0. ! Drawworks%y_old = 0. ! else ! Drawworks%motion = -1 ! Call Drawworks_Free_Traction_motor_dawn_motion ! Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio ! Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio ! end if ! ! END IF ! ! !else ! ! IF (Drawworks%motion==-1) THEN ! Drawworks%w = -Drawworks%w ! Drawworks%w_old = -Drawworks%w_old ! Drawworks%w_drum = -Drawworks%w_drum ! Drawworks%w_old_drum = -Drawworks%w_old_drum ! END IF ! Call Drawworks_Traction_motor_ClutchMode_Dir ! IF (Drawworks%w_Dir>0.d0) then ! ! Drawworks%motion = +1 ! Call Drawworks_Traction_motor_ClutchMode ! Drawworks%w_drum = Drawworks%w/Drawworks%Conv_Ratio ! Drawworks%w_old_drum = Drawworks%w_old/Drawworks%Conv_Ratio ! ELSE ! Drawworks%EddyTorque = (1.039d5*exp(4.343d-4*(30.0d0*(Drawworks%w/Drawworks%Conv_Ratio)/pi)))+(-1.036d5*exp(-.047920d0*(30.0d0*(Drawworks%w/Drawworks%Conv_Ratio)/pi))) !Lbf.ft ! if (Drawworks%EddyTorque>115000.) then ! Drawworks%EddyTorque = 115000.0d0 ! end if ! Drawworks%EddyTorque = 1.355817948*Drawworks%EddyTorque ![N.m] ! if ((Drawworks%F_fastline*(Drawworks%Diameter/2.0d0))>((((Drawworks%Diameter/2.0d0)*Drawworks%BreakLoad)*(Drawworks%ManualBreak/100.0d0))+(Drawworks%EddyTorque*(Drawworks%EddyBreak/100.0d0)))) then ! Drawworks%motion = -1 ! ! IF (Drawworks%w_drum<0.) THEN ! Drawworks%w = -Drawworks%w ! Drawworks%w_old = -Drawworks%w_old ! !Drawworks%w = 0. !??????????????? ! !Drawworks%w_old = 0. !??????????????? ! Drawworks%w_drum = -Drawworks%w_drum ! Drawworks%w_old_drum = -Drawworks%w_old_drum ! END IF ! ! Drawworks%Conv_Ratio = 1. ! Call Drawworks_Free_Traction_motor_dawn_motion ! Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio ! Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio ! !Drawworks%w_drum = Drawworks%w/Drawworks%Conv_Ratio ! !Drawworks%w_old_drum = Drawworks%w_old/Drawworks%Conv_Ratio ! else ! Drawworks%motion = 0 ! Drawworks%w_drum = 0.0d0 ! Drawworks%w_old_drum = 0.0d0 ! Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio ! Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio ! Drawworks%Hook_Height = Drawworks%Hook_Height ! ! Drawworks%ia = 0. ! Drawworks%ia_old = 0. ! Drawworks%x = 0. ! Drawworks%x_old = 0. ! Drawworks%y = 0. ! Drawworks%y_old = 0. ! end if ! ! END IF ! !end if !Call DWBrakeSound end subroutine Drawworks_Direction