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.9 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. module CTdsSwingEnum
  2. use OperationScenariosModule
  3. use SimulationVariables
  4. use UnitySignalsModule
  5. implicit none
  6. contains
  7. subroutine Evaluate_TdsSwing()
  8. implicit none
  9. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  10. if(print_log) print*, 'Evaluate_TdsSwing=TopDrive'
  11. !TOPDRIVE-CODE=37
  12. if (Get_SwingDrillPermission() .and.&
  13. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  14. Get_FillMouseHoleLed() == .false. .and.&
  15. data%Equipments%TopDrivePanel%TopDriveLinkTiltState == TdsLinkTilt_DRILL) then
  16. call Set_TdsSwing(TDS_SWING_DRILL_BEGIN)
  17. data%Equipments%TopDrivePanel%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. data%Equipments%TopDrivePanel%TopDriveLinkTiltState == TdsLinkTilt_TILT) then
  24. call Set_TdsSwing(TDS_SWING_TILT_BEGIN)
  25. data%Equipments%TopDrivePanel%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. data%Equipments%TopDrivePanel%TopDriveLinkTiltState == TdsLinkTilt_OFF) then
  33. call Set_TdsSwing(TDS_SWING_OFF_BEGIN)
  34. data%Equipments%TopDrivePanel%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. data%Equipments%TopDrivePanel%TopDriveLinkTiltState == TdsLinkTilt_TILT) then
  42. call Set_TdsSwing(TDS_SWING_TILT_BEGIN)
  43. data%Equipments%TopDrivePanel%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. data%Equipments%TopDrivePanel%TopDriveLinkTiltState == TdsLinkTilt_OFF) then
  51. call Set_TdsSwing(TDS_SWING_OFF_BEGIN)
  52. data%Equipments%TopDrivePanel%TopDriveLinkTiltLed = LED_ON
  53. return
  54. end if
  55. !TOPDRIVE-CODE=42
  56. if (Get_HookHeight() > (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG) .and.&
  57. Get_SwingTiltPermission() .and.&
  58. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE .and.&
  59. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  60. data%Equipments%TopDrivePanel%TopDriveLinkTiltState == TdsLinkTilt_TILT) then
  61. call Set_TdsSwing(TDS_SWING_TILT_BEGIN)
  62. data%Equipments%TopDrivePanel%TopDriveLinkTiltLed = LED_ON
  63. return
  64. end if
  65. !TOPDRIVE-CODE=43
  66. if (Get_HookHeight() > (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG) .and.&
  67. Get_SwingOffPermission() .and.&
  68. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE .and.&
  69. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  70. data%Equipments%TopDrivePanel%TopDriveLinkTiltState == TdsLinkTilt_OFF) then
  71. call Set_TdsSwing(TDS_SWING_OFF_BEGIN)
  72. data%Equipments%TopDrivePanel%TopDriveLinkTiltLed = LED_ON
  73. return
  74. end if
  75. endif
  76. ! if (DriveType == Kelly_DriveType) then
  77. !#ifdef OST
  78. ! if(print_log) print*, 'Evaluate_TdsSwing=Kelly'
  79. !#endif
  80. ! endif
  81. end subroutine
  82. subroutine Subscribe_TdsSwing()
  83. use CDrillingConsoleVariables
  84. use SimulationVariables
  85. use SimulationVariables
  86. implicit none
  87. end subroutine
  88. end module CTdsSwingEnum