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.

CTdsSwingEnum.f90 4.2 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. module CTdsSwingEnum
  2. use COperationScenariosVariables
  3. implicit none
  4. contains
  5. subroutine Evaluate_TdsSwing()
  6. implicit none
  7. if (DriveType == TopDrive_DriveType) then
  8. #ifdef OST
  9. print*, 'Evaluate_TdsSwing=TopDrive'
  10. #endif
  11. !TOPDRIVE-CODE=37
  12. if (Get_SwingDrillPermission() .and.&
  13. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  14. Get_FillMouseHoleLed() == .false. .and.&
  15. TopDriveLinkTiltState == TdsLinkTilt_DRILL) then
  16. call Set_TdsSwing(TDS_SWING_DRILL_BEGIN)
  17. TopDriveLinkTiltLed = LED_ON
  18. return
  19. end if
  20. !TOPDRIVE-CODE=38
  21. if (Get_SwingTiltPermission() .and.&
  22. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  23. TopDriveLinkTiltState == TdsLinkTilt_TILT) then
  24. call Set_TdsSwing(TDS_SWING_TILT_BEGIN)
  25. TopDriveLinkTiltLed = LED_ON
  26. return
  27. end if
  28. !TOPDRIVE-CODE=39
  29. if (Get_SwingOffPermission() .and.&
  30. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  31. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  32. TopDriveLinkTiltState == TdsLinkTilt_OFF) then
  33. call Set_TdsSwing(TDS_SWING_OFF_BEGIN)
  34. TopDriveLinkTiltLed = LED_ON
  35. return
  36. end if
  37. !TOPDRIVE-CODE=40
  38. if (Get_SwingTiltPermission() .and.&
  39. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  40. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  41. TopDriveLinkTiltState == TdsLinkTilt_TILT) then
  42. call Set_TdsSwing(TDS_SWING_TILT_BEGIN)
  43. TopDriveLinkTiltLed = LED_ON
  44. return
  45. end if
  46. !TOPDRIVE-CODE=41
  47. if (Get_SwingOffPermission() .and.&
  48. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  49. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  50. TopDriveLinkTiltState == TdsLinkTilt_OFF) then
  51. call Set_TdsSwing(TDS_SWING_OFF_BEGIN)
  52. TopDriveLinkTiltLed = LED_ON
  53. return
  54. end if
  55. !TOPDRIVE-CODE=42
  56. if (Get_HookHeight() > (TL() + NFC() + PL - ECG) .and.&
  57. Get_SwingTiltPermission() .and.&
  58. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE .and.&
  59. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  60. TopDriveLinkTiltState == TdsLinkTilt_TILT) then
  61. call Set_TdsSwing(TDS_SWING_TILT_BEGIN)
  62. TopDriveLinkTiltLed = LED_ON
  63. return
  64. end if
  65. !TOPDRIVE-CODE=43
  66. if (Get_HookHeight() > (TL() + NFC() + PL - ECG) .and.&
  67. Get_SwingOffPermission() .and.&
  68. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE .and.&
  69. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  70. TopDriveLinkTiltState == TdsLinkTilt_OFF) then
  71. call Set_TdsSwing(TDS_SWING_OFF_BEGIN)
  72. TopDriveLinkTiltLed = LED_ON
  73. return
  74. end if
  75. endif
  76. ! if (DriveType == Kelly_DriveType) then
  77. !#ifdef OST
  78. ! print*, 'Evaluate_TdsSwing=Kelly'
  79. !#endif
  80. ! endif
  81. end subroutine
  82. subroutine Subscribe_TdsSwing()
  83. use CDrillingConsoleVariables
  84. implicit none
  85. end subroutine
  86. end module CTdsSwingEnum