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.

CSwingOffPermission.f90 1.8 KiB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. module CSwingOffPermission
  2. use OperationScenariosModule
  3. implicit none
  4. contains
  5. subroutine Evaluate_SwingOffPermission()
  6. implicit none
  7. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  8. #ifdef OST
  9. print*, 'Evaluate_SwingOffPermission=TopDrive'
  10. #endif
  11. !TOPDRIVE-CODE=35
  12. if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  13. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  14. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  15. Get_Slips() == SLIPS_SET_END .and.&
  16. data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then
  17. call Set_SwingOffPermission(.true.)
  18. return
  19. end if
  20. !TOPDRIVE-CODE=36
  21. if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  22. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  23. Get_TdsSwing() == TDS_SWING_DRILL_END .and.&
  24. data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then
  25. call Set_SwingOffPermission(.true.)
  26. return
  27. end if
  28. call Set_SwingOffPermission(.false.)
  29. endif
  30. ! if (DriveType == Kelly_DriveType) then
  31. !#ifdef OST
  32. ! print*, 'Evaluate_SwingOffPermission=Kelly'
  33. !#endif
  34. ! endif
  35. end subroutine
  36. subroutine Subscribe_SwingOffPermission()
  37. implicit none
  38. end subroutine
  39. end module CSwingOffPermission