module PipeRams1Main implicit none public contains subroutine PipeRams1_Setup() use CSimulationVariables implicit none call OnSimulationInitialization%Add(PipeRams1_Init) call OnSimulationStop%Add(PipeRams1_Init) call OnPipeRams1Step%Add(PipeRams1_Step) call OnPipeRams1Output%Add(PipeRams1_Output) call OnPipeRams1Main%Add(PipeRams1MainBody) end subroutine subroutine PipeRams1_Init implicit none end subroutine PipeRams1_Init subroutine PipeRams1_Step CALL PIPE_RAMS1 end subroutine PipeRams1_Step subroutine PipeRams1_Output end subroutine PipeRams1_Output subroutine PipeRams1MainBody USE ifport USE ifmt USE CSimulationVariables ! USE BOP implicit none INTEGER :: PipeRam1Duration integer,dimension(8) :: PipeRam1StartTime , PipeRam1EndTime ! CALL BOP_StartUp() loop1: DO CALL DATE_AND_TIME(values=PipeRam1StartTime) CALL PIPE_RAMS1 CALL DATE_AND_TIME(values=PipeRam1EndTime) PipeRam1Duration = 3600000 * (PipeRam1EndTime(5) - PipeRam1StartTime(5)) + 60000 * (PipeRam1EndTime(6) - PipeRam1StartTime(6)) + 1000 * (PipeRam1EndTime(7) - PipeRam1StartTime(7)) + (PipeRam1EndTime(8) - PipeRam1StartTime(8)) if (PipeRam1Duration < 100) then call sleepqq(100 - PipeRam1Duration) ELSE WRITE (*,*) 'PipeRam1 BOP run duration exceeded 100 ms and =', PipeRam1Duration end if IF (IsStopped==.true.) THEN EXIT loop1 ENDIF ENDDO loop1 ! CALL DEALLOCATE_ARRAYS() end subroutine PipeRams1MainBody end module PipeRams1Main