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.
 
 
 
 
 
 

426 lines
23 KiB

  1. module CDataDisplayConsole
  2. ! use CDataDisplayConsole
  3. use SimulationVariables
  4. implicit none
  5. public
  6. contains
  7. subroutine DataDisplayConsoleFromJson(parent)
  8. type(json_value),pointer :: parent
  9. type(json_core) :: json
  10. type(json_value),pointer :: p,pval
  11. ! 1. get related root
  12. call json%get(parent,'DataDisplay',p)
  13. ! 2. get member of data type from node
  14. ! call json%get(p,'TripAlarmLow',pval)
  15. ! call json%get(pval,data%Equipments%DataDisplayConsole%TripAlarmLow)
  16. ! call json%get(p,'TripAlarmHigh',pval)
  17. ! call json%get(pval,data%Equipments%DataDisplayConsole%TripAlarmHigh)
  18. ! call json%get(p,'RetFlowAlarmLow',pval)
  19. ! call json%get(pval,data%Equipments%DataDisplayConsole%RetFlowAlarmLow)
  20. ! call json%get(p,'RetFlowAlarmHigh',pval)
  21. ! call json%get(pval,data%Equipments%DataDisplayConsole%RetFlowAlarmHigh)
  22. ! call json%get(p,'PitAlarmLow',pval)
  23. ! call json%get(pval,data%Equipments%DataDisplayConsole%PitAlarmLow)
  24. ! call json%get(p,'PitAlarmHigh',pval)
  25. ! call json%get(pval,data%Equipments%DataDisplayConsole%PitAlarmHigh)
  26. ! call json%get(p,'PortWeightOnBit',pval)
  27. ! call json%get(pval,data%Equipments%DataDisplayConsole%PortWeightOnBit)
  28. ! call json%get(p,'PortHookLoad',pval)
  29. ! call json%get(pval,data%Equipments%DataDisplayConsole%PortHookLoad)
  30. ! call json%get(p,'PortCasingPressure',pval)
  31. ! call json%get(pval,data%Equipments%DataDisplayConsole%PortCasingPressure)
  32. ! call json%get(p,'PortPumpPressure',pval)
  33. ! call json%get(pval,data%Equipments%DataDisplayConsole%PortPumpPressure)
  34. call json%get(p,'TripTankSetAlarmLow',pval)
  35. call json%get(pval,data%Equipments%DataDisplayConsole%TripTankSetAlarmLow)
  36. call json%get(p,'TripTankSetAlarmHigh',pval)
  37. call json%get(pval,data%Equipments%DataDisplayConsole%TripTankSetAlarmHigh)
  38. call json%get(p,'TripTankSetAlarmSwitch',pval)
  39. call json%get(pval,data%Equipments%DataDisplayConsole%TripTankSetAlarmSwitch)
  40. call json%get(p,'TripTankPowerSwitch',pval)
  41. call json%get(pval,data%Equipments%DataDisplayConsole%TripTankPowerSwitch)
  42. call json%get(p,'TripTankPumpSwitch',pval)
  43. call json%get(pval,data%Equipments%DataDisplayConsole%TripTankPumpSwitch)
  44. call json%get(p,'TripTankHornSwitch',pval)
  45. call json%get(pval,data%Equipments%DataDisplayConsole%TripTankHornSwitch)
  46. call json%get(p,'AcidGasDetectionHornSwitch',pval)
  47. call json%get(pval,data%Equipments%DataDisplayConsole%AcidGasDetectionHornSwitch)
  48. call json%get(p,'TotalStrokeCounterResetSwitch',pval)
  49. call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch)
  50. call json%get(p,'DrillingTrippingSelectorSwitch',pval)
  51. call json%get(pval,data%Equipments%DataDisplayConsole%DrillingTrippingSelectorSwitch)
  52. call json%get(p,'MVTSetAlarmLowKnob',pval)
  53. call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmLowKnob)
  54. call json%get(p,'MVTSetAlarmHighKnob',pval)
  55. call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmHighKnob)
  56. call json%get(p,'MVTSetAlarmSwitch',pval)
  57. call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)
  58. call json%get(p,'MudTank1Switch',pval)
  59. call json%get(pval,data%Equipments%DataDisplayConsole%MudTank1Switch)
  60. call json%get(p,'MudTank2Switch',pval)
  61. call json%get(pval,data%Equipments%DataDisplayConsole%MudTank2Switch)
  62. call json%get(p,'MudTank3Switch',pval)
  63. call json%get(pval,data%Equipments%DataDisplayConsole%MudTank3Switch)
  64. call json%get(p,'MudTank4Switch',pval)
  65. call json%get(pval,data%Equipments%DataDisplayConsole%MudTank4Switch)
  66. call json%get(p,'MVTFineKnob',pval)
  67. call json%get(pval,data%Equipments%DataDisplayConsole%MVTFineKnob)
  68. call json%get(p,'MVTCoarseKnob',pval)
  69. call json%get(pval,data%Equipments%DataDisplayConsole%MVTCoarseKnob)
  70. call json%get(p,'MVTHornSwitch',pval)
  71. call json%get(pval,data%Equipments%DataDisplayConsole%MVTHornSwitch)
  72. call json%get(p,'MVTDeviationTripSelectionSwitch',pval)
  73. call json%get(pval,data%Equipments%DataDisplayConsole%MVTDeviationTripSelectionSwitch)
  74. call json%get(p,'MVTPowerSwitch',pval)
  75. call json%get(pval,data%Equipments%DataDisplayConsole%MVTPowerSwitch)
  76. call json%get(p,'MFFIResetTotalStrokes',pval)
  77. call json%get(pval,data%Equipments%DataDisplayConsole%MFFIResetTotalStrokes)
  78. call json%get(p,'MFFIResetFillCounter',pval)
  79. call json%get(pval,data%Equipments%DataDisplayConsole%MFFIResetFillCounter)
  80. call json%get(p,'MFFIPumpSelectorSwitch',pval)
  81. call json%get(pval,data%Equipments%DataDisplayConsole%MFFIPumpSelectorSwitch)
  82. call json%get(p,'MFFIFillSPMSelectorSwitch',pval)
  83. call json%get(pval,data%Equipments%DataDisplayConsole%MFFIFillSPMSelectorSwitch)
  84. call json%get(p,'MFFISetAlarmLowKnob',pval)
  85. call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmLowKnob)
  86. call json%get(p,'MFFISetAlarmHighKnob',pval)
  87. call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmHighKnob)
  88. call json%get(p,'MFFISetAlarmSwitch',pval)
  89. call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)
  90. call json%get(p,'MFFIPowerSwitch',pval)
  91. call json%get(pval,data%Equipments%DataDisplayConsole%MFFIPowerSwitch)
  92. call json%get(p,'MFFIHornSwitch',pval)
  93. call json%get(pval,data%Equipments%DataDisplayConsole%MFFIHornSwitch)
  94. call json%get(p,'ResetWob',pval)
  95. call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob)
  96. call json%get(p,'Clutch',pval)
  97. ! call json%get(pval,data%Equipments%DataDisplayConsole%Clutch)
  98. ! call json%get(p,'WOBPointer',pval)
  99. ! call json%get(pval,data%Equipments%DataDisplayConsole%WOBPointer)
  100. ! call json%get(p,'HookLoadPointer',pval)
  101. ! call json%get(pval,data%Equipments%DataDisplayConsole%HookLoadPointer)
  102. ! call json%get(p,'TripTankGauge',pval)
  103. ! call json%get(pval,data%Equipments%DataDisplayConsole%TripTankGauge)
  104. ! call json%get(p,'TripTankAlarmLED',pval)
  105. ! call json%get(pval,data%Equipments%DataDisplayConsole%TripTankAlarmLED)
  106. ! call json%get(p,'TripTankPumpLED',pval)
  107. ! call json%get(pval,data%Equipments%DataDisplayConsole%TripTankPumpLED)
  108. ! call json%get(p,'StandPipePressureGauge',pval)
  109. ! call json%get(pval,data%Equipments%DataDisplayConsole%StandPipePressureGauge)
  110. ! call json%get(p,'CasingPressureGauge',pval)
  111. ! call json%get(pval,data%Equipments%DataDisplayConsole%CasingPressureGauge)
  112. ! call json%get(p,'MP1SPMGauge',pval)
  113. ! call json%get(pval,data%Equipments%DataDisplayConsole%MP1SPMGauge)
  114. ! call json%get(p,'MP2SPMGauge',pval)
  115. ! call json%get(pval,data%Equipments%DataDisplayConsole%MP2SPMGauge)
  116. ! call json%get(p,'ReturnLineTempGauge',pval)
  117. ! call json%get(pval,data%Equipments%DataDisplayConsole%ReturnLineTempGauge)
  118. ! call json%get(p,'RotaryTorqueGauge',pval)
  119. ! call json%get(pval,data%Equipments%DataDisplayConsole%RotaryTorqueGauge)
  120. ! call json%get(p,'RotaryRPMGauge',pval)
  121. ! call json%get(pval,data%Equipments%DataDisplayConsole%RotaryRPMGauge)
  122. ! call json%get(p,'AcidGasDetectionLED',pval)
  123. ! call json%get(pval,data%Equipments%DataDisplayConsole%AcidGasDetectionLED)
  124. ! call json%get(p,'TotalStrokeCounter',pval)
  125. ! call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounter)
  126. ! call json%get(p,'PitGainLossGauge',pval)
  127. ! call json%get(pval,data%Equipments%DataDisplayConsole%PitGainLossGauge)
  128. ! call json%get(p,'MudTanksVolumeGauge',pval)
  129. ! call json%get(pval,data%Equipments%DataDisplayConsole%MudTanksVolumeGauge)
  130. ! call json%get(p,'MVTAlarmLED',pval)
  131. ! call json%get(pval,data%Equipments%DataDisplayConsole%MVTAlarmLED)
  132. ! call json%get(p,'ReturnMudFlowGauge',pval)
  133. ! call json%get(pval,data%Equipments%DataDisplayConsole%ReturnMudFlowGauge)
  134. ! call json%get(p,'FillStrokeCounter',pval)
  135. ! call json%get(pval,data%Equipments%DataDisplayConsole%FillStrokeCounter)
  136. ! call json%get(p,'MFFITotalStrokeCounter',pval)
  137. ! call json%get(pval,data%Equipments%DataDisplayConsole%MFFITotalStrokeCounter)
  138. ! call json%get(p,'MFFIAlarmLED',pval)
  139. ! call json%get(pval,data%Equipments%DataDisplayConsole%MFFIAlarmLED)
  140. ! call json%get(p,'MFFIPumpLED',pval)
  141. ! call json%get(pval,data%Equipments%DataDisplayConsole%MFFIPumpLED)
  142. ! call json%get(p,'TotalWellDepth',pval)
  143. ! call json%get(pval,data%Equipments%DataDisplayConsole%TotalWellDepth)
  144. ! call json%get(p,'BitDepth',pval)
  145. ! call json%get(pval,data%Equipments%DataDisplayConsole%BitDepth)
  146. ! call json%get(p,'HookLoad',pval)
  147. ! call json%get(pval,data%Equipments%DataDisplayConsole%HookLoad)
  148. ! call json%get(p,'StandPipePressure',pval)
  149. ! call json%get(pval,data%Equipments%DataDisplayConsole%StandPipePressure)
  150. ! call json%get(p,'CasingPressure',pval)
  151. ! call json%get(pval,data%Equipments%DataDisplayConsole%CasingPressure)
  152. ! call json%get(p,'MP1SPM',pval)
  153. ! call json%get(pval,data%Equipments%DataDisplayConsole%MP1SPM)
  154. ! call json%get(p,'MP2SPM',pval)
  155. ! call json%get(pval,data%Equipments%DataDisplayConsole%MP2SPM)
  156. ! call json%get(p,'RTTorque',pval)
  157. ! call json%get(pval,data%Equipments%DataDisplayConsole%RTTorque)
  158. ! call json%get(p,'RTRPM',pval)
  159. ! call json%get(pval,data%Equipments%DataDisplayConsole%RTRPM)
  160. ! call json%get(p,'WOP',pval)
  161. ! call json%get(pval,data%Equipments%DataDisplayConsole%WOP)
  162. ! call json%get(p,'ROP',pval)
  163. ! call json%get(pval,data%Equipments%DataDisplayConsole%ROP)
  164. ! call json%get(p,'MudWeightIn',pval)
  165. ! call json%get(pval,data%Equipments%DataDisplayConsole%MudWeightIn)
  166. ! call json%get(p,'MudWeightOut',pval)
  167. ! call json%get(pval,data%Equipments%DataDisplayConsole%MudWeightOut)
  168. ! call json%get(p,'Buzzer1',pval)
  169. ! call json%get(pval,data%Equipments%DataDisplayConsole%Buzzer1)
  170. ! call json%get(p,'Buzzer2',pval)
  171. ! call json%get(pval,data%Equipments%DataDisplayConsole%Buzzer2)
  172. ! call json%get(p,'Buzzer3',pval)
  173. ! call json%get(pval,data%Equipments%DataDisplayConsole%Buzzer3)
  174. ! call json%get(p,'Buzzer4',pval)
  175. ! call json%get(pval,data%Equipments%DataDisplayConsole%Buzzer4)
  176. end subroutine
  177. subroutine DataDisplayConsoleToJson(parent)
  178. type(json_value),pointer :: parent
  179. type(json_core) :: json
  180. type(json_value),pointer :: p
  181. ! 1. create new node
  182. call json%create_object(p,'DataDisplay')
  183. ! call json%add(p,"TripAlarmLow",data%Equipments%DataDisplayConsole%TripAlarmLow)
  184. ! call json%add(p,"TripAlarmHigh",data%Equipments%DataDisplayConsole%TripAlarmHigh)
  185. ! call json%add(p,"RetFlowAlarmLow",data%Equipments%DataDisplayConsole%RetFlowAlarmLow)
  186. ! call json%add(p,"RetFlowAlarmHigh",data%Equipments%DataDisplayConsole%RetFlowAlarmHigh)
  187. ! call json%add(p,"PitAlarmLow",data%Equipments%DataDisplayConsole%PitAlarmLow)
  188. ! call json%add(p,"PitAlarmHigh",data%Equipments%DataDisplayConsole%PitAlarmHigh)
  189. ! call json%add(p,"PortWeightOnBit",data%Equipments%DataDisplayConsole%PortWeightOnBit)
  190. ! call json%add(p,"PortHookLoad",data%Equipments%DataDisplayConsole%PortHookLoad)
  191. ! call json%add(p,"PortCasingPressure",data%Equipments%DataDisplayConsole%PortCasingPressure)
  192. ! call json%add(p,"PortPumpPressure",data%Equipments%DataDisplayConsole%PortPumpPressure)
  193. ! call json%add(p,"TripTankSetAlarmLow",data%Equipments%DataDisplayConsole%TripTankSetAlarmLow)
  194. ! call json%add(p,"TripTankSetAlarmHigh",data%Equipments%DataDisplayConsole%TripTankSetAlarmHigh)
  195. ! call json%add(p,"TripTankSetAlarmSwitch",data%Equipments%DataDisplayConsole%TripTankSetAlarmSwitch)
  196. ! call json%add(p,"TripTankPowerSwitch",data%Equipments%DataDisplayConsole%TripTankPowerSwitch)
  197. ! call json%add(p,"TripTankPumpSwitch",data%Equipments%DataDisplayConsole%TripTankPumpSwitch)
  198. ! call json%add(p,"TripTankHornSwitch",data%Equipments%DataDisplayConsole%TripTankHornSwitch)
  199. ! call json%add(p,"AcidGasDetectionHornSwitch",data%Equipments%DataDisplayConsole%AcidGasDetectionHornSwitch)
  200. ! call json%add(p,"TotalStrokeCounterResetSwitch",data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch)
  201. ! call json%add(p,"DrillingTrippingSelectorSwitch",data%Equipments%DataDisplayConsole%DrillingTrippingSelectorSwitch)
  202. ! call json%add(p,"MVTSetAlarmLowKnob",data%Equipments%DataDisplayConsole%MVTSetAlarmLowKnob)
  203. ! call json%add(p,"MVTSetAlarmHighKnob",data%Equipments%DataDisplayConsole%MVTSetAlarmHighKnob)
  204. ! call json%add(p,"MVTSetAlarmSwitch",data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)
  205. ! call json%add(p,"MudTank1Switch",data%Equipments%DataDisplayConsole%MudTank1Switch)
  206. ! call json%add(p,"MudTank2Switch",data%Equipments%DataDisplayConsole%MudTank2Switch)
  207. ! call json%add(p,"MudTank3Switch",data%Equipments%DataDisplayConsole%MudTank3Switch)
  208. ! call json%add(p,"MudTank4Switch",data%Equipments%DataDisplayConsole%MudTank4Switch)
  209. ! call json%add(p,"MVTFineKnob",data%Equipments%DataDisplayConsole%MVTFineKnob)
  210. ! call json%add(p,"MVTCoarseKnob",data%Equipments%DataDisplayConsole%MVTCoarseKnob)
  211. ! call json%add(p,"MVTHornSwitch",data%Equipments%DataDisplayConsole%MVTHornSwitch)
  212. ! call json%add(p,"MVTDeviationTripSelectionSwitch",data%Equipments%DataDisplayConsole%MVTDeviationTripSelectionSwitch)
  213. ! call json%add(p,"MVTPowerSwitch",data%Equipments%DataDisplayConsole%MVTPowerSwitch)
  214. ! call json%add(p,"MFFIResetTotalStrokes",data%Equipments%DataDisplayConsole%MFFIResetTotalStrokes)
  215. ! call json%add(p,"MFFIResetFillCounter",data%Equipments%DataDisplayConsole%MFFIResetFillCounter)
  216. ! call json%add(p,"MFFIPumpSelectorSwitch",data%Equipments%DataDisplayConsole%MFFIPumpSelectorSwitch)
  217. ! call json%add(p,"MFFIFillSPMSelectorSwitch",data%Equipments%DataDisplayConsole%MFFIFillSPMSelectorSwitch)
  218. ! call json%add(p,"MFFISetAlarmLowKnob",data%Equipments%DataDisplayConsole%MFFISetAlarmLowKnob)
  219. ! call json%add(p,"MFFISetAlarmHighKnob",data%Equipments%DataDisplayConsole%MFFISetAlarmHighKnob)
  220. ! call json%add(p,"MFFISetAlarmSwitch",data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)
  221. ! call json%add(p,"MFFIPowerSwitch",data%Equipments%DataDisplayConsole%MFFIPowerSwitch)
  222. ! call json%add(p,"MFFIHornSwitch",data%Equipments%DataDisplayConsole%MFFIHornSwitch)
  223. ! call json%add(p,"ResetWob",data%Equipments%DataDisplayConsole%ResetWob)
  224. ! call json%add(p,"Clutch",data%Equipments%DataDisplayConsole%Clutch)
  225. call json%add(p,"WOBPointer",data%Equipments%DataDisplayConsole%WOBPointer)
  226. call json%add(p,"HookLoadPointer",data%Equipments%DataDisplayConsole%HookLoadPointer)
  227. call json%add(p,"TripTankGauge",data%Equipments%DataDisplayConsole%TripTankGauge)
  228. call json%add(p,"TripTankAlarmLED",data%Equipments%DataDisplayConsole%TripTankAlarmLED)
  229. call json%add(p,"TripTankPumpLED",data%Equipments%DataDisplayConsole%TripTankPumpLED)
  230. call json%add(p,"StandPipePressureGauge",data%Equipments%DataDisplayConsole%StandPipePressureGauge)
  231. call json%add(p,"CasingPressureGauge",data%Equipments%DataDisplayConsole%CasingPressureGauge)
  232. call json%add(p,"MP1SPMGauge",data%Equipments%DataDisplayConsole%MP1SPMGauge)
  233. call json%add(p,"MP2SPMGauge",data%Equipments%DataDisplayConsole%MP2SPMGauge)
  234. call json%add(p,"ReturnLineTempGauge",data%Equipments%DataDisplayConsole%ReturnLineTempGauge)
  235. call json%add(p,"RotaryTorqueGauge",data%Equipments%DataDisplayConsole%RotaryTorqueGauge)
  236. call json%add(p,"RotaryRPMGauge",data%Equipments%DataDisplayConsole%RotaryRPMGauge)
  237. call json%add(p,"AcidGasDetectionLED",data%Equipments%DataDisplayConsole%AcidGasDetectionLED)
  238. call json%add(p,"TotalStrokeCounter",data%Equipments%DataDisplayConsole%TotalStrokeCounter)
  239. call json%add(p,"PitGainLossGauge",data%Equipments%DataDisplayConsole%PitGainLossGauge)
  240. call json%add(p,"MudTanksVolumeGauge",data%Equipments%DataDisplayConsole%MudTanksVolumeGauge)
  241. call json%add(p,"MVTAlarmLED",data%Equipments%DataDisplayConsole%MVTAlarmLED)
  242. call json%add(p,"ReturnMudFlowGauge",data%Equipments%DataDisplayConsole%ReturnMudFlowGauge)
  243. call json%add(p,"FillStrokeCounter",data%Equipments%DataDisplayConsole%FillStrokeCounter)
  244. call json%add(p,"MFFITotalStrokeCounter",data%Equipments%DataDisplayConsole%MFFITotalStrokeCounter)
  245. call json%add(p,"MFFIAlarmLED",data%Equipments%DataDisplayConsole%MFFIAlarmLED)
  246. call json%add(p,"MFFIPumpLED",data%Equipments%DataDisplayConsole%MFFIPumpLED)
  247. call json%add(p,"TotalWellDepth",data%Equipments%DataDisplayConsole%TotalWellDepth)
  248. ! call json%add(p,"TotalWellDepth",1000)
  249. call json%add(p,"BitDepth",data%Equipments%DataDisplayConsole%BitDepth)
  250. call json%add(p,"HookLoad",data%Equipments%DataDisplayConsole%HookLoad)
  251. call json%add(p,"StandPipePressure",data%Equipments%DataDisplayConsole%StandPipePressure)
  252. call json%add(p,"CasingPressure",data%Equipments%DataDisplayConsole%CasingPressure)
  253. call json%add(p,"MP1SPM",data%Equipments%DataDisplayConsole%MP1SPM)
  254. call json%add(p,"MP2SPM",data%Equipments%DataDisplayConsole%MP2SPM)
  255. call json%add(p,"RTTorque",data%Equipments%DataDisplayConsole%RTTorque)
  256. call json%add(p,"RTRPM",data%Equipments%DataDisplayConsole%RTRPM)
  257. call json%add(p,"WOP",data%Equipments%DataDisplayConsole%WOP)
  258. call json%add(p,"ROP",data%Equipments%DataDisplayConsole%ROP)
  259. call json%add(p,"MudWeightIn",data%Equipments%DataDisplayConsole%MudWeightIn)
  260. call json%add(p,"MudWeightOut",data%Equipments%DataDisplayConsole%MudWeightOut)
  261. call json%add(p,"Buzzer1",data%Equipments%DataDisplayConsole%Buzzer1)
  262. call json%add(p,"Buzzer2",data%Equipments%DataDisplayConsole%Buzzer2)
  263. call json%add(p,"Buzzer3",data%Equipments%DataDisplayConsole%Buzzer3)
  264. call json%add(p,"Buzzer4",data%Equipments%DataDisplayConsole%Buzzer4)
  265. call json%add(parent,p)
  266. end subroutine
  267. subroutine Set_TotalDepth(v)
  268. use SimulationVariables !@!!, only: data%Equipments%DrillingWatch%Depth
  269. ! use CSimulationVariables, only: SetDistanceDrilled
  270. implicit none
  271. real(8), intent(in) :: v
  272. ! print *,"total depth = ",v
  273. data%Equipments%DataDisplayConsole%TotalWellDepth = 1000
  274. data%Equipments%DrillingWatch%Depth = 1000
  275. ! call SetDistanceDrilled(v)
  276. end subroutine
  277. subroutine Set_BitPosition(v)
  278. use SimulationVariables !@!!, only: data%Equipments%DrillingWatch%BitPosition
  279. implicit none
  280. real(8), intent(in) :: v
  281. data%Equipments%DataDisplayConsole%BitDepth = v
  282. data%Equipments%DrillingWatch%BitPosition = v
  283. end subroutine
  284. subroutine Set_RotaryTorque(v)
  285. use SimulationVariables !@!!, only: data%Equipments%DrillingWatch%Torque
  286. implicit none
  287. real(8), intent(in) :: v
  288. data%Equipments%DataDisplayConsole%RotaryTorqueGauge = v
  289. data%Equipments%DrillingWatch%Torque = v
  290. data%Equipments%DataDisplayConsole%RTTorque = v
  291. end subroutine
  292. subroutine Set_MudWeightIn(v)
  293. use SimulationVariables !@!, only: MudWeightInDw => data%Equipments%DataDisplayConsole%MudWeightIn
  294. implicit none
  295. real(8), intent(in) :: v
  296. data%Equipments%DataDisplayConsole%MudWeightIn = v
  297. data%Equipments%DrillingWatch%MudWeightIn = v
  298. end subroutine
  299. subroutine Set_MudWeightOut(v)
  300. use SimulationVariables !@!, only: MudWeightOutDw => data%Equipments%DataDisplayConsole%MudWeightOut
  301. implicit none
  302. real(8), intent(in) :: v
  303. data%Equipments%DataDisplayConsole%MudWeightOut = v
  304. data%Equipments%DrillingWatch%MudWeightOut = v
  305. end subroutine
  306. subroutine Set_TripTankVolume(v)
  307. use SimulationVariables !@!, only: data%Equipments%DrillingWatch%TripTankVolume
  308. implicit none
  309. real(8), intent(in) :: v
  310. data%Equipments%DrillingWatch%TripTankVolume = v
  311. end subroutine
  312. subroutine Set_FillVolume(v)
  313. use SimulationVariables !@!, only: data%Equipments%DrillingWatch%FillVolume
  314. implicit none
  315. real(8), intent(in) :: v
  316. data%Equipments%DrillingWatch%FillVolume = v
  317. end subroutine
  318. subroutine Set_HookLoad(v)
  319. use SimulationVariables !@!, only: HookLoadDw => data%Equipments%DataDisplayConsole%HookLoad
  320. implicit none
  321. real(8), intent(in) :: v
  322. data%Equipments%DataDisplayConsole%HookLoadPointer = v
  323. data%Equipments%DrillingWatch%HookLoad = v * 1000
  324. data%Equipments%DataDisplayConsole%HookLoad = v
  325. end subroutine
  326. subroutine Set_WeightOnBit(v)
  327. use SimulationVariables !@!, only: data%Equipments%DrillingWatch%WeightOnBit
  328. implicit none
  329. real(8), intent(in) :: v
  330. data%Equipments%DataDisplayConsole%WOBPointer = v
  331. data%Equipments%DrillingWatch%WeightOnBit = v
  332. data%Equipments%DataDisplayConsole%WOP = v
  333. end subroutine
  334. subroutine Set_ROP(v)
  335. use SimulationVariables !@!, only: ROPDw => data%Equipments%DataDisplayConsole%ROP
  336. implicit none
  337. real(8), intent(in) :: v
  338. data%Equipments%DataDisplayConsole%ROP = v
  339. data%Equipments%DrillingWatch%ROP = v
  340. end subroutine
  341. subroutine Set_CasingPressure(v)
  342. use SimulationVariables !@!, only: CasingPressureDw => CasingPressure
  343. use CChokeControlPanelVariables
  344. use SimulationVariables!, only: CasingPressureChoke => CasingPressure
  345. implicit none
  346. real(8), intent(in) :: v
  347. data%Equipments%DataDisplayConsole%CasingPressureGauge = v
  348. data%Equipments%DrillingWatch%CasingPressure = v
  349. data%Equipments%ChokeControlPanel%CasingPressure = v
  350. data%Equipments%DataDisplayConsole%CasingPressure = v
  351. end subroutine
  352. subroutine Set_StandPipePressure(v)
  353. use SimulationVariables !@!, only: data%Equipments%DrillingWatch%PumpPressure
  354. use CChokeControlPanelVariables
  355. use SimulationVariables!, only: StandPipePressureChoke => data%Equipments%DataDisplayConsole%StandPipePressure
  356. implicit none
  357. real(8), intent(in) :: v
  358. data%Equipments%DataDisplayConsole%StandPipePressureGauge = v
  359. data%Equipments%DrillingWatch%PumpPressure = v
  360. data%Equipments%ChokeControlPanel%StandPipePressure = v
  361. data%Equipments%DataDisplayConsole%StandPipePressure = v
  362. end subroutine
  363. subroutine Set_RotaryRPMGauge(v)
  364. use SimulationVariables !@!, only: data%Equipments%DrillingWatch%RPM
  365. implicit none
  366. real(8), intent(in) :: v
  367. data%Equipments%DataDisplayConsole%RotaryRPMGauge = v
  368. data%Equipments%DrillingWatch%RPM = v
  369. data%Equipments%DataDisplayConsole%RTRPM = v
  370. ! call data%Equipments%DataDisplayConsole%OnRotaryRpmChange%RunAll(v)
  371. end subroutine
  372. subroutine Set_MP1SPMGauge(v)
  373. implicit none
  374. real(8), intent(in) :: v
  375. data%Equipments%DataDisplayConsole%MP1SPMGauge = v
  376. data%Equipments%DataDisplayConsole%MP1SPM = v
  377. !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge)
  378. #ifdef deb
  379. print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge
  380. #endif
  381. end subroutine
  382. subroutine Set_MP2SPMGauge(v)
  383. implicit none
  384. real(8), intent(in) :: v
  385. data%Equipments%DataDisplayConsole%MP2SPMGauge = v
  386. data%Equipments%DataDisplayConsole%MP2SPM = v
  387. !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge)
  388. #ifdef deb
  389. print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge
  390. #endif
  391. end subroutine
  392. end module CDataDisplayConsole