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.

CChokeControlPanel.f90 4.8 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. module CChokeControlPanel
  2. use CChokeControlPanelVariables
  3. implicit none
  4. public
  5. contains
  6. ! Input routines
  7. subroutine SetChokePanelPumpSelectorSwitch(v)
  8. !DEC$ ATTRIBUTES DLLEXPORT :: SetChokePanelPumpSelectorSwitch
  9. !DEC$ ATTRIBUTES ALIAS: 'SetChokePanelPumpSelectorSwitch' :: SetChokePanelPumpSelectorSwitch
  10. implicit none
  11. integer, intent(in) :: v
  12. ChokePanelPumpSelectorSwitch = v
  13. #ifdef deb
  14. print*, 'ChokePanelPumpSelectorSwitch=', ChokePanelPumpSelectorSwitch
  15. #endif
  16. end subroutine
  17. subroutine SetChokePanelStrokeResetSwitch(v)
  18. !DEC$ ATTRIBUTES DLLEXPORT :: SetChokePanelStrokeResetSwitch
  19. !DEC$ ATTRIBUTES ALIAS: 'SetChokePanelStrokeResetSwitch' :: SetChokePanelStrokeResetSwitch
  20. implicit none
  21. logical, intent(in) :: v
  22. ChokePanelStrokeResetSwitch = v
  23. #ifdef deb
  24. print*, 'ChokePanelStrokeResetSwitch=', ChokePanelStrokeResetSwitch
  25. #endif
  26. end subroutine
  27. subroutine SetChokeSelectorSwitch(v)
  28. !DEC$ ATTRIBUTES DLLEXPORT :: SetChokeSelectorSwitch
  29. !DEC$ ATTRIBUTES ALIAS: 'SetChokeSelectorSwitch' :: SetChokeSelectorSwitch
  30. implicit none
  31. logical, intent(in) :: v
  32. ChokeSelectorSwitch = v
  33. #ifdef deb
  34. print*, 'ChokeSelectorSwitch=', ChokeSelectorSwitch
  35. #endif
  36. end subroutine
  37. subroutine SetChokeRateControlKnob(v)
  38. !DEC$ ATTRIBUTES DLLEXPORT :: SetChokeRateControlKnob
  39. !DEC$ ATTRIBUTES ALIAS: 'SetChokeRateControlKnob' :: SetChokeRateControlKnob
  40. implicit none
  41. real*8, intent(in) :: v
  42. !character(8) :: date
  43. !character(10) :: time
  44. !character(5) :: zone
  45. !integer,dimension(8) :: values
  46. ChokeRateControlKnob = v
  47. #ifdef deb
  48. !call date_and_time(date,time,zone,values)
  49. !!print '(a,2x,a,2x,a)', date, time, zone
  50. !print '(8i5)', values
  51. print*, 'ChokeRateControlKnob=', ChokeRateControlKnob
  52. #endif
  53. end subroutine
  54. subroutine SetChokeControlLever(v)
  55. !DEC$ ATTRIBUTES DLLEXPORT :: SetChokeControlLever
  56. !DEC$ ATTRIBUTES ALIAS: 'SetChokeControlLever' :: SetChokeControlLever
  57. implicit none
  58. real*8, intent(in) :: v
  59. ChokeControlLever = v
  60. #ifdef deb
  61. print*, 'ChokeControlLever=', ChokeControlLever
  62. #endif
  63. end subroutine
  64. subroutine SetChokePanelRigAirSwitch(v)
  65. !DEC$ ATTRIBUTES DLLEXPORT :: SetChokePanelRigAirSwitch
  66. !DEC$ ATTRIBUTES ALIAS: 'SetChokePanelRigAirSwitch' :: SetChokePanelRigAirSwitch
  67. implicit none
  68. logical, intent(in) :: v
  69. ChokePanelRigAirSwitch = v
  70. #ifdef deb
  71. print*, 'ChokePanelRigAirSwitch=', ChokePanelRigAirSwitch
  72. #endif
  73. end subroutine
  74. subroutine SetEnableAutoChoke(v)
  75. !DEC$ ATTRIBUTES DLLEXPORT :: SetEnableAutoChoke
  76. !DEC$ ATTRIBUTES ALIAS: 'SetEnableAutoChoke' :: SetEnableAutoChoke
  77. implicit none
  78. logical, intent(in) :: v
  79. EnableAutoChoke = v
  80. #ifdef deb
  81. print*, 'EnableAutoChoke=', EnableAutoChoke
  82. #endif
  83. end subroutine
  84. ! Output routines
  85. real(8) function GetStandPipePressure()
  86. !DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipePressure
  87. !DEC$ ATTRIBUTES ALIAS: 'GetStandPipePressure' :: GetStandPipePressure
  88. implicit none
  89. GetStandPipePressure = StandPipePressure
  90. end function
  91. real(8) function GetCasingPressure()
  92. !DEC$ ATTRIBUTES DLLEXPORT :: GetCasingPressure
  93. !DEC$ ATTRIBUTES ALIAS: 'GetCasingPressure' :: GetCasingPressure
  94. implicit none
  95. GetCasingPressure = CasingPressure
  96. end function
  97. real(8) function GetChokePosition()
  98. !DEC$ ATTRIBUTES DLLEXPORT :: GetChokePosition
  99. !DEC$ ATTRIBUTES ALIAS: 'GetChokePosition' :: GetChokePosition
  100. implicit none
  101. GetChokePosition = ChokePosition
  102. end function
  103. real(8) function GetChokePanelSPMCounter()
  104. !DEC$ ATTRIBUTES DLLEXPORT :: GetChokePanelSPMCounter
  105. !DEC$ ATTRIBUTES ALIAS: 'GetChokePanelSPMCounter' :: GetChokePanelSPMCounter
  106. implicit none
  107. !GetChokePanelSPMCounter = 0
  108. GetChokePanelSPMCounter = ChokePanelSPMCounter
  109. end function
  110. real(8) function GetChokePanelTotalStrokeCounter()
  111. !DEC$ ATTRIBUTES DLLEXPORT :: GetChokePanelTotalStrokeCounter
  112. !DEC$ ATTRIBUTES ALIAS: 'GetChokePanelTotalStrokeCounter' :: GetChokePanelTotalStrokeCounter
  113. implicit none
  114. !GetChokePanelTotalStrokeCounter = 0
  115. GetChokePanelTotalStrokeCounter = ChokePanelTotalStrokeCounter
  116. end function
  117. integer function GetChoke1LED()
  118. !DEC$ ATTRIBUTES DLLEXPORT :: GetChoke1LED
  119. !DEC$ ATTRIBUTES ALIAS: 'GetChoke1LED' :: GetChoke1LED
  120. implicit none
  121. GetChoke1LED = Choke1LED
  122. end function
  123. integer function GetChoke2LED()
  124. !DEC$ ATTRIBUTES DLLEXPORT :: GetChoke2LED
  125. !DEC$ ATTRIBUTES ALIAS: 'GetChoke2LED' :: GetChoke2LED
  126. implicit none
  127. GetChoke2LED = Choke2LED
  128. end function
  129. end module CChokeControlPanel