Simulation Core
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

618 linhas
22 KiB

  1. # 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Enums/CElevatorConnectionEnum.f90"
  2. module CElevatorConnectionEnum
  3. use OperationScenariosModule
  4. use CLog3
  5. use CLog4
  6. implicit none
  7. contains
  8. subroutine Evaluate_ElevatorConnection()
  9. use CHoistingVariables
  10. use SimulationVariables
  11. use CCommon, only: SetStandRack
  12. implicit none
  13. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  14. # 18
  15. endif
  16. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  17. # 32
  18. !!OPERATION-CODE=83
  19. !if (Get_OperationCondition() == OPERATION_TRIP .and.&
  20. ! Get_ElevatorConnection() == ELEVATOR_LATCH_STRING .and.&
  21. ! Get_ElevatorPickup() .and.&
  22. ! Get_Slips() == SLIPS_SET_END) then
  23. ! !call Log_4('OPERATION-CODE=83')
  24. ! call Set_ElevatorConnection(ELEVATOR_CONNECTION_STRING)
  25. ! return
  26. !end if
  27. !OPERATION-CODE=78
  28. if (Get_ElevatorPickup() == .false. .and.&
  29. Get_Tong() == TONG_BREAKOUT_END .and.&
  30. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.&
  31. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) then
  32. call Set_ElevatorConnection(ELEVATOR_LATCH_SINGLE)
  33. return
  34. end if
  35. !OPERATION-CODE=79
  36. if (Get_ElevatorPickup() == .false. .and.&
  37. Get_Tong() == TONG_BREAKOUT_END .and.&
  38. Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%SL - data%State%OperationScenario%LG) .and.&
  39. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) then
  40. call Set_ElevatorConnection(ELEVATOR_LATCH_STAND)
  41. return
  42. end if
  43. !OPERATION-CODE=83
  44. if (Get_ElevatorPickup().and.&
  45. Get_ElevatorConnection() == ELEVATOR_LATCH_SINGLE) then
  46. call Set_ElevatorConnection(ELEVATOR_CONNECTION_SINGLE)
  47. return
  48. end if
  49. !OPERATION-CODE=84
  50. if (Get_ElevatorPickup().and.&
  51. Get_ElevatorConnection() == ELEVATOR_LATCH_STAND) then
  52. call Set_ElevatorConnection(ELEVATOR_CONNECTION_STAND)
  53. return
  54. end if
  55. !OPERATION-CODE=7
  56. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  57. !GetRotaryRpm() == 0.0d0 .and.&
  58. !Get_StandRack() > 0 .and.&
  59. Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
  60. !Get_Swing() == SWING_WELL_END .and.&
  61. !Get_Slips() == SLIPS_SET_END .and.&
  62. !Get_LatchLed() .and.
  63. Get_Elevator() == ELEVATOR_LATCH_STAND_END) then
  64. !call Log_4('OPERATION-CODE=7')
  65. call Set_ElevatorConnection(ELEVATOR_CONNECTION_STAND)
  66. !call Set_UnlatchLed(.true.)
  67. !call Set_LatchLed(.false.)
  68. call SetStandRack(Get_StandRack() - 1)
  69. call Set_Elevator(ELEVATOR_NEUTRAL)
  70. return
  71. end if
  72. !OPERATION-CODE=8
  73. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  74. !Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL - RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG) .and.&
  75. !GetRotaryRpm() == 0.0d0 .and.&
  76. !Get_StandRack() < 80 .and.&
  77. !Get_ElevatorConnectionPossible() .and.&
  78. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND .and.&
  79. !Get_Swing() == SWING_WELL_END .and.&
  80. !Get_Slips() == SLIPS_SET_END .and.&
  81. !Get_UnlatchLed() .and.&
  82. Get_Elevator() == ELEVATOR_UNLATCH_STAND_END) then
  83. call Set_ElevatorConnection(ELEVATOR_CONNECTION_NOTHING)
  84. !call Set_UnlatchLed(.false.)
  85. !call Set_LatchLed(.true.)
  86. call SetStandRack(Get_StandRack() + 1)
  87. call Set_Elevator(ELEVATOR_NEUTRAL)
  88. !call Set_Elevator(ELEVATOR_UNLATCH_STAND_BEGIN)
  89. call Log_3('OPERATION-CODE=8')
  90. return
  91. end if
  92. !OPERATION-CODE=9
  93. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  94. !Get_HookHeight() >= 18.0 .and. Get_HookHeight() <= 22.0 .and.&
  95. Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
  96. !Get_Swing() == SWING_WELL_END .and.&
  97. !Get_Slips() == SLIPS_SET_END .and.&
  98. !Get_LatchLed() .and.&
  99. !Get_ElevatorPickup() .and.&
  100. Get_Elevator() == ELEVATOR_LATCH_STRING_END) then
  101. !call Log_4('OPERATION-CODE=9')
  102. call Set_ElevatorConnection(ELEVATOR_LATCH_STRING)
  103. call Set_Elevator(ELEVATOR_NEUTRAL)
  104. !call Set_UnlatchLed(.true.)
  105. !call Set_LatchLed(.false.)
  106. !call Set_UnlatchLed(.false.)
  107. !call Set_Elevator(ELEVATOR_LATCH_STRING_BEGIN)
  108. return
  109. end if
  110. !OPERATION-CODE=60
  111. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  112. !Get_HookHeight() <= (HL + Get_NearFloorConnection() - ECG) .and.&
  113. Get_ElevatorPickup() == .false. .and.&
  114. Get_Slips() == SLIPS_SET_END .and.&
  115. !Get_Tong() /= TONG_MAKEUP_END .and.&
  116. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING) then
  117. call Set_ElevatorConnection(ELEVATOR_LATCH_STRING)
  118. !call Set_Elevator(ELEVATOR_NEUTRAL)
  119. return
  120. end if
  121. !OPERATION-CODE=49
  122. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  123. Get_ElevatorPickup() .and.&
  124. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) then
  125. call Set_ElevatorConnection(ELEVATOR_CONNECTION_STRING)
  126. return
  127. end if
  128. !OPERATION-CODE=10
  129. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  130. !GetRotaryRpm() == 0.0d0 .and.&
  131. (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.&
  132. !Get_Swing() == SWING_WELL_END .and.&
  133. !Get_Slips() == SLIPS_SET_END .and.&
  134. !Get_UnlatchLed() .and.&
  135. Get_Elevator() == ELEVATOR_UNLATCH_STRING_END) then
  136. !call Log_4('OPERATION-CODE=10')
  137. call Set_ElevatorConnection(ELEVATOR_CONNECTION_NOTHING)
  138. call Set_Elevator(ELEVATOR_NEUTRAL)
  139. !call Set_UnlatchLed(.false.)
  140. !call Set_LatchLed(.true.)
  141. !call Set_Elevator(ELEVATOR_UNLATCH_STRING_BEGIN)
  142. return
  143. end if
  144. !OPERATION-CODE=11
  145. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  146. !Get_ElevatorConnectionPossible() .and.&
  147. Get_ElevatorPickup().and.&
  148. Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
  149. !Get_Swing() == SWING_MOUSE_HOLE_END .and.&
  150. !Get_LatchLed() .and.&
  151. !Get_FillMouseHoleLed() .and.&
  152. Get_Elevator() == ELEVATOR_LATCH_SINGLE_END) then
  153. call Set_ElevatorConnection(ELEVATOR_CONNECTION_SINGLE)
  154. !call Set_UnlatchLed(.true.)
  155. call Set_FillMouseHoleLed(.false.)
  156. call Set_MouseHole(MOUSE_HOLE_NEUTRAL)
  157. call Set_Elevator(ELEVATOR_NEUTRAL)
  158. !call Set_Elevator(ELEVATOR_LATCH_SINGLE_BEGIN)
  159. return
  160. end if
  161. !OPERATION-CODE=12
  162. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  163. Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.&
  164. !Get_Swing() == SWING_MOUSE_HOLE_END .and.&
  165. !Get_UnlatchLed() .and.&
  166. !Get_FillMouseHoleLed() == .false. .and.&
  167. Get_Elevator() == ELEVATOR_UNLATCH_SINGLE_END) then
  168. !call Log_4('OPERATION-CODE=12')
  169. call Set_ElevatorConnection(ELEVATOR_CONNECTION_NOTHING)
  170. !call Set_UnlatchLed(.false.)
  171. !call Set_LatchLed(.true.)
  172. call Set_FillMouseHoleLed(.true.)
  173. call Set_MouseHole(MOUSE_HOLE_NEUTRAL)
  174. call Set_Elevator(ELEVATOR_NEUTRAL)
  175. !call Set_Elevator(ELEVATOR_UNLATCH_SINGLE_BEGIN)
  176. return
  177. end if
  178. !OPERATION-CODE=13
  179. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  180. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.&
  181. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.&
  182. !Get_Swing() == SWING_WELL_END .and.&
  183. !Get_TongNotification() .and.&
  184. Get_ElevatorPickup().and.&
  185. Get_Tong() == TONG_BREAKOUT_END) then
  186. !call Log_4('OPERATION-CODE=13')
  187. call Set_ElevatorConnection(ELEVATOR_CONNECTION_SINGLE)
  188. call Set_StringUpdate(STRING_UPDATE_REMOVE_SINGLE)
  189. !call Set_StringUpdate(STRING_UPDATE_ADD_SINGLE)
  190. call Set_Tong(TONG_NEUTRAL)
  191. return
  192. end if
  193. !OPERATION-CODE=14
  194. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  195. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.&
  196. Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.&
  197. !Get_Swing() == SWING_WELL_END .and.&
  198. !Get_TongNotification() .and.&
  199. Get_ElevatorPickup().and.&
  200. Get_Tong() == TONG_MAKEUP_END) then
  201. !call Log_4('OPERATION-CODE=14')
  202. call Set_Tong(TONG_NEUTRAL)
  203. call Set_ElevatorConnection(ELEVATOR_CONNECTION_STRING)
  204. call Set_StringUpdate(STRING_UPDATE_ADD_SINGLE)
  205. return
  206. end if
  207. !OPERATION-CODE=15
  208. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  209. Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%SL - data%State%OperationScenario%LG) .and.&
  210. !Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL - RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG) .and.&
  211. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.&
  212. !Get_Swing() == SWING_WELL_END .and.&
  213. !Get_TongNotification() .and.&
  214. Get_ElevatorPickup().and.&
  215. Get_Tong() == TONG_BREAKOUT_END) then
  216. call Set_Tong(TONG_NEUTRAL)
  217. call Set_ElevatorConnection(ELEVATOR_CONNECTION_STAND)
  218. call Set_StringUpdate(STRING_UPDATE_REMOVE_STAND)
  219. return
  220. end if
  221. !OPERATION-CODE=16
  222. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  223. !Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL - RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG) .and.&
  224. !Get_JointConnectionPossible() .and.&
  225. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND .and.&
  226. !Get_Swing() == SWING_WELL_END .and.&
  227. !Get_TongNotification() .and.&
  228. Get_ElevatorPickup().and.&
  229. Get_Tong() == TONG_MAKEUP_END) then
  230. !call Log_4('OPERATION-CODE=16')
  231. call Set_Tong(TONG_NEUTRAL)
  232. call Set_ElevatorConnection(ELEVATOR_CONNECTION_STRING)
  233. call Set_StringUpdate(STRING_UPDATE_ADD_STAND)
  234. return
  235. end if
  236. !OPERATION-CODE=75
  237. if (Get_ElevatorPickup() == .false. .and.&
  238. Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE) then
  239. call Set_ElevatorConnection(ELEVATOR_LATCH_SINGLE)
  240. return
  241. end if
  242. !OPERATION-CODE=76
  243. if (Get_ElevatorPickup() == .false. .and.&
  244. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND) then
  245. call Set_ElevatorConnection(ELEVATOR_LATCH_STAND)
  246. return
  247. end if
  248. endif
  249. end subroutine
  250. ! subroutine Subscribe_ElevatorConnection()
  251. ! use CDrillingConsoleVariables
  252. ! use ConfigurationVariables
  253. ! use ConfigurationVariables
  254. ! implicit none
  255. ! call OnLatchPipePress%Add(ButtonPress_Latch_ElevatorConnection)
  256. ! call OnUnlatchPipePress%Add(ButtonPress_Unlatch_ElevatorConnection)
  257. ! call OnBreakoutLeverPress%Add(ButtonPress_Breakout_ElevatorConnection)
  258. ! call OnMakeupLeverPress%Add(ButtonPress_Makeup_ElevatorConnection)
  259. ! end subroutine
  260. subroutine ButtonPress_Latch_ElevatorConnection()
  261. use CCommon, only: SetStandRack
  262. implicit none
  263. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  264. # 348
  265. !TOPDRIVE-CODE=73
  266. if ((Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() + data%State%OperationScenario%TG)) .and.&
  267. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  268. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  269. Get_LatchLed()) then
  270. call Set_Elevator(ELEVATOR_LATCH_STAND_BEGIN)
  271. call Set_LatchLed(.false.)
  272. return
  273. end if
  274. !TOPDRIVE-CODE=74
  275. if (Get_HookHeight() <= (TL() + NFC() - data%State%OperationScenario%ECG) .and.&
  276. GetRotaryRpm() == 0.0d0 .and.&
  277. Get_ElevatorConnectionPossible() .and.&
  278. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  279. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  280. Get_LatchLed()) then
  281. call Set_Elevator(ELEVATOR_LATCH_STRING_BEGIN)
  282. call Set_LatchLed(.false.)
  283. return
  284. end if
  285. !TOPDRIVE-CODE=75
  286. if (Get_ElevatorConnectionPossible() .and.&
  287. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  288. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  289. Get_LatchLed() .and.&
  290. Get_FillMouseHoleLed()) then
  291. call Set_Elevator(ELEVATOR_LATCH_SINGLE_BEGIN)
  292. call Set_LatchLed(.false.)
  293. return
  294. end if
  295. endif
  296. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  297. # 420
  298. !OPERATION-CODE=86
  299. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  300. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() - data%State%OperationScenario%ECG) .and.&
  301. Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
  302. Get_LatchLed() .and.&
  303. GetRotaryRpm() == 0.0d0 .and.&
  304. Get_Swing() == SWING_WELL_END .and.&
  305. Get_ElevatorConnectionPossible() .and.&
  306. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection())) then
  307. !call Log_4("OPERATION-CODE=ELEVATOR_LATCH_STRING_BEGIN")
  308. call Set_Elevator(ELEVATOR_LATCH_STRING_BEGIN)
  309. call Set_LatchLed(.false.)
  310. return
  311. endif
  312. !OPERATION-CODE=85
  313. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  314. Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.&
  315. Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
  316. Get_LatchLed() .and.&
  317. Get_Swing() == SWING_WELL_END) then
  318. !Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL + RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG)
  319. call Set_Elevator(ELEVATOR_LATCH_STAND_BEGIN)
  320. call Set_LatchLed(.false.)
  321. return
  322. endif
  323. !OPERATION-CODE=87
  324. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  325. Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
  326. Get_LatchLed() .and.&
  327. Get_FillMouseHoleLed() .and.&
  328. Get_ElevatorConnectionPossible() .and.&
  329. Get_Swing() == SWING_MOUSE_HOLE_END) then
  330. call Set_Elevator(ELEVATOR_LATCH_SINGLE_BEGIN)
  331. call Set_LatchLed(.false.)
  332. return
  333. endif
  334. endif
  335. end subroutine
  336. subroutine ButtonPress_Unlatch_ElevatorConnection()
  337. use CCommon, only: SetStandRack
  338. implicit none
  339. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  340. # 491
  341. !TOPDRIVE-CODE=76
  342. if ((Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() + data%State%OperationScenario%TG)) .and.&
  343. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STAND .and.&
  344. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  345. Get_UnlatchLed()) then
  346. call Set_Elevator(ELEVATOR_UNLATCH_STAND_BEGIN)
  347. call Set_UnlatchLed(.false.)
  348. return
  349. end if
  350. !TOPDRIVE-CODE=77
  351. if (Get_HookHeight() <= (TL() + NFC() - data%State%OperationScenario%ECG) .and.&
  352. GetRotaryRpm() == 0.0d0 .and.&
  353. Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.&
  354. (Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_STRING .or. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING) .and.&
  355. Get_TdsSwing() == TDS_SWING_OFF_END .and.&
  356. Get_UnlatchLed()) then
  357. call Set_Elevator(ELEVATOR_UNLATCH_STRING_BEGIN)
  358. call Set_UnlatchLed(.false.)
  359. return
  360. end if
  361. !TOPDRIVE-CODE=78
  362. if ((Get_HookHeight() > TL() .and. Get_HookHeight() < (TL() + NFC() + data%State%OperationScenario%SG)) .and.&
  363. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE .and.&
  364. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  365. Get_UnlatchLed() .and.&
  366. Get_FillMouseHoleLed() == .false.) then
  367. call Set_Elevator(ELEVATOR_UNLATCH_SINGLE_BEGIN)
  368. call Set_UnlatchLed(.false.)
  369. return
  370. end if
  371. endif
  372. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  373. # 559
  374. !OPERATION-CODE=89
  375. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  376. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() - data%State%OperationScenario%ECG) .and.&
  377. (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.&
  378. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection()) .and.&
  379. Get_UnlatchLed() .and.&
  380. GetRotaryRpm() == 0.0d0 .and.&
  381. Get_Swing() == SWING_WELL_END .and.&
  382. Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0) then
  383. !Get_HookHeight() >= (HL + Get_NearFloorConnection() - 4.0) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() - 2.0)) then
  384. call Set_Elevator(ELEVATOR_UNLATCH_STRING_BEGIN)
  385. call Set_UnlatchLed(.false.)
  386. return
  387. endif
  388. !OPERATION-CODE=88
  389. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  390. Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.&
  391. !Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL + RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG)
  392. Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND .and.&
  393. Get_UnlatchLed() .and.&
  394. Get_Swing() == SWING_WELL_END) then
  395. call Set_Elevator(ELEVATOR_UNLATCH_STAND_BEGIN)
  396. call Set_UnlatchLed(.false.)
  397. return
  398. endif
  399. !OPERATION-CODE=90
  400. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  401. Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.&
  402. Get_UnlatchLed() .and.&
  403. Get_HookHeight() >= data%State%OperationScenario%HL .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%SG) .and.&
  404. !Get_JointConnectionPossible() .and.&
  405. Get_Swing() == SWING_MOUSE_HOLE_END) then
  406. call Set_Elevator(ELEVATOR_UNLATCH_SINGLE_BEGIN)
  407. call Set_UnlatchLed(.false.)
  408. return
  409. endif
  410. endif
  411. end subroutine
  412. subroutine ButtonPress_Breakout_ElevatorConnection()
  413. implicit none
  414. end subroutine
  415. subroutine ButtonPress_Makeup_ElevatorConnection()
  416. implicit none
  417. end subroutine
  418. end module CElevatorConnectionEnum