|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
-
- module PipeRams2Main
- implicit none
- public
- contains
-
- subroutine PipeRams2_Setup()
- use CSimulationVariables
- implicit none
- call OnSimulationInitialization%Add(PipeRams2_Init)
- call OnSimulationStop%Add(PipeRams2_Init)
- call OnPipeRams2Step%Add(PipeRams2_Step)
- call OnPipeRams2Output%Add(PipeRams2_Output)
- call OnPipeRams2Main%Add(PipeRams2MainBody)
- end subroutine
-
- subroutine PipeRams2_Init
- implicit none
- end subroutine PipeRams2_Init
-
- subroutine PipeRams2_Step
- CALL PIPE_RAMS2
- end subroutine PipeRams2_Step
-
- subroutine PipeRams2_Output
- implicit none
- end subroutine PipeRams2_Output
-
- subroutine PipeRams2MainBody
- USE ifport
- USE ifmt
- USE CSimulationVariables
- ! USE BOP
- implicit none
-
- INTEGER :: PipeRam2Duration
- integer,dimension(8) :: PipeRam2StartTime , PipeRam2EndTime
-
- ! CALL BOP_StartUp()
- loop1: DO
-
- CALL DATE_AND_TIME(values=PipeRam2StartTime)
-
-
- CALL PIPE_RAMS2
-
- CALL DATE_AND_TIME(values=PipeRam2EndTime)
-
- PipeRam2Duration = 3600000 * (PipeRam2EndTime(5) - PipeRam2StartTime(5)) + 60000 * (PipeRam2EndTime(6) - PipeRam2StartTime(6)) + 1000 * (PipeRam2EndTime(7) - PipeRam2StartTime(7)) + (PipeRam2EndTime(8) - PipeRam2StartTime(8))
-
- if (PipeRam2Duration < 100) then
- call sleepqq(100 - PipeRam2Duration)
- ELSE
- WRITE (*,*) 'PipeRam2 BOP run duration exceeded 100 ms and =', PipeRam2Duration
- end if
-
- IF (IsStopped==.true.) THEN
- EXIT loop1
- ENDIF
-
-
- ENDDO loop1
-
-
- ! CALL DEALLOCATE_ARRAYS()
- end subroutine PipeRams2MainBody
-
- end module PipeRams2Main
|