Simulation Core
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

76 rindas
2.1 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. ! this is a comment
  19. end subroutine TopDrive_Stop
  20. subroutine TopDrive_Start
  21. implicit none
  22. call Log_4('TopDrive_Start')
  23. end subroutine TopDrive_Start
  24. subroutine TopDrive_Step
  25. implicit none
  26. call Log_4('TopDrive_Step')
  27. Call Rtable_MainSolver
  28. end subroutine TopDrive_Step
  29. subroutine TopDriveMainBody
  30. use CSimulationVariables
  31. use TopDrive_VARIABLES
  32. use CDrillWatchVariables
  33. use CWarningsVariables
  34. use CSounds
  35. use CTopDrivePanelVariables
  36. implicit none
  37. integer,dimension(8) :: TDS_START_TIME, TDS_END_TIME
  38. INTEGER :: TDS_SolDuration
  39. call Log_4('TopDriveMainBody')
  40. Call TopDrive_StartUp
  41. loopTopDrivestart : do
  42. CALL DATE_AND_TIME(values=TDS_START_TIME)
  43. Call TopDrive_MainSolver
  44. if (IsStopped == .true.) then
  45. exit loopTopDrivestart
  46. end if
  47. CALL DATE_AND_TIME(values=TDS_END_TIME)
  48. 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))
  49. !print*, 'TDStime=', TDS_SolDuration
  50. if(TDS_SolDuration > 0.0) then
  51. CALL sleepqq(TDS_SolDuration)
  52. end if
  53. end do loopTopDrivestart
  54. end subroutine TopDriveMainBody
  55. end module TopDriveMain