Simulation Core
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

160 řádky
3.0 KiB

  1. # 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90"
  2. module CIrSafetyValveLedNotification
  3. use OperationScenariosModule
  4. !use UnitySignalsModuleVariables
  5. implicit none
  6. contains
  7. subroutine Evaluate_IrSafetyValveLed()
  8. implicit none
  9. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  10. # 17
  11. endif
  12. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  13. # 37
  14. !OPERATION-CODE=56
  15. if (Get_OperationCondition() == OPERATION_DRILL) then
  16. call Set_IrSafetyValveLed(.true.)
  17. return
  18. end if
  19. !call Set_IrSafetyValveLed(.false.)
  20. endif
  21. end subroutine
  22. ! subroutine Subscribe_IrSafetyValveLed()
  23. ! use CDrillingConsoleVariables
  24. !@ use ConfigurationVariables
  25. !@ use ConfigurationVariables
  26. ! implicit none
  27. ! call OnIRSafetyValvePress%Add(ButtonPress_IrSafetyValve)
  28. ! call OnOperationConditionChangeInt%Add(Set_Operation_IrSafetyValveLed)
  29. ! end subroutine
  30. subroutine Set_Operation_IrSafetyValveLed(v)
  31. implicit none
  32. integer , intent(in) :: v
  33. # 79
  34. data%State%notifications%operation_IrSafetyValveLed = v
  35. # 83
  36. end subroutine
  37. subroutine ButtonPress_IrSafetyValve()
  38. implicit none
  39. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  40. # 95
  41. !TOPDRIVE-CODE=53
  42. if (Get_IrSafetyValvePermission() .and.&
  43. Get_IrSafetyValveLed()) then
  44. call Set_IrSafetyValveLed(.false.)
  45. return
  46. end if
  47. !TOPDRIVE-CODE=54
  48. if (Get_IrSafetyValvePermission() .and.&
  49. Get_IrSafetyValveLed() == .false.) then
  50. call Set_IrSafetyValveLed(.true.)
  51. return
  52. end if
  53. endif
  54. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  55. # 134
  56. !OPERATION-CODE=54
  57. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  58. Get_IrSafetyValvePermission() .and.&
  59. Get_IrSafetyValveLed()) then
  60. call Set_IrSafetyValveLed(.false.)
  61. return
  62. end if
  63. !OPERATION-CODE=55
  64. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  65. Get_IrSafetyValvePermission() .and.&
  66. Get_IrSafetyValveLed() == .false. ) then
  67. call Set_IrSafetyValveLed(.true.)
  68. return
  69. end if
  70. endif
  71. end subroutine
  72. end module CIrSafetyValveLedNotification