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.7 KiB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. if(print_log) print*, 'Evaluate_SwingOffPermission=TopDrive'
  9. !TOPDRIVE-CODE=35
  10. if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  11. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  12. Get_TdsSwing() == TDS_SWING_TILT_END .and.&
  13. Get_Slips() == SLIPS_SET_END .and.&
  14. data%Equipments%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then
  15. call Set_SwingOffPermission(.true.)
  16. return
  17. end if
  18. !TOPDRIVE-CODE=36
  19. if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.&
  20. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  21. Get_TdsSwing() == TDS_SWING_DRILL_END .and.&
  22. data%Equipments%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then
  23. call Set_SwingOffPermission(.true.)
  24. return
  25. end if
  26. call Set_SwingOffPermission(.false.)
  27. endif
  28. ! if (DriveType == Kelly_DriveType) then
  29. ! if(print_log) print*, 'Evaluate_SwingOffPermission=Kelly'
  30. ! endif
  31. end subroutine
  32. subroutine Subscribe_SwingOffPermission()
  33. implicit none
  34. end subroutine
  35. end module CSwingOffPermission