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.

CTdsConnectionModesEnum.f90 2.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. module CTdsConnectionModesEnum
  2. use COperationScenariosVariables
  3. implicit none
  4. contains
  5. subroutine Evaluate_TdsConnectionModes()
  6. implicit none
  7. if (Hoisting%DriveType == TopDrive_DriveType) then
  8. #ifdef OST
  9. print*, 'Evaluate_TdsConnectionModes=TopDrive'
  10. #endif
  11. !TOPDRIVE-CODE=3
  12. if (Get_TdsStemIn() .and.&
  13. Get_TdsSpine() == TDS_SPINE_CONNECT_END .and.&
  14. !TopDriveDrillTorqueState == TdsMu_SPINE
  15. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING) then
  16. call Set_TdsConnectionModes(TDS_CONNECTION_SPINE)
  17. return
  18. end if
  19. !TOPDRIVE-CODE=4
  20. if (Get_TdsTong() == TDS_TONG_MAKEUP_END .and.&
  21. Get_TdsConnectionModes() == TDS_CONNECTION_SPINE ) then
  22. call Set_TdsConnectionModes(TDS_CONNECTION_STRING)
  23. TopDrivePanel%TopDriveTorqueWrenchLed = LED_OFF
  24. return
  25. end if
  26. !TOPDRIVE-CODE=5
  27. if (Get_TdsTong() == TDS_TONG_BREAKOUT_END .and.&
  28. Get_TdsConnectionModes() == TDS_CONNECTION_STRING ) then
  29. call Set_TdsConnectionModes(TDS_CONNECTION_SPINE)
  30. TopDrivePanel%TopDriveTorqueWrenchLed = LED_OFF
  31. return
  32. end if
  33. !TOPDRIVE-CODE=6
  34. if (Get_TdsSpine() == TDS_SPINE_DISCONNECT_END .and.&
  35. !Get_TdsStemIn() == .false. .and.&
  36. Get_TdsConnectionModes() == TDS_CONNECTION_SPINE) then
  37. call Set_TdsConnectionModes(TDS_CONNECTION_NOTHING)
  38. return
  39. end if
  40. endif
  41. if (Hoisting%DriveType == Kelly_DriveType) then
  42. #ifdef OST
  43. print*, 'Evaluate_TdsConnectionModes=Kelly'
  44. #endif
  45. endif
  46. end subroutine
  47. subroutine Subscribe_TdsConnectionModes()
  48. use CDrillingConsoleVariables
  49. implicit none
  50. end subroutine
  51. end module CTdsConnectionModesEnum