|
- module CRotaryProblemsVariables
- use CProblemDifinition
- implicit none
- public
-
- ! Input vars
- type::RotaryProblemsType
- type(CProblem) :: MotorFail
- type(CProblem) :: OverideTorqueLimit
- end type RotaryProblemsType
- type(RotaryProblemsType)::RotaryProblems
- ! procedure (ActionInteger), pointer :: MotorFailPtr
- ! procedure (ActionInteger), pointer :: OverideTorqueLimitPtr
-
- contains
-
- subroutine ProcessRotaryProblemsDueTime(time)
- implicit none
- integer :: time
-
- if(RotaryProblems%MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryProblems%MotorFail, ChangeMotorFail, time)
- if(RotaryProblems%OverideTorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, time)
-
- end subroutine
-
- subroutine ProcessRotaryProblemsDuePumpStrokes(strokes)
- implicit none
- integer :: strokes
-
- if(RotaryProblems%MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryProblems%MotorFail, ChangeMotorFail, strokes)
- if(RotaryProblems%OverideTorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, strokes)
-
- end subroutine
-
- subroutine ProcessRotaryProblemsDueVolumePumped(volume)
- implicit none
- real(8) :: volume
-
- if(RotaryProblems%MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryProblems%MotorFail, ChangeMotorFail, volume)
- if(RotaryProblems%OverideTorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, volume)
-
- end subroutine
-
- subroutine ProcessRotaryProblemsDueDistanceDrilled(distance)
- implicit none
- real(8) :: distance
-
- if(RotaryProblems%MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryProblems%MotorFail, ChangeMotorFail, distance)
- if(RotaryProblems%OverideTorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, distance)
-
- end subroutine
-
-
-
-
-
-
-
- subroutine ChangeMotorFail(status)
- use RTable_VARIABLES
- implicit none
- integer, intent (in) :: status
- !if(associated(MotorFailPtr)) call MotorFailPtr(status)
- if(status == Clear_StatusType) RTable%MotorFaileMalf=0
- if(status == Executed_StatusType) RTable%MotorFaileMalf=1
- endsubroutine
-
- subroutine ChangeOverideTorqueLimit(status)
- use RTable_VARIABLES
- implicit none
- integer, intent (in) :: status
- !if(associated(OverideTorqueLimitPtr)) call OverideTorqueLimitPtr(status)
- if(status == Clear_StatusType) RTable%OverideTorqueLimitMalf=0
- if(status == Executed_StatusType) RTable%OverideTorqueLimitMalf=1
- endsubroutine
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ! subroutine SubscribeMotorFail2(v)
- ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMotorFail2
- ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeMotorFail2' :: SubscribeMotorFail2
- ! implicit none
- ! procedure (ActionInteger) :: v
- ! MotorFailPtr => v
- ! end subroutine
-
- ! subroutine SubscribeOverideTorqueLimit(v)
- ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeOverideTorqueLimit
- ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeOverideTorqueLimit' :: SubscribeOverideTorqueLimit
- ! implicit none
- ! procedure (ActionInteger) :: v
- ! OverideTorqueLimitPtr => v
- ! end subroutine
-
-
-
- end module CRotaryProblemsVariables
|