Simulation Core
Você não pode selecionar mais de 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.

SoftwareInputs.f90 6.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. module SoftwareInputsModule
  2. use SimulationVariables
  3. contains
  4. subroutine Set_ZeroStringSpeed(v)
  5. implicit none
  6. logical , intent(in) :: v
  7. #ifdef ExcludeExtraChanges
  8. if(data%State%softwareInputs%ZeroStringSpeed == v) return
  9. #endif
  10. data%State%softwareInputs%ZeroStringSpeed = v
  11. #ifdef deb
  12. if(print_log) print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed
  13. #endif
  14. ! call data%State%softwareInputs%OnZeroStringSpeedChange%RunAll()
  15. end subroutine
  16. logical function Get_ZeroStringSpeed()
  17. implicit none
  18. if(abs(data%State%Drawworks%HookLinearVelocity_final)<0.2) then
  19. Get_ZeroStringSpeed = .TRUE.
  20. else
  21. Get_ZeroStringSpeed = .FALSE.
  22. endif
  23. !data%State%softwareInputs%ZeroStringSpeed
  24. !Get_ZeroStringSpeed = .true.
  25. end function
  26. subroutine Set_TdsStemJointHeight(v)
  27. implicit none
  28. real , intent(in) :: v
  29. #ifdef ExcludeExtraChanges
  30. if(data%State%softwareInputs%TdsStemJointHeight == v) return
  31. #endif
  32. data%State%softwareInputs%TdsStemJointHeight = v
  33. #ifdef deb
  34. if(print_log) print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight
  35. #endif
  36. ! call data%State%softwareInputs%OnTdsStemJointHeightChange%RunAll()
  37. end subroutine
  38. real function Get_TdsStemJointHeight()
  39. implicit none
  40. Get_TdsStemJointHeight = data%State%softwareInputs%TdsStemJointHeight
  41. end function
  42. subroutine Set_StringPressure(v)
  43. implicit none
  44. real , intent(in) :: v
  45. #ifdef ExcludeExtraChanges
  46. if(data%State%softwareInputs%StringPressure == v) return
  47. #endif
  48. data%State%softwareInputs%StringPressure = v
  49. #ifdef deb
  50. if(print_log) print*, 'StringPressure=', data%State%softwareInputs%StringPressure
  51. #endif
  52. ! call data%State%softwareInputs%OnStringPressureChange%RunAll()
  53. end subroutine
  54. real function Get_StringPressure()
  55. implicit none
  56. Get_StringPressure = data%State%softwareInputs%StringPressure
  57. end function
  58. subroutine Set_StandRack(v)
  59. implicit none
  60. integer , intent(in) :: v
  61. #ifdef ExcludeExtraChanges
  62. if(data%State%softwareInputs%StandRack == v) return
  63. #endif
  64. data%State%softwareInputs%StandRack = v
  65. #ifdef deb
  66. if(print_log) print*, 'StandRack=', data%State%softwareInputs%StandRack
  67. #endif
  68. ! call data%State%softwareInputs%OnStandRackChanged%RunAll()
  69. end subroutine
  70. integer function Get_StandRack()
  71. implicit none
  72. Get_StandRack = data%State%softwareInputs%StandRack
  73. end function
  74. subroutine Set_SlackOff(v)
  75. implicit none
  76. logical , intent(in) :: v
  77. #ifdef ExcludeExtraChanges
  78. if(data%State%softwareInputs%SlackOff == v) return
  79. #endif
  80. data%State%softwareInputs%SlackOff = v
  81. #ifdef deb
  82. if(print_log) print*, 'SlackOff=', data%State%softwareInputs%SlackOff
  83. #endif
  84. ! call data%State%softwareInputs%OnSlackOffChange%RunAll()
  85. end subroutine
  86. logical function Get_SlackOff()
  87. implicit none
  88. Get_SlackOff = data%State%softwareInputs%SlackOff
  89. end function
  90. subroutine Set_SafetyValveHeight(v)
  91. implicit none
  92. real , intent(in) :: v
  93. #ifdef ExcludeExtraChanges
  94. if(data%State%softwareInputs%SafetyValveHeight == v) return
  95. #endif
  96. data%State%softwareInputs%SafetyValveHeight = v
  97. #ifdef deb
  98. if(print_log) print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight
  99. #endif
  100. ! call data%State%softwareInputs%OnSafetyValveHeightChange%RunAll()
  101. end subroutine
  102. real function Get_SafetyValveHeight()
  103. implicit none
  104. Get_SafetyValveHeight = data%State%softwareInputs%SafetyValveHeight
  105. !Get_SafetyValveHeight = 23
  106. end function
  107. subroutine Set_NearFloorConnection(v)
  108. implicit none
  109. real , intent(in) :: v
  110. #ifdef ExcludeExtraChanges
  111. if(data%State%softwareInputs%NearFloorConnection == v) return
  112. #endif
  113. data%State%softwareInputs%NearFloorConnection = v
  114. #ifdef deb
  115. if(print_log) print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection
  116. #endif
  117. ! call data%State%softwareInputs%OnNearFloorConnectionChange%RunAll()
  118. end subroutine
  119. real function Get_NearFloorConnection()
  120. implicit none
  121. Get_NearFloorConnection = data%State%softwareInputs%NearFloorConnection
  122. !Get_NearFloorConnection = 4
  123. end function
  124. subroutine Set_IbopHeight(v)
  125. implicit none
  126. real , intent(in) :: v
  127. #ifdef ExcludeExtraChanges
  128. if(data%State%softwareInputs%IbopHeight == v) return
  129. #endif
  130. data%State%softwareInputs%IbopHeight = v
  131. #ifdef deb
  132. if(print_log) print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight
  133. #endif
  134. ! call data%State%softwareInputs%OnIbopHeightChange%RunAll()
  135. end subroutine
  136. real function Get_IbopHeight()
  137. implicit none
  138. Get_IbopHeight = data%State%softwareInputs%IbopHeight
  139. !Get_IbopHeight = 23.0
  140. end function
  141. !//TODO: Investigate this hookheight! why two hook height?!
  142. subroutine Set_HookHeight(v)
  143. implicit none
  144. real , intent(in) :: v
  145. #ifdef ExcludeExtraChanges
  146. if(data%State%softwareInputs%HookHeight == v) return
  147. #endif
  148. data%State%softwareInputs%HookHeight = v
  149. #ifdef deb
  150. if(print_log) print*, 'HookHeight=', data%State%softwareInputs%HookHeight
  151. #endif
  152. ! call data%State%softwareInputs%OnHookHeightChange%RunAll()
  153. end subroutine
  154. real function Get_HookHeight()
  155. implicit none
  156. ! Get_HookHeight = data%State%softwareInputs%HookHeight
  157. Get_HookHeight = data%State%Drawworks%Hook_Height_final
  158. end function
  159. end module SoftwareInputsModule