|
- module ChokeControlMain
- use CHOKEVARIABLES
- implicit none
- public
- contains
-
- ! subroutine ChokeControl_Setup()
- ! ! use CSimulationVariables
- ! implicit none
- ! call OnSimulationInitialization%Add(ChokeControl_Init)
- ! call OnSimulationStop%Add(ChokeControl_Init)
- ! call OnChokeControlStep%Add(ChokeControl_Step)
- ! call OnChokeControlOutput%Add(ChokeControl_Output)
- ! call OnChokeControlMain%Add(ChokeControlMainBody)
- ! end subroutine
-
- subroutine ChokeControl_Init
- call Choke_StartUp
- end subroutine ChokeControl_Init
-
- subroutine ChokeControl_Step
- use ChokeModule
- implicit none
- INTEGER CHNUMBER
-
- IF(ChokeControlPanel%ChokeSelectorSwitch== 1) THEN
- ChokeControlPanel%Choke1LED=1
- ChokeControlPanel%Choke2LED=0
- CHNUMBER=1
- ELSE
- ChokeControlPanel%Choke2LED=1
- ChokeControlPanel%Choke1LED=0
- CHNUMBER=2
- ENDIF
- if(ABS(ChokeControlPanel%ChokeControlLever)==1.0 .AND. ChokeControlPanel%ChokePanelRigAirSwitch == 1 .AND. CHOOKE(CHNUMBER)%FailMalf==0 .AND. AirDrivenPump%ChokeAirFail==0) then
- if (ChokeControlPanel%ChokeControlLever == 1.0) then
- CHOOKE(CHNUMBER)%ChokeIsClosing = .true.
- CHOOKE(CHNUMBER)%ChokeIsOpening = .false.
- endif
- if (ChokeControlPanel%ChokeControlLever == -1.0) then
- CHOOKE(CHNUMBER)%ChokeIsOpening = .true.
- CHOOKE(CHNUMBER)%ChokeIsClosing = .false.
- endif
- AirPumpLine%TIME=AirPumpLine%TIME+AirPumpLine%DeltaT_Choke !overal time (s)
- call airpump_code_CHOKE(CHNUMBER)
- else
- call CHOKE_MainBody2()
- endif
- end subroutine ChokeControl_Step
-
- ! subroutine ChokeControl_Output
- ! implicit none
- ! end subroutine ChokeControl_Output
-
- ! subroutine ChokeControlMainBody
- ! use CRigSizeVariables
- ! use CHOKE
- ! implicit none
-
- ! CALL Choke_StartUp()
- ! loop1: DO
- ! CALL CHOKE_MainBody
- ! call sleepqq(100)
- ! !IF (IsStopped==.true.) THEN
- ! ! EXIT loop1
- ! !ENDIF
- ! !write(*,*) '1111111111111'
- ! if(IsStopped) then
- ! !write(*,*) '22222222222222'
-
- ! CALL DEALLOCATE_ARRAYS_CHOKE()
- ! !write(*,*) '333333333'
-
- ! call Quit()
- ! end if
-
-
-
- ! ENDDO loop1
-
- ! CLOSE(150)
-
- ! !CALL DEALLOCATE_ARRAYS_CHOKE()
-
- ! end subroutine ChokeControlMainBody
-
- end module ChokeControlMain
|