Simulation Core
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

158 řádky
3.9 KiB

  1. module CSlipsEnum
  2. use OperationScenariosModule
  3. implicit none
  4. contains
  5. subroutine Evaluate_Slips()
  6. implicit none
  7. ! if (DriveType == TopDrive_DriveType) then
  8. !#ifdef OST
  9. ! print*, 'Evaluate_Slips=TopDrive'
  10. !#endif
  11. ! endif
  12. !
  13. !
  14. !
  15. !
  16. !
  17. !
  18. !
  19. !
  20. ! if (DriveType == Kelly_DriveType) then
  21. !#ifdef OST
  22. ! print*, 'Evaluate_Slips=Kelly'
  23. !#endif
  24. ! endif
  25. end subroutine
  26. ! subroutine Subscribe_Slips()
  27. ! use CDrillingConsoleVariables
  28. ! use ConfigurationVariables
  29. ! use ConfigurationVariables
  30. ! implicit none
  31. ! !call Set_Slips(SLIPS_SET)
  32. ! call OnSlipsPress%Add(ButtonPress_Slips)
  33. ! end subroutine
  34. subroutine ButtonPress_Slips()
  35. use UnitySignalsModule
  36. use NotificationModule
  37. use CUnityOutputs
  38. use UnitySignalsModule !for CTdsConnectionModesEnum
  39. implicit none
  40. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  41. #ifdef OST
  42. print*, 'ButtonPress_Slips=TopDrive'
  43. #endif
  44. !TOPDRIVE-CODE=30
  45. if (Get_Slips() == SLIPS_UNSET_END .and.&
  46. Get_SlipsNotification()) then
  47. call Set_Slips(SLIPS_SET_BEGIN)
  48. return
  49. end if
  50. !TOPDRIVE-CODE=31
  51. if (Get_TdsConnectionModes() == TDS_CONNECTION_STRING .and.&
  52. Get_Slips() == SLIPS_SET_END .and.&
  53. Get_SlipsNotification()) then
  54. call Set_Slips(SLIPS_UNSET_BEGIN)
  55. return
  56. end if
  57. !TOPDRIVE-CODE=32
  58. if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING .and.&
  59. Get_Slips() == SLIPS_SET_END .and.&
  60. Get_SlipsNotification()) then
  61. call Set_Slips(SLIPS_UNSET_BEGIN)
  62. return
  63. end if
  64. endif
  65. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  66. #ifdef OST
  67. print*, 'ButtonPress_Slips=Kelly'
  68. #endif
  69. !OPERATION-CODE=19
  70. if (Get_Slips() == SLIPS_UNSET_END .and.&
  71. Get_SlipsNotification()) then
  72. call Set_Slips(SLIPS_SET_BEGIN)
  73. return
  74. end if
  75. !OPERATION-CODE=20
  76. if (Get_OperationCondition() == OPERATION_DRILL .and.&
  77. Get_KellyConnection() == KELLY_CONNECTION_STRING .and.&
  78. GetRotaryRpm() == 0.0d0 .and.&
  79. Get_SlipsNotification() .and.&
  80. Get_Slips() == SLIPS_SET_END) then
  81. call Set_Slips(SLIPS_UNSET_BEGIN)
  82. return
  83. end if
  84. !OPERATION-CODE=21
  85. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  86. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.&
  87. GetRotaryRpm() == 0.0d0 .and.&
  88. Get_SlipsNotification() .and.&
  89. Get_Slips() == SLIPS_SET_END) then
  90. call Set_Slips(SLIPS_UNSET_BEGIN)
  91. return
  92. end if
  93. endif
  94. end subroutine
  95. end module CSlipsEnum