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.i90 4.8 KiB

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