Simulation Core
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

75 righe
2.0 KiB

  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