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.
 
 
 
 
 
 

619 lines
23 KiB

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