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.

CIrIbopPermission.i90 2.8 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Permissions/CIrIbopPermission.f90"
  2. module CIrIbopPermission
  3. use OperationScenariosModule
  4. implicit none
  5. contains
  6. subroutine Evaluate_IrIbopPermission()
  7. use TD_DrillStemComponents
  8. use UnitySignalsModule !for CTdsConnectionModesEnum
  9. use CStudentStationVariables!, only: data%State%StudentStation%FillupHeadInstallation
  10. implicit none
  11. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  12. # 16
  13. !TOPDRIVE-CODE=58
  14. if (GetRotaryRpm() == 0.0d0 .and.&
  15. Get_NearFloorConnection() >= 3 .and. Get_NearFloorConnection() <= 10 .and.&
  16. Get_JointConnectionPossible() == .false. .and.&
  17. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  18. data%State%StudentStation%FillupHeadInstallation == .false.) then
  19. call Set_IrIbopPermission(.true.)
  20. return
  21. end if
  22. call Set_IrIbopPermission(.false.)
  23. endif
  24. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  25. # 46
  26. !OPERATION-CODE=62
  27. if (GetRotaryRpm() == 0.0d0 .and.&
  28. Get_OperationCondition() == OPERATION_TRIP .and.&
  29. !(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.&
  30. data%State%TD_String%TopJointHeight >= 3.0 .and. data%State%TD_String%TopJointHeight <= 10.0 .and.&
  31. !Get_IbopHeight() >= 22.0 .and. Get_IbopHeight() <= 35.0 .and.&
  32. Get_JointConnectionPossible() == .false. .and.&
  33. Get_Swing() == SWING_WELL_END .and.&
  34. Get_FillupHead() == FILLUP_HEAD_REMOVE) then
  35. call Set_IrIbopPermission(.true.)
  36. return
  37. end if
  38. !if (Get_OperationCondition() == OPERATION_DRILL .and.&
  39. ! Get_IbopHeight() >= 1 .and. Get_IbopHeight() <= 8 .and.&
  40. ! Get_NearFloorConnection() >= 1 .and. Get_NearFloorConnection() <= 8 .and.&
  41. ! Get_JointConnectionPossible() == .false. .and.&
  42. ! Get_KellyConnection() /= KELLY_CONNECTION_STRING .and.&
  43. ! Get_Swing() == SWING_WELL_END .and.&
  44. ! Get_Slips() == SLIPS_SET_END) then
  45. ! call Set_IrIbopPermission(.true.)
  46. ! return
  47. !end if
  48. call Set_IrIbopPermission(.false.)
  49. endif
  50. end subroutine
  51. subroutine Subscribe_IrIbopPermission()
  52. implicit none
  53. end subroutine
  54. end module CIrIbopPermission