Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TopDriveMain.f90 2.0 KiB

пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
пре 1 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. module TopDriveMain
  2. use CLog4
  3. implicit none
  4. public
  5. contains
  6. subroutine TopDrive_Init()
  7. !use CSimulationVariables
  8. !implicit none
  9. !call OnSimulationStop%Add(TopDrive_Stop)
  10. !call OnTopDriveStart%Add(TopDrive_Start)
  11. !call OnTopDriveStep%Add(TopDrive_Step)
  12. !call OnTopDriveMain%Add(TopDriveMainBody)
  13. Call TopDrive_StartUp
  14. end subroutine
  15. subroutine TopDrive_Stop
  16. implicit none
  17. call Log_4('TopDrive_Stop')
  18. end subroutine TopDrive_Stop
  19. subroutine TopDrive_Start
  20. implicit none
  21. call Log_4('TopDrive_Start')
  22. end subroutine TopDrive_Start
  23. subroutine TopDrive_Step
  24. implicit none
  25. call Log_4('TopDrive_Step')
  26. Call Rtable_MainSolver
  27. end subroutine TopDrive_Step
  28. subroutine TopDriveMainBody
  29. use CSimulationVariables
  30. use TopDrive_VARIABLES
  31. use CDrillWatchVariables
  32. use CWarningsVariables
  33. use CSounds
  34. use CTopDrivePanelVariables
  35. implicit none
  36. integer,dimension(8) :: TDS_START_TIME, TDS_END_TIME
  37. INTEGER :: TDS_SolDuration
  38. call Log_4('TopDriveMainBody')
  39. Call TopDrive_StartUp
  40. loopTopDrivestart : do
  41. CALL DATE_AND_TIME(values=TDS_START_TIME)
  42. Call TopDrive_MainSolver
  43. if (IsStopped == .true.) then
  44. exit loopTopDrivestart
  45. end if
  46. CALL DATE_AND_TIME(values=TDS_END_TIME)
  47. TDS_SolDuration = 100-(TDS_END_TIME(5)*3600000+TDS_END_TIME(6)*60000+TDS_END_TIME(7)*1000+TDS_END_TIME(8)-TDS_START_TIME(5)*3600000-TDS_START_TIME(6)*60000-TDS_START_TIME(7)*1000-TDS_START_TIME(8))
  48. !print*, 'TDStime=', TDS_SolDuration
  49. if(TDS_SolDuration > 0.0) then
  50. CALL sleepqq(TDS_SolDuration)
  51. end if
  52. end do loopTopDrivestart
  53. end subroutine TopDriveMainBody
  54. end module TopDriveMain