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.
 
 
 
 
 
 

152 lines
3.5 KiB

  1. module CSlipsEnum
  2. use COperationScenariosVariables
  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. ! implicit none
  29. ! !call Set_Slips(SLIPS_SET)
  30. ! call OnSlipsPress%Add(ButtonPress_Slips)
  31. ! end subroutine
  32. subroutine ButtonPress_Slips()
  33. implicit none
  34. if (Hoisting%DriveType == TopDrive_DriveType) then
  35. #ifdef OST
  36. print*, 'ButtonPress_Slips=TopDrive'
  37. #endif
  38. !TOPDRIVE-CODE=30
  39. if (Get_Slips() == SLIPS_UNSET_END .and.&
  40. Get_SlipsNotification()) then
  41. call Set_Slips(SLIPS_SET_BEGIN)
  42. return
  43. end if
  44. !TOPDRIVE-CODE=31
  45. if (Get_TdsConnectionModes() == TDS_CONNECTION_STRING .and.&
  46. Get_Slips() == SLIPS_SET_END .and.&
  47. Get_SlipsNotification()) then
  48. call Set_Slips(SLIPS_UNSET_BEGIN)
  49. return
  50. end if
  51. !TOPDRIVE-CODE=32
  52. if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING .and.&
  53. Get_Slips() == SLIPS_SET_END .and.&
  54. Get_SlipsNotification()) then
  55. call Set_Slips(SLIPS_UNSET_BEGIN)
  56. return
  57. end if
  58. endif
  59. if (Hoisting%DriveType == Kelly_DriveType) then
  60. #ifdef OST
  61. print*, 'ButtonPress_Slips=Kelly'
  62. #endif
  63. !OPERATION-CODE=19
  64. if (Get_Slips() == SLIPS_UNSET_END .and.&
  65. Get_SlipsNotification()) then
  66. call Set_Slips(SLIPS_SET_BEGIN)
  67. return
  68. end if
  69. !OPERATION-CODE=20
  70. if (Get_OperationCondition() == OPERATION_DRILL .and.&
  71. Get_KellyConnection() == KELLY_CONNECTION_STRING .and.&
  72. GetRotaryRpm() == 0.0d0 .and.&
  73. Get_SlipsNotification() .and.&
  74. Get_Slips() == SLIPS_SET_END) then
  75. call Set_Slips(SLIPS_UNSET_BEGIN)
  76. return
  77. end if
  78. !OPERATION-CODE=21
  79. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  80. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.&
  81. GetRotaryRpm() == 0.0d0 .and.&
  82. Get_SlipsNotification() .and.&
  83. Get_Slips() == SLIPS_SET_END) then
  84. call Set_Slips(SLIPS_UNSET_BEGIN)
  85. return
  86. end if
  87. endif
  88. end subroutine
  89. end module CSlipsEnum