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.
 
 
 
 
 
 

161 lines
5.2 KiB

  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. ChokeControlPanel%ChokePanelPumpSelectorSwitch = v
  13. #ifdef deb
  14. print*, 'ChokePanelPumpSelectorSwitch=', ChokeControlPanel%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. ChokeControlPanel%ChokePanelStrokeResetSwitch = v
  23. #ifdef deb
  24. print*, 'ChokePanelStrokeResetSwitch=', ChokeControlPanel%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. ChokeControlPanel%ChokeSelectorSwitch = v
  33. #ifdef deb
  34. print*, 'ChokeSelectorSwitch=', ChokeControlPanel%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. ChokeControlPanel%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=', ChokeControlPanel%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. ChokeControlPanel%ChokeControlLever = v
  60. #ifdef deb
  61. print*, 'ChokeControlLever=', ChokeControlPanel%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. ChokeControlPanel%ChokePanelRigAirSwitch = v
  70. #ifdef deb
  71. print*, 'ChokePanelRigAirSwitch=', ChokeControlPanel%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. ChokeControlPanel%EnableAutoChoke = v
  80. #ifdef deb
  81. print*, 'EnableAutoChoke=', ChokeControlPanel%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 = ChokeControlPanel%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 = ChokeControlPanel%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 = ChokeControlPanel%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 = ChokeControlPanel%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 = ChokeControlPanel%ChokePanelTotalStrokeCounter
  116. end function
  117. integer function GetChoke1LED()
  118. !DEC$ ATTRIBUTES DLLEXPORT :: GetChoke1LED
  119. !DEC$ ATTRIBUTES ALIAS: 'GetChoke1LED' :: GetChoke1LED
  120. implicit none
  121. GetChoke1LED = ChokeControlPanel%Choke1LED
  122. end function
  123. integer function GetChoke2LED()
  124. !DEC$ ATTRIBUTES DLLEXPORT :: GetChoke2LED
  125. !DEC$ ATTRIBUTES ALIAS: 'GetChoke2LED' :: GetChoke2LED
  126. implicit none
  127. GetChoke2LED = ChokeControlPanel%Choke2LED
  128. end function
  129. end module CChokeControlPanel