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.
 
 
 
 
 
 

81 lines
2.2 KiB

  1. module CTdsConnectionModesEnum
  2. use COperationScenariosVariables
  3. implicit none
  4. contains
  5. subroutine Evaluate_TdsConnectionModes()
  6. implicit none
  7. if (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. 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. 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 (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