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.
 
 
 
 
 
 

106 lines
2.4 KiB

  1. # 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotification.f90"
  2. module COpenSafetyValveLedNotification
  3. use OperationScenariosModule
  4. implicit none
  5. contains
  6. subroutine Evaluate_OpenSafetyValveLed()
  7. implicit none
  8. ! if (DriveType == TopDrive_DriveType) then
  9. !#ifdef OST
  10. ! if(print_log) print*, 'Evaluate_OpenSafetyValveLed=TopDrive'
  11. !#endif
  12. ! endif
  13. !
  14. !
  15. !
  16. !
  17. !
  18. !
  19. !
  20. !
  21. ! if (DriveType == Kelly_DriveType) then
  22. !#ifdef OST
  23. ! if(print_log) print*, 'Evaluate_OpenSafetyValveLed=Kelly'
  24. !#endif
  25. ! endif
  26. end subroutine
  27. ! subroutine Subscribe_OpenSafetyValveLed()
  28. ! use CDrillingConsoleVariables
  29. ! use ConfigurationVariables
  30. ! use ConfigurationVariables
  31. ! implicit none
  32. ! call OnOpenSafetyValvePress%Add(ButtonPress_OpenSafetyValve)
  33. ! call OnOperationConditionChangeInt%Add(Set_Operation_OpenSafetyValveLed)
  34. ! end subroutine
  35. subroutine Set_Operation_OpenSafetyValveLed(v)
  36. implicit none
  37. integer , intent(in) :: v
  38. # 49
  39. data%State%notifications%operation_OpenSafetyValveLed = v
  40. # 53
  41. end subroutine
  42. subroutine ButtonPress_OpenSafetyValve()
  43. implicit none
  44. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  45. # 64
  46. !TOPDRIVE-CODE=56
  47. if (Get_SafetyValveHeight() >= 3.0 .and. Get_SafetyValveHeight() <= 12.0 .and.&
  48. Get_OpenSafetyValveLed() == .false. .and.&
  49. Get_CloseSafetyValveLed()) then
  50. call Set_CloseSafetyValveLed(.false.)
  51. call Set_OpenSafetyValveLed(.true.)
  52. return
  53. end if
  54. endif
  55. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  56. # 88
  57. !OPERATION-CODE=58
  58. if (Get_SafetyValveHeight() >= 3.0 .and. Get_SafetyValveHeight() <= 12.0 .and.&
  59. Get_OpenSafetyValveLed() == .false. .and.&
  60. Get_CloseSafetyValveLed()) then
  61. call Set_OpenSafetyValveLed(.true.)
  62. call Set_CloseSafetyValveLed(.false.)
  63. return
  64. end if
  65. endif
  66. end subroutine
  67. end module COpenSafetyValveLedNotification