@@ -1,6 +1,19 @@ | |||
{ | |||
"version": "0.2.0", | |||
"configurations": [ | |||
{ | |||
"name": "Debug (Afra)", | |||
"type": "cppdbg", | |||
"request": "launch", | |||
"program": "${workspaceRoot}/SimulationCore2", | |||
"args": ["78.109.201.86", "6379", "'1qazxsw2$$'", "37364875-c9cf-43a3-de45-08dc0c6103c9", "4", "100","1"], | |||
"stopAtEntry": false, | |||
"cwd": "${workspaceRoot}", | |||
"externalConsole": false, | |||
"MIMode": "gdb", | |||
"preLaunchTask": "make", | |||
}, | |||
{ | |||
"name": "(gdb) Launch", | |||
"type": "cppdbg", | |||
@@ -8,7 +21,8 @@ | |||
"program": "${workspaceFolder}/a.out", | |||
"args": [], | |||
"stopAtEntry": false, | |||
"cwd": "${fileDirname}", | |||
"cwd": "${workspaceFolder}", | |||
#fileDirname | |||
"environment": [], | |||
"externalConsole": false, | |||
"MIMode": "gdb", | |||
@@ -22,15 +36,16 @@ | |||
"description": "Set Disassembly Flavor to Intel", | |||
"text": "-gdb-set disassembly-flavor intel", | |||
"ignoreFailures": true | |||
} | |||
] | |||
}, | |||
], | |||
"preLaunchTask": "build" | |||
}, | |||
{ | |||
"name": "Debug (Liara)", | |||
"type": "cppdbg", | |||
"request": "launch", | |||
"program": "${workspaceRoot}/SimulationCore2", | |||
"args": ["aberama.iran.liara.ir", "32815", "4YKFnubfFFjfh4yTK7b0Rg9X", "de972886-410b-440e-f8cc-08dba274a00f", "4", "1000"], | |||
"args": ["aberama.iran.liara.ir", "32815", "4YKFnubfFFjfh4yTK7b0Rg9X", "de972886-410b-440e-f8cc-08dba274a00f", "4", "1000","10"], | |||
"stopAtEntry": false, | |||
"cwd": "${workspaceRoot}", | |||
"externalConsole": false, | |||
@@ -42,7 +57,7 @@ | |||
"type": "cppdbg", | |||
"request": "launch", | |||
"program": "${workspaceRoot}/SimulationCore2", | |||
"args": ["85.198.9.229", "6379", "'1qazxsw2$$'", "b6996849-fb69-4076-ca17-08dbea60e4cb", "4", "100"], | |||
"args": ["85.198.9.229", "6379", "'1qazxsw2$$'", "b6996849-fb69-4076-ca17-08dbea60e4cb", "4", "100","10"], | |||
"stopAtEntry": false, | |||
"cwd": "${workspaceRoot}", | |||
"externalConsole": false, | |||
@@ -1,5 +1,7 @@ | |||
{ | |||
"files.associations": { | |||
"hiredis.h": "c" | |||
"hiredis.h": "c", | |||
"async.h": "c", | |||
"libevent.h": "c" | |||
} | |||
} |
@@ -20,6 +20,24 @@ | |||
"cwd": "${workspaceRoot}" | |||
} | |||
}, | |||
{ | |||
"label": "build", | |||
"type": "shell", | |||
"command": "/usr/bin/cc", | |||
"args": [ | |||
"-g", | |||
"${file}", | |||
"lib/libhiredis.a", | |||
"-o", | |||
"${workspaceFolder}/a.out", | |||
"-I${workspaceFolder}/include", | |||
"-L${workspaceFolder}/lib", | |||
"-levent", | |||
], | |||
"group": { | |||
"kind": "build", | |||
"isDefault": true | |||
} | |||
} | |||
] | |||
} |
@@ -52,7 +52,7 @@ module DownHoleModule | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
data%Equipments%DownHole%AnnalusFluidsCount = count | |||
print*, 'AnnalusFluidsCount = ', count | |||
if(print_log) print*, 'AnnalusFluidsCount = ', count | |||
if(size(data%Equipments%DownHole%AnnalusFluids) > 0) then | |||
deallocate(data%Equipments%DownHole%AnnalusFluids) | |||
end if | |||
@@ -73,22 +73,22 @@ module DownHoleModule | |||
! call AnnalusMudCountPtr(AnnalusFluidsCount) | |||
!end if | |||
if(.not.allocated(data%Equipments%DownHole%AnnalusFluids))allocate(data%Equipments%DownHole%AnnalusFluids(data%Equipments%DownHole%AnnalusFluidsCount)) | |||
!print*, '============START-AN============' | |||
!if(print_log) print*, '============START-AN============' | |||
if(item%StartMd < 0) data%Equipments%DownHole%AnnalusFluids(1)%StartMd = 0 | |||
do i = 1, count | |||
item => array(i) | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) data%Equipments%DownHole%AnnalusFluids(i)%StartMd = 0 | |||
!print*, 'AnnalusFluids(',i,')%StartMd=', AnnalusFluids(i)%StartMd | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%StartMd=', AnnalusFluids(i)%StartMd | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'AnnalusFluids(',i,')%EndMd=', AnnalusFluids(i)%EndMd | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%EndMd=', AnnalusFluids(i)%EndMd | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%Density = item%Density | |||
!print*, 'AnnalusFluids(',i,')%Density=', AnnalusFluids(i)%Density | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%Density=', AnnalusFluids(i)%Density | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%MudType = item%MudType | |||
!print*, 'AnnalusFluids(',i,')%MudType=', AnnalusFluids(i)%MudType | |||
!print*, '----------------------------' | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%MudType=', AnnalusFluids(i)%MudType | |||
!if(print_log) print*, '----------------------------' | |||
end do | |||
!print*, '============END-AN============' | |||
!if(print_log) print*, '============END-AN============' | |||
!if(associated(AnnalusMudArrayPtr)) then | |||
! !AnnalusFluidsPtr => AnnalusFluids | |||
! call AnnalusMudArrayPtr(AnnalusFluids) | |||
@@ -103,7 +103,7 @@ module DownHoleModule | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
data%Equipments%DownHole%StringFluidsCount = count | |||
print*, 'StringFluidsCount = ', count | |||
if(print_log) print*, 'StringFluidsCount = ', count | |||
if(size(data%Equipments%DownHole%StringFluids) > 0) then | |||
deallocate(data%Equipments%DownHole%StringFluids) | |||
end if | |||
@@ -137,21 +137,21 @@ module DownHoleModule | |||
! call StringMudCountPtr(count) | |||
!end if | |||
if(.not.allocated(data%Equipments%DownHole%StringFluids))allocate(data%Equipments%DownHole%StringFluids(data%Equipments%DownHole%StringFluidsCount)) | |||
!print*, '============START-ST============' | |||
!print*, 'count=', count | |||
!if(print_log) print*, '============START-ST============' | |||
!if(print_log) print*, 'count=', count | |||
do i = 1, count | |||
item => array(i) | |||
data%Equipments%DownHole%StringFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) data%Equipments%DownHole%StringFluids(i)%StartMd = 0 | |||
!print*, 'StringFluids(i)%StartMd=', StringFluids(i)%StartMd | |||
!if(print_log) print*, 'StringFluids(i)%StartMd=', StringFluids(i)%StartMd | |||
data%Equipments%DownHole%StringFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'StringFluids(i)%EndMd=', StringFluids(i)%EndMd | |||
!if(print_log) print*, 'StringFluids(i)%EndMd=', StringFluids(i)%EndMd | |||
data%Equipments%DownHole%StringFluids(i + offset)%Density = item%Density | |||
data%Equipments%DownHole%StringFluids(i + offset)%MudType = item%MudType | |||
!print*, '----------------------------' | |||
!if(print_log) print*, '----------------------------' | |||
end do | |||
!!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | |||
!!print*, '============END-ST============' | |||
!!if(print_log) print*, '============END-ST============' | |||
!if(associated(StringMudArrayPtr)) then | |||
! call StringMudArrayPtr(StringFluids) | |||
!end if | |||
@@ -175,7 +175,7 @@ module DownHoleModule | |||
!end if | |||
allocate(data%Equipments%DownHole%String(count)) | |||
!j = 0 | |||
!print*, '============CMP-ST============' | |||
!if(print_log) print*, '============CMP-ST============' | |||
!call Log_3( '============CMP-ST============') | |||
!do i = count, 1, -1 | |||
do i = 1, count | |||
@@ -199,11 +199,11 @@ module DownHoleModule | |||
if(item%ComponentType == 4) data%Equipments%DownHole%String(i)%ComponentType=1 | |||
if(item%ComponentType == 2) data%Equipments%DownHole%String(i)%ComponentType=2 | |||
if(item%ComponentType == 1) data%Equipments%DownHole%String(i)%ComponentType=3 | |||
!print*, 'item%ComponentType=', item%ComponentType | |||
!print*, 'String(i)%ComponentType=', String(i)%ComponentType | |||
!print*, 'String(i)%StartMd=', String(i)%StartMd | |||
!print*, 'String(i)%EndMd=', String(i)%EndMd | |||
!print*, '----------------------------' | |||
!if(print_log) print*, 'item%ComponentType=', item%ComponentType | |||
!if(print_log) print*, 'String(i)%ComponentType=', String(i)%ComponentType | |||
!if(print_log) print*, 'String(i)%StartMd=', String(i)%StartMd | |||
!if(print_log) print*, 'String(i)%EndMd=', String(i)%EndMd | |||
!if(print_log) print*, '----------------------------' | |||
!call Log_3( 'item%ComponentType=', item%ComponentType) | |||
!call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | |||
@@ -212,7 +212,7 @@ module DownHoleModule | |||
!call Log_3( '----------------------------') | |||
end do | |||
!!print*, '============CMP-ST============' | |||
!!if(print_log) print*, '============CMP-ST============' | |||
!!call Log_3( '============CMP-ST============') | |||
!if(associated(StringComponentArrayPtr)) then | |||
! call StringComponentArrayPtr(String) | |||
@@ -53,7 +53,7 @@ module DownHoleModule | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
data%Equipments%DownHole%AnnalusFluidsCount = count | |||
print*, 'AnnalusFluidsCount = ', count | |||
if(print_log) print*, 'AnnalusFluidsCount = ', count | |||
if(size(data%Equipments%DownHole%AnnalusFluids) > 0) then | |||
deallocate(data%Equipments%DownHole%AnnalusFluids) | |||
end if | |||
@@ -74,22 +74,22 @@ module DownHoleModule | |||
! call AnnalusMudCountPtr(AnnalusFluidsCount) | |||
!end if | |||
if(.not.allocated(data%Equipments%DownHole%AnnalusFluids))allocate(data%Equipments%DownHole%AnnalusFluids(data%Equipments%DownHole%AnnalusFluidsCount)) | |||
!print*, '============START-AN============' | |||
!if(print_log) print*, '============START-AN============' | |||
if(item%StartMd < 0) data%Equipments%DownHole%AnnalusFluids(1)%StartMd = 0 | |||
do i = 1, count | |||
item => array(i) | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) data%Equipments%DownHole%AnnalusFluids(i)%StartMd = 0 | |||
!print*, 'AnnalusFluids(',i,')%StartMd=', AnnalusFluids(i)%StartMd | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%StartMd=', AnnalusFluids(i)%StartMd | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'AnnalusFluids(',i,')%EndMd=', AnnalusFluids(i)%EndMd | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%EndMd=', AnnalusFluids(i)%EndMd | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%Density = item%Density | |||
!print*, 'AnnalusFluids(',i,')%Density=', AnnalusFluids(i)%Density | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%Density=', AnnalusFluids(i)%Density | |||
data%Equipments%DownHole%AnnalusFluids(i + offset)%MudType = item%MudType | |||
!print*, 'AnnalusFluids(',i,')%MudType=', AnnalusFluids(i)%MudType | |||
!print*, '----------------------------' | |||
!if(print_log) print*, 'AnnalusFluids(',i,')%MudType=', AnnalusFluids(i)%MudType | |||
!if(print_log) print*, '----------------------------' | |||
end do | |||
!print*, '============END-AN============' | |||
!if(print_log) print*, '============END-AN============' | |||
!if(associated(AnnalusMudArrayPtr)) then | |||
! !AnnalusFluidsPtr => AnnalusFluids | |||
! call AnnalusMudArrayPtr(AnnalusFluids) | |||
@@ -104,7 +104,7 @@ module DownHoleModule | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
data%Equipments%DownHole%StringFluidsCount = count | |||
print*, 'StringFluidsCount = ', count | |||
if(print_log) print*, 'StringFluidsCount = ', count | |||
if(size(data%Equipments%DownHole%StringFluids) > 0) then | |||
deallocate(data%Equipments%DownHole%StringFluids) | |||
end if | |||
@@ -138,21 +138,21 @@ module DownHoleModule | |||
! call StringMudCountPtr(count) | |||
!end if | |||
if(.not.allocated(data%Equipments%DownHole%StringFluids))allocate(data%Equipments%DownHole%StringFluids(data%Equipments%DownHole%StringFluidsCount)) | |||
!print*, '============START-ST============' | |||
!print*, 'count=', count | |||
!if(print_log) print*, '============START-ST============' | |||
!if(print_log) print*, 'count=', count | |||
do i = 1, count | |||
item => array(i) | |||
data%Equipments%DownHole%StringFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) data%Equipments%DownHole%StringFluids(i)%StartMd = 0 | |||
!print*, 'StringFluids(i)%StartMd=', StringFluids(i)%StartMd | |||
!if(print_log) print*, 'StringFluids(i)%StartMd=', StringFluids(i)%StartMd | |||
data%Equipments%DownHole%StringFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'StringFluids(i)%EndMd=', StringFluids(i)%EndMd | |||
!if(print_log) print*, 'StringFluids(i)%EndMd=', StringFluids(i)%EndMd | |||
data%Equipments%DownHole%StringFluids(i + offset)%Density = item%Density | |||
data%Equipments%DownHole%StringFluids(i + offset)%MudType = item%MudType | |||
!print*, '----------------------------' | |||
!if(print_log) print*, '----------------------------' | |||
end do | |||
!!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | |||
!!print*, '============END-ST============' | |||
!!if(print_log) print*, '============END-ST============' | |||
!if(associated(StringMudArrayPtr)) then | |||
! call StringMudArrayPtr(StringFluids) | |||
!end if | |||
@@ -176,7 +176,7 @@ module DownHoleModule | |||
!end if | |||
allocate(data%Equipments%DownHole%String(count)) | |||
!j = 0 | |||
!print*, '============CMP-ST============' | |||
!if(print_log) print*, '============CMP-ST============' | |||
!call Log_3( '============CMP-ST============') | |||
!do i = count, 1, -1 | |||
do i = 1, count | |||
@@ -200,11 +200,11 @@ module DownHoleModule | |||
if(item%ComponentType == 4) data%Equipments%DownHole%String(i)%ComponentType=1 | |||
if(item%ComponentType == 2) data%Equipments%DownHole%String(i)%ComponentType=2 | |||
if(item%ComponentType == 1) data%Equipments%DownHole%String(i)%ComponentType=3 | |||
!print*, 'item%ComponentType=', item%ComponentType | |||
!print*, 'String(i)%ComponentType=', String(i)%ComponentType | |||
!print*, 'String(i)%StartMd=', String(i)%StartMd | |||
!print*, 'String(i)%EndMd=', String(i)%EndMd | |||
!print*, '----------------------------' | |||
!if(print_log) print*, 'item%ComponentType=', item%ComponentType | |||
!if(print_log) print*, 'String(i)%ComponentType=', String(i)%ComponentType | |||
!if(print_log) print*, 'String(i)%StartMd=', String(i)%StartMd | |||
!if(print_log) print*, 'String(i)%EndMd=', String(i)%EndMd | |||
!if(print_log) print*, '----------------------------' | |||
!call Log_3( 'item%ComponentType=', item%ComponentType) | |||
!call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | |||
@@ -213,7 +213,7 @@ module DownHoleModule | |||
!call Log_3( '----------------------------') | |||
end do | |||
!!print*, '============CMP-ST============' | |||
!!if(print_log) print*, '============CMP-ST============' | |||
!!call Log_3( '============CMP-ST============') | |||
!if(associated(StringComponentArrayPtr)) then | |||
! call StringComponentArrayPtr(String) | |||
@@ -68,7 +68,6 @@ module CBopControlPanel | |||
! call json%get(pval,data%Equipments%BopControlPanel%MiddleRamsStatus) | |||
! call json%get(p,'LowerRamsStatus',pval) | |||
! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsStatus) | |||
call json%get(p,'AnnularRegulatorSetControl',pval) | |||
call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl) | |||
! 2. get member of data type from node | |||
@@ -5,47 +5,24 @@ module CChokeControlPanel | |||
public | |||
contains | |||
subroutine ChokeControlPanelFromJson(parent) | |||
type(json_value),pointer :: parent | |||
type(json_core) :: json | |||
type(json_value),pointer :: p,pval | |||
! 1. get related root | |||
call json%get(parent,'ChokeControl',p) | |||
! 2. get member of data type from node | |||
call json%get(p,'ChokeControlLever',pval) | |||
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeControlLever) | |||
call json%get(p,'ChokePanelRigAirSwitch',pval) | |||
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch) | |||
call json%get(p,'ChokePanelPumpSelectorSwitch',pval) | |||
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch) | |||
call json%get(p,'ChokePanelStrokeResetSwitch',pval) | |||
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch) | |||
call json%get(p,'ChokeSelectorSwitch',pval) | |||
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch) | |||
call json%get(p,'ChokeRateControlKnob',pval) | |||
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeRateControlKnob) | |||
! call json%get(p,'EnableAutoChoke',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%EnableAutoChoke) | |||
! call json%get(p,'StandPipePressure',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%StandPipePressure) | |||
! call json%get(p,'CasingPressure',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%CasingPressure) | |||
! call json%get(p,'ChokePosition',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%ChokePosition) | |||
! call json%get(p,'ChokePanelSPMCounter',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelSPMCounter) | |||
! call json%get(p,'ChokePanelTotalStrokeCounter',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelTotalStrokeCounter) | |||
! call json%get(p,'Choke1LED',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%Choke1LED) | |||
! call json%get(p,'Choke2LED',pval) | |||
! call json%get(pval,data%Equipments%ChokeControlPanel%Choke2LED) | |||
end subroutine | |||
subroutine ChokeControlPanelFromJson(jsonfile) | |||
type(json_file)::jsonfile | |||
logical::found | |||
call jsonfile%get('Equipments.ChokeControl.ChokePanelPumpSelectorSwitch',data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch,found) | |||
if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokePanelPumpSelectorSwitch") | |||
call jsonfile%get('Equipments.ChokeControl.ChokePanelStrokeResetSwitch',data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch,found) | |||
if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokePanelStrokeResetSwitch") | |||
call jsonfile%get('Equipments.ChokeControl.ChokeSelectorSwitch',data%Equipments%ChokeControlPanel%ChokeSelectorSwitch,found) | |||
if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokeSelectorSwitch") | |||
call jsonfile%get('Equipments.ChokeControl.ChokeRateControlKnob',data%Equipments%ChokeControlPanel%ChokeRateControlKnob,found) | |||
if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokeRateControlKnob") | |||
call jsonfile%get('Equipments.ChokeControl.ChokeControlLever',data%Equipments%ChokeControlPanel%ChokeControlLever,found) | |||
if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokeControlLever") | |||
call jsonfile%get('Equipments.ChokeControl.ChokePanelRigAirSwitch',data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch,found) | |||
if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokePanelRigAirSwitch") | |||
print *,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch | |||
end subroutine | |||
subroutine ChokeControlPanelToJson(parent) | |||
@@ -16,7 +16,6 @@ module CDataDisplayConsole | |||
call json%get(p,'ResetWob',pval) | |||
call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob) | |||
call json%get(p,'TotalStrokeCounterResetSwitch',pval) | |||
call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch) | |||
@@ -291,7 +290,7 @@ module CDataDisplayConsole | |||
data%Equipments%DataDisplayConsole%MP1SPM = v | |||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | |||
#ifdef deb | |||
print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
if(print_log) print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
#endif | |||
end subroutine | |||
@@ -302,7 +301,7 @@ module CDataDisplayConsole | |||
data%Equipments%DataDisplayConsole%MP2SPM = v | |||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | |||
#ifdef deb | |||
print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||
if(print_log) print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||
#endif | |||
end subroutine | |||
end module CDataDisplayConsole |
@@ -292,7 +292,7 @@ module CDataDisplayConsole | |||
data%Equipments%DataDisplayConsole%MP1SPM = v | |||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | |||
#ifdef deb | |||
print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
if(print_log) print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
#endif | |||
end subroutine | |||
@@ -303,7 +303,7 @@ module CDataDisplayConsole | |||
data%Equipments%DataDisplayConsole%MP2SPM = v | |||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | |||
#ifdef deb | |||
print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||
if(print_log) print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||
#endif | |||
end subroutine | |||
end module CDataDisplayConsole |
@@ -1,7 +1,6 @@ | |||
module CDrillingConsole | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
! use CSimulationVariables | |||
use CLog4 | |||
use CLog3 | |||
@@ -63,8 +62,8 @@ module CDrillingConsole | |||
if ( .not. found ) call logg(4,"Not found: DWTransmisionLever") | |||
call jsonfile%get('Equipments.Drilling.DWPowerLever',data%Equipments%DrillingConsole%DWPowerLever,found) | |||
if ( .not. found ) call logg(4,"Not found: DWPowerLever") | |||
call jsonfile%get('Equipments.Drilling.TongLever',data%Equipments%DrillingConsole%TongLever,found) | |||
if ( .not. found ) call logg(4,"Not found: TongLever") | |||
! call jsonfile%get('Equipments.Drilling.TongLever',data%Equipments%DrillingConsole%TongLever,found) | |||
! if ( .not. found ) call logg(4,"Not found: TongLever") | |||
call jsonfile%get('Equipments.Drilling.RTTransmissionLever',data%Equipments%DrillingConsole%RTTransmissionLever,found) | |||
if ( .not. found ) call logg(4,"Not found: RTTransmissionLever") | |||
call jsonfile%get('Equipments.Drilling.DWClutchLever',data%Equipments%DrillingConsole%DWClutchLever,found) | |||
@@ -183,8 +182,21 @@ module CDrillingConsole | |||
call json%add(p,"MP2Throttle",data%Equipments%DrillingConsole%MP2Throttle) | |||
call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle) | |||
call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle) | |||
call json%add(parent,p) | |||
end subroutine | |||
subroutine SetTongLever(v) bind(C,name="setTongLever") | |||
use CTongEnum | |||
use ISO_C_BINDING, only:c_int | |||
integer(c_int), intent(in) :: v | |||
if(v == 1) then | |||
call ButtonPress_Breakout_TongNotification() | |||
if(print_log) print*, 'BreakoutLeverPress' | |||
endif | |||
if(v == -1) then | |||
call ButtonPress_Makeup_TongNotification() | |||
if(print_log) print*, 'MakeupLeverPress' | |||
endif | |||
if(print_log) print*, 'TongLever=', v | |||
end subroutine | |||
end module CDrillingConsole |
@@ -29,7 +29,7 @@ module CDrillingConsoleVariables | |||
real(8) :: DWAcceleretor | |||
real(8) :: DWTransmisionLever | |||
real(8) :: DWPowerLever | |||
real(8) :: TongLever | |||
! real(8) :: TongLever | |||
real(8) :: RTTransmissionLever | |||
real(8) :: DWClutchLever | |||
real(8) :: EddyBreakLever | |||
@@ -107,7 +107,7 @@ end subroutine PathFinding_Step | |||
#ifdef Log5 | |||
CALL DATE_AND_TIME(values=EndTime) | |||
Duration= EndTime(8) - StartTime(8) | |||
!print*, 'Duration= ', Duration, 'ms' | |||
!if(print_log) print*, 'Duration= ', Duration, 'ms' | |||
call Log_5('Duration= ', Duration) | |||
call DisplayOpenPaths() | |||
@@ -703,7 +703,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(103)%AdjacentTo(127) | |||
#ifdef deb | |||
print*, 'KellyConnected()' | |||
if(print_log) print*, 'KellyConnected()' | |||
!call Log_3( 'KellyConnected()') | |||
#endif | |||
Manifold%IsPathsDirty = .true. | |||
@@ -719,7 +719,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(127)%AdjacentTo(78) | |||
#ifdef deb | |||
print*, 'KellyDisconnected()' | |||
if(print_log) print*, 'KellyDisconnected()' | |||
!call Log_3( 'KellyDisconnected()') | |||
#endif | |||
@@ -764,7 +764,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(127)%AdjacentTo(56) | |||
#ifdef deb | |||
print*, 'InstallSafetyValve_KellyMode()' | |||
if(print_log) print*, 'InstallSafetyValve_KellyMode()' | |||
#endif | |||
data%Equipments%DrillingConsole%IRSafetyValveLed = 1 | |||
@@ -790,7 +790,7 @@ end subroutine PathFinding_Step | |||
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveSafetyValve_KellyMode()' | |||
if(print_log) print*, 'RemoveSafetyValve_KellyMode()' | |||
#endif | |||
end subroutine | |||
@@ -804,7 +804,7 @@ end subroutine PathFinding_Step | |||
call ChangeValve(56, Manifold%SafetyValve) | |||
#ifdef deb | |||
print*, 'OpenSafetyValve_KellyMode()' | |||
if(print_log) print*, 'OpenSafetyValve_KellyMode()' | |||
#endif | |||
end subroutine | |||
@@ -818,7 +818,7 @@ end subroutine PathFinding_Step | |||
call ChangeValve(56, Manifold%SafetyValve) | |||
#ifdef deb | |||
print*, 'CloseSafetyValve_KellyMode()' | |||
if(print_log) print*, 'CloseSafetyValve_KellyMode()' | |||
#endif | |||
end subroutine | |||
@@ -859,7 +859,7 @@ end subroutine PathFinding_Step | |||
call OpenSafetyValve_TripMode() | |||
#ifdef deb | |||
print*, 'InstallSafetyValve_TripMode()' | |||
if(print_log) print*, 'InstallSafetyValve_TripMode()' | |||
#endif | |||
end subroutine | |||
@@ -883,7 +883,7 @@ end subroutine PathFinding_Step | |||
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveSafetyValve_TripMode()' | |||
if(print_log) print*, 'RemoveSafetyValve_TripMode()' | |||
#endif | |||
end subroutine | |||
@@ -897,7 +897,7 @@ end subroutine PathFinding_Step | |||
call ChangeValve(54, Manifold%SafetyValve) | |||
#ifdef deb | |||
print*, 'OpenSafetyValve_TripMode()' | |||
if(print_log) print*, 'OpenSafetyValve_TripMode()' | |||
#endif | |||
end subroutine | |||
@@ -911,7 +911,7 @@ end subroutine PathFinding_Step | |||
call ChangeValve(54, Manifold%SafetyValve) | |||
#ifdef deb | |||
print*, 'CloseSafetyValve_TripMode()' | |||
if(print_log) print*, 'CloseSafetyValve_TripMode()' | |||
#endif | |||
end subroutine | |||
@@ -946,7 +946,7 @@ end subroutine PathFinding_Step | |||
call OpenSafetyValve_TopDrive() | |||
#ifdef deb | |||
print*, 'InstallSafetyValve_TopDrive()' | |||
if(print_log) print*, 'InstallSafetyValve_TopDrive()' | |||
#endif | |||
end subroutine | |||
@@ -970,7 +970,7 @@ end subroutine PathFinding_Step | |||
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveSafetyValve_TopDrive()' | |||
if(print_log) print*, 'RemoveSafetyValve_TopDrive()' | |||
#endif | |||
end subroutine | |||
@@ -983,7 +983,7 @@ end subroutine PathFinding_Step | |||
Manifold%SafetyValve = .true. | |||
#ifdef deb | |||
print*, 'OpenSafetyValve_TopDrive()' | |||
if(print_log) print*, 'OpenSafetyValve_TopDrive()' | |||
#endif | |||
call ChangeValve(54, Manifold%SafetyValve) | |||
@@ -997,7 +997,7 @@ end subroutine PathFinding_Step | |||
Manifold%SafetyValve = .false. | |||
#ifdef deb | |||
print*, 'CloseSafetyValve_TopDrive()' | |||
if(print_log) print*, 'CloseSafetyValve_TopDrive()' | |||
#endif | |||
call ChangeValve(54, Manifold%SafetyValve) | |||
@@ -1025,7 +1025,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(124)%AdjacentTo(55) | |||
#ifdef deb | |||
print*, 'InstallIBop()' | |||
if(print_log) print*, 'InstallIBop()' | |||
#endif | |||
data%Equipments%DrillingConsole%IRIBopLed = 1 | |||
@@ -1046,7 +1046,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(124)%AdjacentTo(103) | |||
#ifdef deb | |||
print*, 'RemoveIBop()' | |||
if(print_log) print*, 'RemoveIBop()' | |||
#endif | |||
data%Equipments%DrillingConsole%IRIBopLed = 0 | |||
@@ -1060,7 +1060,7 @@ end subroutine PathFinding_Step | |||
Manifold%IBop = .true. | |||
#ifdef deb | |||
print*, 'OpenIBop()' | |||
if(print_log) print*, 'OpenIBop()' | |||
#endif | |||
call ChangeValve(55, Manifold%IBop) | |||
@@ -1072,7 +1072,7 @@ end subroutine PathFinding_Step | |||
Manifold%IBop = .false. | |||
#ifdef deb | |||
print*, 'CloseIBop()' | |||
if(print_log) print*, 'CloseIBop()' | |||
#endif | |||
call ChangeValve(55, Manifold%IBop) | |||
@@ -1098,7 +1098,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(126)%AdjacentTo(68) | |||
#ifdef deb | |||
print*, 'InstallKellyCock()' | |||
if(print_log) print*, 'InstallKellyCock()' | |||
#endif | |||
call OpenKellyCock() | |||
@@ -1123,7 +1123,7 @@ end subroutine PathFinding_Step | |||
data%Equipments%DrillingConsole%OpenKellyCockLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveKellyCock()' | |||
if(print_log) print*, 'RemoveKellyCock()' | |||
#endif | |||
end subroutine | |||
@@ -1136,7 +1136,7 @@ end subroutine PathFinding_Step | |||
Manifold%KellyCock = .true. | |||
#ifdef deb | |||
print*, 'OpenKellyCock()' | |||
if(print_log) print*, 'OpenKellyCock()' | |||
#endif | |||
call ChangeValve(68, Manifold%KellyCock) | |||
@@ -1150,7 +1150,7 @@ end subroutine PathFinding_Step | |||
Manifold%KellyCock = .false. | |||
#ifdef deb | |||
print*, 'CloseKellyCock()' | |||
if(print_log) print*, 'CloseKellyCock()' | |||
#endif | |||
call ChangeValve(68, Manifold%KellyCock) | |||
@@ -1178,7 +1178,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(70)%AdjacentTo(128) | |||
#ifdef deb | |||
print*, 'InstallTopDriveIBop()' | |||
if(print_log) print*, 'InstallTopDriveIBop()' | |||
#endif | |||
call OpenTopDriveIBop() | |||
end subroutine | |||
@@ -1197,7 +1197,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(128)%AdjacentTo(126) | |||
#ifdef deb | |||
print*, 'RemoveTopDriveIBop()' | |||
if(print_log) print*, 'RemoveTopDriveIBop()' | |||
#endif | |||
Manifold%TopDriveIBop = .false. | |||
call ChangeValve(70, Manifold%TopDriveIBop) | |||
@@ -1209,7 +1209,7 @@ end subroutine PathFinding_Step | |||
Manifold%TopDriveIBop = .true. | |||
call ChangeValve(70, Manifold%TopDriveIBop) | |||
#ifdef deb | |||
print*, 'OpenTopDriveIBop()' | |||
if(print_log) print*, 'OpenTopDriveIBop()' | |||
#endif | |||
end subroutine | |||
@@ -1219,7 +1219,7 @@ end subroutine PathFinding_Step | |||
Manifold%TopDriveIBop = .false. | |||
call ChangeValve(70, Manifold%TopDriveIBop) | |||
#ifdef deb | |||
print*, 'CloseTopDriveIBop()' | |||
if(print_log) print*, 'CloseTopDriveIBop()' | |||
#endif | |||
end subroutine | |||
@@ -1244,7 +1244,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(69)%AdjacentTo(48) | |||
call Manifold%Valve(79)%AdjacentTo(48) | |||
#ifdef deb | |||
print*, 'InstallFloatValve()' | |||
if(print_log) print*, 'InstallFloatValve()' | |||
#endif | |||
call OpenFloatValve() | |||
end subroutine | |||
@@ -1262,7 +1262,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(69)%AdjacentTo(79) | |||
call Manifold%Valve(79)%AdjacentTo(69) | |||
#ifdef deb | |||
print*, 'RemoveFloatValve()' | |||
if(print_log) print*, 'RemoveFloatValve()' | |||
#endif | |||
Manifold%FloatValve = .false. | |||
call ChangeValve(48, Manifold%FloatValve) | |||
@@ -1273,7 +1273,7 @@ end subroutine PathFinding_Step | |||
if(.not.Manifold%IsFloatValveInstalled) return | |||
Manifold%FloatValve = .true. | |||
#ifdef deb | |||
print*, 'OpenFloatValve()' | |||
if(print_log) print*, 'OpenFloatValve()' | |||
#endif | |||
call ChangeValve(48, Manifold%FloatValve) | |||
end subroutine | |||
@@ -1283,7 +1283,7 @@ end subroutine PathFinding_Step | |||
if(.not.Manifold%IsFloatValveInstalled) return | |||
Manifold%FloatValve = .false. | |||
#ifdef deb | |||
print*, 'CloseFloatValve()' | |||
if(print_log) print*, 'CloseFloatValve()' | |||
#endif | |||
call ChangeValve(48, Manifold%FloatValve) | |||
end subroutine | |||
@@ -1360,7 +1360,7 @@ end subroutine PathFinding_Step | |||
endif | |||
endif | |||
#ifdef deb | |||
print*, 'Valve(', i, ') = ', state | |||
if(print_log) print*, 'Valve(', i, ') = ', state | |||
#endif | |||
!call Traverse() | |||
Manifold%IsPathsDirty = .true. | |||
@@ -92,7 +92,7 @@ | |||
data%Equipments%Tank%ManualPumpPower = v | |||
call ChangeValve(43, v) | |||
#ifdef deb | |||
print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||
if(print_log) print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||
#endif | |||
end subroutine | |||
@@ -93,7 +93,7 @@ | |||
data%Equipments%Tank%ManualPumpPower = v | |||
call ChangeValve(43, v) | |||
#ifdef deb | |||
print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||
if(print_log) print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||
#endif | |||
end subroutine | |||
@@ -1,12 +1,11 @@ | |||
module COperationScenariosMain | |||
use CIActionReference | |||
use UnitySignalsModule | |||
implicit none | |||
public | |||
! procedure (ActionVoid), pointer :: UpdateUnityPtr | |||
contains | |||
subroutine OperationScenarios_Step | |||
! use CSimulationVariables | |||
use OperationScenariosModule | |||
use CElevatorConnectionEnum | |||
use CCloseKellyCockLedNotification | |||
@@ -28,42 +27,23 @@ module COperationScenariosMain | |||
use CRemoveFillupHeadPermission | |||
use CRemoveMudBucketPermission | |||
use SoftwareInputsVariables | |||
! use CHookHeight | |||
! use CIbopHeight | |||
! use CNearFloorConnection | |||
! use CSafetyValveHeight | |||
! use CSlackOff | |||
! use CStandRack | |||
! use CStringPressure | |||
! use CZeroStringSpeed | |||
! use CUnityInputs, only: & | |||
! Get_ElevatorConnectionPossible, & | |||
! Get_JointConnectionPossible, & | |||
! Get_ElevatorPickup, & | |||
! Get_NearFloorPosition, & | |||
! Get_SingleSetInMouseHole | |||
! use CBucketEnum | |||
! use UnitySignalsModule | |||
use UnityModule | |||
use CElevatorEnum | |||
! use CHeadEnum | |||
use CIbopEnum | |||
use CKellyEnum | |||
use CMouseHoleEnum | |||
! use CElevatorEnum | |||
! use CIbopEnum | |||
! use CKellyEnum | |||
! use CMouseHoleEnum | |||
use UnitySignalsModule | |||
use CSafetyValveEnum | |||
use CSlipsEnum | |||
use CSwingEnum | |||
! use CSafetyValveEnum | |||
! use CSlipsEnum | |||
! use CSwingEnum | |||
use CTongEnum | |||
! use CStringUpdate | |||
use CFlowPipeDisconnectEnum | |||
! use CFlowPipeDisconnectEnum | |||
use CFlowKellyDisconnectEnum | |||
use CFillupHeadPermission | |||
use CSwingDrillPermission | |||
use CSwingOffPermission | |||
use CSwingTiltPermission | |||
! use CTdsStemJointHeight | |||
! use UnitySignalsModule !for CTdsConnectionModesEnum | |||
use CTdsElevatorModesEnum | |||
use CTdsSpineEnum | |||
use CTdsSwingEnum | |||
@@ -72,7 +52,8 @@ module COperationScenariosMain | |||
use CTdsIbopLedNotification | |||
use CTdsPowerLedNotification | |||
use CTdsTorqueWrenchLedNotification | |||
use CElevatorConnectionEnum | |||
implicit none | |||
call Evaluate_KellyConnection() | |||
@@ -99,22 +80,21 @@ module COperationScenariosMain | |||
call Evaluate_RemoveMudBucketPermission() | |||
call Evaluate_MudBucket() | |||
call Evaluate_Elevator() | |||
! call Evaluate_Elevator() | |||
call Evaluate_FillupHead() | |||
call Evaluate_Ibop() | |||
call Evaluate_Kelly() | |||
call Evaluate_MouseHole() | |||
call Evaluate_MouseHole() | |||
call Evaluate_OperationCondition() | |||
call Evaluate_SafetyValve() | |||
call Evaluate_Slips() | |||
call Evaluate_Swing() | |||
call Evaluate_Tong() | |||
! call Evaluate_Ibop() is empty, so i commented (mahmood) | |||
! call Evaluate_Kelly() is empty, so i commented (mahmood) | |||
! call Evaluate_MouseHole() | |||
! call Evaluate_OperationCondition() | |||
! call Evaluate_SafetyValve() | |||
! call Evaluate_Slips() | |||
! call Evaluate_Swing() | |||
! call Evaluate_Tong() | |||
! call Evaluate_StringUpdate() | |||
call Evaluate_FlowKellyDisconnect() | |||
call Evaluate_FlowPipeDisconnect() | |||
! call Evaluate_FlowKellyDisconnect() is empty, so i commented (mahmood) | |||
! call Evaluate_FlowPipeDisconnect() is empty, so i commented (mahmood) | |||
!if(Get_FillMouseHoleLed()) then | |||
! call Set_MouseHole(MOUSE_HOLE_FILL) | |||
@@ -159,13 +139,13 @@ module COperationScenariosMain | |||
! if(associated(UpdateUnityPtr)) call UpdateUnityPtr() | |||
! end subroutine | |||
subroutine Kelly_ConnectionNothing | |||
subroutine Kelly_ConnectionNothing() bind (C,name="Kelly_ConnectionNothine") | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use SimulationVariables | |||
implicit none | |||
! call logg(4,"Kelly_ConnectionNothing started") | |||
print *,"Kelly_ConnectionNothing started" | |||
call Set_HookHeight(75.0) | |||
call sleep(1) | |||
@@ -206,12 +186,13 @@ module COperationScenariosMain | |||
! move to final hook height | |||
call Update_HookHeight_From_Snapshot() | |||
call sleep(3) | |||
! call logg(4,"Kelly_ConnectionNothing end") | |||
print *,"Kelly_ConnectionNothing end" | |||
end subroutine Kelly_ConnectionNothing | |||
subroutine Kelly_ConnectionString | |||
subroutine Kelly_ConnectionString() BIND(C,name='Kelly_ConnectionString') | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use SimulationVariables | |||
implicit none | |||
@@ -268,12 +249,8 @@ module COperationScenariosMain | |||
end subroutine Kelly_ConnectionString | |||
subroutine Kelly_ConnectionSingle | |||
! use CSwingEnumVariables | |||
! use CSlipsEnumVariables | |||
! use CTongEnumVariables | |||
subroutine Kelly_ConnectionSingle() BIND(C,name='Kelly_ConnectionSingle') | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use SimulationVariables | |||
implicit none | |||
@@ -343,9 +320,8 @@ module COperationScenariosMain | |||
end subroutine Kelly_ConnectionSingle | |||
subroutine Elevator_ConnectionNothing | |||
subroutine Elevator_ConnectionNothing() BIND(C,name='Elevator_ConnectionNothing') | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use SimulationVariables | |||
implicit none | |||
@@ -155,7 +155,7 @@ module COperationScenariosSettings | |||
subroutine SetDefaultValues() | |||
use OperationScenariosModule | |||
use CHoistingVariables | |||
use SimulationVariables!, only: data%Configuration%Hoisting%DriveType, TopDrive_DriveType | |||
use SimulationVariables | |||
use CManifolds, only: RemoveSafetyValve_TripMode, RemoveSafetyValve_KellyMode | |||
implicit none | |||
@@ -26,11 +26,13 @@ module COperationScenariosVariables | |||
enumerator STRING_UPDATE_ADD_STAND | |||
enumerator STRING_UPDATE_REMOVE_SINGLE | |||
enumerator STRING_UPDATE_REMOVE_STAND | |||
end enum | |||
enum, bind(c) | |||
enumerator KELLY_CONNECTION_NOTHING | |||
enumerator KELLY_CONNECTION_STRING | |||
enumerator KELLY_CONNECTION_SINGLE | |||
end enum | |||
enum, bind(c) | |||
enumerator ELEVATOR_CONNECTION_NOTHING | |||
enumerator ELEVATOR_CONNECTION_STRING | |||
enumerator ELEVATOR_CONNECTION_STAND | |||
@@ -2,18 +2,12 @@ module OperationScenariosModule | |||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
!! Paseted From ....Variables.f90 | |||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
! use OperationScenariosModule ! | |||
! use OperationScenariosModule !!CElevator... | |||
! use COperationScenariosVariables | |||
use SimulationVariables | |||
use PermissionsModule | |||
! use SoftwareInputsVariables | |||
! use CUnityInputs | |||
use UnityModule | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
use PermissionsModule | |||
! use CTdsElevatorModesEnumVariables ! | |||
use CHoistingVariables | |||
use CTopDrivePanelVariables | |||
use NotificationModule | |||
@@ -57,7 +51,7 @@ module OperationScenariosModule | |||
endif | |||
#ifdef deb | |||
print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||
if(print_log) print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||
#endif | |||
!**call data%State%OperationScenario%OnKellyConnectionChange%RunAll() | |||
end subroutine | |||
@@ -71,12 +65,12 @@ module OperationScenariosModule | |||
implicit none | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_KellyConnection=TopDrive' | |||
if(print_log) print*, 'Evaluate_KellyConnection=TopDrive' | |||
#endif | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_KellyConnection=Kelly' | |||
if(print_log) print*, 'Evaluate_KellyConnection=Kelly' | |||
#endif | |||
!OPERATION-CODE=1 | |||
@@ -183,14 +177,14 @@ module OperationScenariosModule | |||
subroutine ButtonPress_Breakout() | |||
implicit none | |||
#ifdef deb | |||
print*, 'ButtonPress_Breakout on ======> CKellyConnectionEnum' | |||
if(print_log) print*, 'ButtonPress_Breakout on ======> CKellyConnectionEnum' | |||
#endif | |||
end subroutine | |||
subroutine ButtonPress_Makeup() | |||
implicit none | |||
#ifdef deb | |||
print*, 'ButtonPress_Makeup on ======> CKellyConnectionEnum' | |||
if(print_log) print*, 'ButtonPress_Makeup on ======> CKellyConnectionEnum' | |||
#endif | |||
end subroutine | |||
@@ -236,7 +230,7 @@ module OperationScenariosModule | |||
data%State%OperationScenario%ElevatorConnection = v | |||
#ifdef deb | |||
print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||
if(print_log) print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||
#endif | |||
!**call data%State%OperationScenario%OnElevatorConnectionChange%RunAll() | |||
end subroutine | |||
@@ -246,4 +240,73 @@ module OperationScenariosModule | |||
Get_ElevatorConnection = data%State%OperationScenario%ElevatorConnection | |||
end function | |||
!//SLIPS: everythings start here | |||
subroutine ButtonPress_Slips() bind(C,name="ButtonPress_Slips") | |||
! use NotificationModule | |||
use CUnityOutputs | |||
! use UnitySignalsModule | |||
implicit none | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
if(print_log) print*, 'ButtonPress_Slips=TopDrive' | |||
!TOPDRIVE-CODE=30 | |||
if (Get_Slips() == SLIPS_UNSET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_SET_BEGIN) | |||
return | |||
end if | |||
!TOPDRIVE-CODE=31 | |||
if (Get_TdsConnectionModes() == TDS_CONNECTION_STRING .and.& | |||
Get_Slips() == SLIPS_SET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
!TOPDRIVE-CODE=32 | |||
if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING .and.& | |||
Get_Slips() == SLIPS_SET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
if(print_log) print*, 'ButtonPress_Slips=Kelly' | |||
!OPERATION-CODE=19 | |||
if (Get_Slips() == SLIPS_UNSET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_SET_BEGIN) | |||
return | |||
end if | |||
!OPERATION-CODE=20 | |||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
Get_KellyConnection() == KELLY_CONNECTION_STRING .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_SlipsNotification() .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
!OPERATION-CODE=21 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_SlipsNotification() .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
endif | |||
end subroutine | |||
end module OperationScenariosModule |
@@ -58,7 +58,7 @@ module OperationScenariosModule | |||
endif | |||
#ifdef deb | |||
print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||
if(print_log) print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||
#endif | |||
!**call data%State%OperationScenario%OnKellyConnectionChange%RunAll() | |||
end subroutine | |||
@@ -72,12 +72,12 @@ module OperationScenariosModule | |||
implicit none | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_KellyConnection=TopDrive' | |||
if(print_log) print*, 'Evaluate_KellyConnection=TopDrive' | |||
#endif | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_KellyConnection=Kelly' | |||
if(print_log) print*, 'Evaluate_KellyConnection=Kelly' | |||
#endif | |||
!OPERATION-CODE=1 | |||
@@ -235,7 +235,7 @@ module OperationScenariosModule | |||
data%State%OperationScenario%ElevatorConnection = v | |||
#ifdef deb | |||
print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||
if(print_log) print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||
#endif | |||
!**call data%State%OperationScenario%OnElevatorConnectionChange%RunAll() | |||
end subroutine | |||
@@ -14,7 +14,7 @@ module CElevatorConnectionEnum | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_ElevatorConnection=TopDrive' | |||
if(print_log) print*, 'Evaluate_ElevatorConnection=TopDrive' | |||
#endif | |||
endif | |||
@@ -28,7 +28,7 @@ module CElevatorConnectionEnum | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ElevatorConnection=Kelly' | |||
if(print_log) print*, 'ElevatorConnection=Kelly' | |||
#endif | |||
!!OPERATION-CODE=83 | |||
@@ -344,7 +344,7 @@ module CElevatorConnectionEnum | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Latch_ElevatorConnection=TopDrive' | |||
if(print_log) print*, 'ButtonPress_Latch_ElevatorConnection=TopDrive' | |||
#endif | |||
@@ -416,7 +416,7 @@ module CElevatorConnectionEnum | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Latch_ElevatorConnection=Kelly' | |||
if(print_log) print*, 'ButtonPress_Latch_ElevatorConnection=Kelly' | |||
#endif | |||
!OPERATION-CODE=86 | |||
@@ -487,7 +487,7 @@ module CElevatorConnectionEnum | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Unlatch_ElevatorConnection=TopDrive' | |||
if(print_log) print*, 'ButtonPress_Unlatch_ElevatorConnection=TopDrive' | |||
#endif | |||
@@ -555,7 +555,7 @@ module CElevatorConnectionEnum | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Unlatch_ElevatorConnection=Kelly' | |||
if(print_log) print*, 'ButtonPress_Unlatch_ElevatorConnection=Kelly' | |||
#endif | |||
!OPERATION-CODE=89 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
@@ -10,7 +10,7 @@ module CTdsElevatorModesEnum | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsElevatorModes=TopDrive' | |||
if(print_log) print*, 'Evaluate_TdsElevatorModes=TopDrive' | |||
#endif | |||
@@ -314,7 +314,7 @@ module CTdsElevatorModesEnum | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsElevatorModes=Kelly' | |||
if(print_log) print*, 'Evaluate_TdsElevatorModes=Kelly' | |||
#endif | |||
endif | |||
@@ -9,7 +9,7 @@ module CCloseKellyCockLedNotification | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -24,7 +24,7 @@ module CCloseKellyCockLedNotification | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||
!#endif | |||
! endif | |||
@@ -45,13 +45,13 @@ module CCloseKellyCockLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||
#endif | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||
if(print_log) print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||
#endif | |||
!OPERATION-CODE=66 | |||
@@ -10,7 +10,7 @@ module CCloseKellyCockLedNotification | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -25,7 +25,7 @@ module CCloseKellyCockLedNotification | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||
!#endif | |||
! endif | |||
@@ -9,7 +9,7 @@ module CCloseSafetyValveLedNotification | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||
! if(print_log) print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -23,7 +23,7 @@ module CCloseSafetyValveLedNotification | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||
!#endif | |||
! endif | |||
@@ -47,7 +47,7 @@ module CCloseSafetyValveLedNotification | |||
#endif | |||
data%State%notifications%operation_CloseSafetyValveLed = v | |||
#ifdef deb | |||
print*, 'operation_CloseSafetyValveLed=', data%State%notifications%operation_CloseSafetyValveLed | |||
if(print_log) print*, 'operation_CloseSafetyValveLed=', data%State%notifications%operation_CloseSafetyValveLed | |||
#endif | |||
end subroutine | |||
@@ -59,7 +59,7 @@ module CCloseSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||
#endif | |||
@@ -86,7 +86,7 @@ module CCloseSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||
if(print_log) print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||
#endif | |||
!OPERATION-CODE=59 | |||
@@ -12,7 +12,7 @@ module CIrIBopLedNotification | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_IrIBopLed=TopDrive' | |||
! if(print_log) print*, 'Evaluate_IrIBopLed=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -25,7 +25,7 @@ module CIrIBopLedNotification | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_IrIBopLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_IrIBopLed=Kelly' | |||
!#endif | |||
! endif | |||
@@ -51,7 +51,7 @@ module CIrIBopLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIBopLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_IrIBopLed=TopDrive' | |||
#endif | |||
@@ -89,7 +89,7 @@ module CIrIBopLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIBopLed=Kelly' | |||
if(print_log) print*, 'Evaluate_IrIBopLed=Kelly' | |||
#endif | |||
!OPERATION-CODE=63 | |||
@@ -13,7 +13,7 @@ module CIrIBopLedNotification | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_IrIBopLed=TopDrive' | |||
! if(print_log) print*, 'Evaluate_IrIBopLed=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -26,7 +26,7 @@ module CIrIBopLedNotification | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_IrIBopLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_IrIBopLed=Kelly' | |||
!#endif | |||
! endif | |||
@@ -13,7 +13,7 @@ module CIrSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||
#endif | |||
@@ -33,7 +33,7 @@ module CIrSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||
#endif | |||
!OPERATION-CODE=56 | |||
@@ -79,7 +79,7 @@ module CIrSafetyValveLedNotification | |||
#endif | |||
data%State%notifications%operation_IrSafetyValveLed = v | |||
#ifdef deb | |||
print*, 'operation_IrSafetyValveLed=', data%State%notifications%operation_IrSafetyValveLed | |||
if(print_log) print*, 'operation_IrSafetyValveLed=', data%State%notifications%operation_IrSafetyValveLed | |||
#endif | |||
end subroutine | |||
@@ -91,7 +91,7 @@ module CIrSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||
#endif | |||
@@ -130,7 +130,7 @@ module CIrSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||
#endif | |||
!OPERATION-CODE=54 | |||
@@ -13,7 +13,7 @@ module CLatchLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_LatchLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_LatchLed=TopDrive' | |||
#endif | |||
@@ -108,7 +108,7 @@ module CLatchLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_LatchLed=Kelly' | |||
if(print_log) print*, 'Evaluate_LatchLed=Kelly' | |||
#endif | |||
!OPERATION-CODE=36 | |||
@@ -9,12 +9,12 @@ module COpenKellyCockLedNotification | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_OpenKellyCockLed=TopDrive' | |||
! if(print_log) print*, 'Evaluate_OpenKellyCockLed=TopDrive' | |||
!#endif | |||
! endif | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_OpenKellyCockLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_OpenKellyCockLed=Kelly' | |||
!#endif | |||
! endif | |||
@@ -36,7 +36,7 @@ module COpenKellyCockLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenKellyCock=TopDrive' | |||
if(print_log) print*, 'ButtonPress_OpenKellyCock=TopDrive' | |||
#endif | |||
endif | |||
@@ -45,7 +45,7 @@ module COpenKellyCockLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenKellyCock=Kelly' | |||
if(print_log) print*, 'ButtonPress_OpenKellyCock=Kelly' | |||
#endif | |||
!OPERATION-CODE=65 | |||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
@@ -10,7 +10,7 @@ module COpenSafetyValveLedNotification | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_OpenSafetyValveLed=TopDrive' | |||
! if(print_log) print*, 'Evaluate_OpenSafetyValveLed=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -23,7 +23,7 @@ module COpenSafetyValveLedNotification | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_OpenSafetyValveLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_OpenSafetyValveLed=Kelly' | |||
!#endif | |||
! endif | |||
@@ -49,7 +49,7 @@ module COpenSafetyValveLedNotification | |||
#endif | |||
data%State%notifications%operation_OpenSafetyValveLed = v | |||
#ifdef deb | |||
print*, 'data%State%notifications%operation_OpenSafetyValveLed=', data%State%notifications%operation_OpenSafetyValveLed | |||
if(print_log) print*, 'data%State%notifications%operation_OpenSafetyValveLed=', data%State%notifications%operation_OpenSafetyValveLed | |||
#endif | |||
end subroutine | |||
@@ -60,7 +60,7 @@ module COpenSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenSafetyValve=TopDrive' | |||
if(print_log) print*, 'ButtonPress_OpenSafetyValve=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=56 | |||
@@ -84,7 +84,7 @@ module COpenSafetyValveLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenSafetyValve=Kelly' | |||
if(print_log) print*, 'ButtonPress_OpenSafetyValve=Kelly' | |||
#endif | |||
@@ -11,7 +11,7 @@ module CSlipsNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SlipsNotification=TopDrive' | |||
if(print_log) print*, 'Evaluate_SlipsNotification=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=28 | |||
@@ -54,7 +54,7 @@ module CSlipsNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SlipsNotification=Kelly' | |||
if(print_log) print*, 'Evaluate_SlipsNotification=Kelly' | |||
#endif | |||
!OPERATION-CODE=53 | |||
@@ -13,7 +13,7 @@ module CSwingLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_SwingLed=TopDrive' | |||
#endif | |||
@@ -30,7 +30,7 @@ module CSwingLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingLed=Kelly' | |||
if(print_log) print*, 'Evaluate_SwingLed=Kelly' | |||
#endif | |||
@@ -10,7 +10,7 @@ module CTdsIbopLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IbopLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_IbopLed=TopDrive' | |||
#endif | |||
@@ -54,7 +54,7 @@ module CTdsIbopLedNotification | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_IbopLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_IbopLed=Kelly' | |||
!#endif | |||
! | |||
! endif | |||
@@ -54,7 +54,7 @@ module CTdsIbopLedNotification | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_IbopLed=Kelly' | |||
! if(print_log) print*, 'Evaluate_IbopLed=Kelly' | |||
!#endif | |||
! | |||
! endif | |||
@@ -11,7 +11,7 @@ module CTdsPowerLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_PowerLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_PowerLed=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=63 | |||
@@ -31,7 +31,7 @@ module CTdsPowerLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_PowerLed=Kelly' | |||
if(print_log) print*, 'Evaluate_PowerLed=Kelly' | |||
#endif | |||
endif | |||
@@ -8,7 +8,7 @@ module CTdsTorqueWrenchLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TorqueWrenchLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_TorqueWrenchLed=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=81 | |||
@@ -41,7 +41,7 @@ module CTdsTorqueWrenchLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingLed=Kelly' | |||
if(print_log) print*, 'Evaluate_SwingLed=Kelly' | |||
#endif | |||
@@ -11,13 +11,8 @@ module CTongNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TongNotification=TopDrive' | |||
#endif | |||
if(print_log) print*, 'Evaluate_TongNotification=TopDrive' | |||
!TOPDRIVE-CODE=50 | |||
if (((Get_HookHeight() >= (TL() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + NFC() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + data%State%OperationScenario%TG)) .or.& | |||
(Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + data%State%OperationScenario%TG))).and.& | |||
@@ -34,47 +29,29 @@ module CTongNotification | |||
return | |||
end if | |||
!TOPDRIVE-CODE=51 | |||
if (GetRotaryRpm() == 0.0d0 .and.& | |||
Get_JointConnectionPossible() .and.& | |||
(Get_Tong() /= TONG_BREAKOUT_BEGIN .and.& | |||
Get_Tong() /= TONG_MAKEUP_BEGIN) .and.& | |||
(Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_SINGLE .or. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE) .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
Get_JointConnectionPossible() .and.& | |||
(Get_Tong() /= TONG_BREAKOUT_BEGIN .and.& | |||
Get_Tong() /= TONG_MAKEUP_BEGIN) .and.& | |||
(Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_SINGLE .or. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE) .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
call Set_TongNotification(.true.) | |||
return | |||
end if | |||
!TOPDRIVE-CODE=52 | |||
if (GetRotaryRpm() == 0.0d0 .and.& | |||
Get_JointConnectionPossible() .and.& | |||
(Get_Tong() /= TONG_BREAKOUT_BEGIN .and.& | |||
Get_Tong() /= TONG_MAKEUP_BEGIN) .and.& | |||
(Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_STAND .or. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STAND) .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
Get_JointConnectionPossible() .and.& | |||
(Get_Tong() /= TONG_BREAKOUT_BEGIN .and.& | |||
Get_Tong() /= TONG_MAKEUP_BEGIN) .and.& | |||
(Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_STAND .or. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STAND) .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
call Set_TongNotification(.true.) | |||
return | |||
end if | |||
endif | |||
@@ -88,7 +65,7 @@ module CTongNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TongNotification=Kelly' | |||
if(print_log) print*, 'Evaluate_TongNotification=Kelly' | |||
#endif | |||
!OPERATION-CODE=44 | |||
@@ -250,13 +227,11 @@ module CTongNotification | |||
! call Set_TongNotification(.true.) | |||
! return | |||
!end if | |||
! | |||
! | |||
call Set_TongNotification(.false.) | |||
endif | |||
call Set_TongNotification(.true.) | |||
@@ -12,7 +12,7 @@ module CUnlatchLedNotification | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_UnlatchLed=TopDrive' | |||
if(print_log) print*, 'Evaluate_UnlatchLed=TopDrive' | |||
#endif | |||
@@ -95,7 +95,7 @@ module CUnlatchLedNotification | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_UnlatchLed=Kelly' | |||
if(print_log) print*, 'Evaluate_UnlatchLed=Kelly' | |||
#endif | |||
@@ -37,7 +37,7 @@ contains | |||
data%State%notifications%TongNotification = v | |||
! if(associated(data%State%notifications%TongNotificationPtr)) !**call data%State%notifications%TongNotificationPtr(data%State%notifications%TongNotification) | |||
#ifdef deb | |||
print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||
if(print_log) print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||
#endif | |||
!**call data%State%notifications%OnTongNotificationChange%RunAll() | |||
end subroutine | |||
@@ -153,7 +153,7 @@ contains | |||
data%State%notifications%SlipsNotification = v | |||
! if(associated(data%State%notifications%SlipsNotificationPtr)) !**call data%State%notifications%SlipsNotificationPtr(data%State%notifications%SlipsNotification) | |||
#ifdef deb | |||
print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||
if(print_log) print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||
#endif | |||
!**call data%State%notifications%OnSlipsNotificationChange%RunAll() | |||
end subroutine | |||
@@ -38,7 +38,7 @@ contains | |||
data%State%notifications%TongNotification = v | |||
! if(associated(data%State%notifications%TongNotificationPtr)) !**call data%State%notifications%TongNotificationPtr(data%State%notifications%TongNotification) | |||
#ifdef deb | |||
print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||
if(print_log) print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||
#endif | |||
!**call data%State%notifications%OnTongNotificationChange%RunAll() | |||
end subroutine | |||
@@ -154,7 +154,7 @@ contains | |||
data%State%notifications%SlipsNotification = v | |||
! if(associated(data%State%notifications%SlipsNotificationPtr)) !**call data%State%notifications%SlipsNotificationPtr(data%State%notifications%SlipsNotification) | |||
#ifdef deb | |||
print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||
if(print_log) print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||
#endif | |||
!**call data%State%notifications%OnSlipsNotificationChange%RunAll() | |||
end subroutine | |||
@@ -10,7 +10,7 @@ module CFillupHeadPermission | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillupHeadPermission=TopDrive' | |||
if(print_log) print*, 'Evaluate_FillupHeadPermission=TopDrive' | |||
#endif | |||
@@ -39,7 +39,7 @@ module CFillupHeadPermission | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_FillupHeadPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_FillupHeadPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -12,7 +12,7 @@ module CInstallFillupHeadPermission | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_InstallFillupHeadPermission=TopDrive' | |||
if(print_log) print*, 'Evaluate_InstallFillupHeadPermission=TopDrive' | |||
#endif | |||
endif | |||
@@ -26,7 +26,7 @@ module CInstallFillupHeadPermission | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_InstallFillupHeadPermission=Kelly' | |||
if(print_log) print*, 'Evaluate_InstallFillupHeadPermission=Kelly' | |||
#endif | |||
@@ -9,7 +9,7 @@ module CInstallMudBucketPermission | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_InstallMudBucketPermission=TopDrive' | |||
! if(print_log) print*, 'Evaluate_InstallMudBucketPermission=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -21,7 +21,7 @@ module CInstallMudBucketPermission | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_InstallMudBucketPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_InstallMudBucketPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -12,7 +12,7 @@ module CIrIbopPermission | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIbopPermission=TopDrive' | |||
if(print_log) print*, 'Evaluate_IrIbopPermission=TopDrive' | |||
#endif | |||
@@ -42,7 +42,7 @@ module CIrIbopPermission | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIbopPermission=Kelly' | |||
if(print_log) print*, 'Evaluate_IrIbopPermission=Kelly' | |||
#endif | |||
!OPERATION-CODE=62 | |||
@@ -13,7 +13,7 @@ module CIrSafetyValvePermission | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValvePermission=TopDrive' | |||
if(print_log) print*, 'Evaluate_IrSafetyValvePermission=TopDrive' | |||
#endif | |||
@@ -41,10 +41,7 @@ module CIrSafetyValvePermission | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValvePermission=Kelly' | |||
#endif | |||
if(print_log) print*, 'Evaluate_IrSafetyValvePermission=Kelly' | |||
!OPERATION-CODE=57 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
@@ -8,7 +8,7 @@ module CRemoveFillupHeadPermission | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_RemoveFillupHeadPermission=TopDrive' | |||
! if(print_log) print*, 'Evaluate_RemoveFillupHeadPermission=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -22,7 +22,7 @@ module CRemoveFillupHeadPermission | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_RemoveFillupHeadPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_RemoveFillupHeadPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -8,7 +8,7 @@ module CRemoveMudBucketPermission | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_RemoveMudBucketPermission=TopDrive' | |||
! if(print_log) print*, 'Evaluate_RemoveMudBucketPermission=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
@@ -20,7 +20,7 @@ module CRemoveMudBucketPermission | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_RemoveMudBucketPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_RemoveMudBucketPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -12,7 +12,7 @@ module CSwingDrillPermission | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingDrillPermission=TopDrive' | |||
if(print_log) print*, 'Evaluate_SwingDrillPermission=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=33 | |||
@@ -47,7 +47,7 @@ module CSwingDrillPermission | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_SwingDrillPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_SwingDrillPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -47,7 +47,7 @@ module CSwingDrillPermission | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_SwingDrillPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_SwingDrillPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -10,7 +10,7 @@ module CSwingOffPermission | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingOffPermission=TopDrive' | |||
if(print_log) print*, 'Evaluate_SwingOffPermission=TopDrive' | |||
#endif | |||
@@ -54,7 +54,7 @@ module CSwingOffPermission | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_SwingOffPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_SwingOffPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -54,7 +54,7 @@ module CSwingOffPermission | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_SwingOffPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_SwingOffPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -11,7 +11,7 @@ module CSwingTiltPermission | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingTiltPermission=TopDrive' | |||
if(print_log) print*, 'Evaluate_SwingTiltPermission=TopDrive' | |||
#endif | |||
@@ -41,7 +41,7 @@ module CSwingTiltPermission | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_SwingTiltPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_SwingTiltPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -41,7 +41,7 @@ module CSwingTiltPermission | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_SwingTiltPermission=Kelly' | |||
! if(print_log) print*, 'Evaluate_SwingTiltPermission=Kelly' | |||
!#endif | |||
! endif | |||
@@ -11,7 +11,7 @@ contains | |||
#endif | |||
data%State%permissions%SwingTiltPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%SwingTiltPermission=', data%State%permissions%SwingTiltPermission | |||
if(print_log) print*, 'data%State%permissions%SwingTiltPermission=', data%State%permissions%SwingTiltPermission | |||
#endif | |||
!**call data%State%permissions%OnSwingTiltPermissionChange%RunAll() | |||
end subroutine | |||
@@ -29,7 +29,7 @@ contains | |||
#endif | |||
data%State%permissions%SwingOffPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%SwingOffPermission=', data%State%permissions%SwingOffPermission | |||
if(print_log) print*, 'data%State%permissions%SwingOffPermission=', data%State%permissions%SwingOffPermission | |||
#endif | |||
!**call data%State%permissions%OnSwingOffPermissionChange%RunAll() | |||
end subroutine | |||
@@ -47,7 +47,7 @@ contains | |||
#endif | |||
data%State%permissions%SwingDrillPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%SwingDrillPermission=', data%State%permissions%SwingDrillPermission | |||
if(print_log) print*, 'data%State%permissions%SwingDrillPermission=', data%State%permissions%SwingDrillPermission | |||
#endif | |||
!**call data%State%permissions%OnSwingDrillPermissionChange%RunAll() | |||
end subroutine | |||
@@ -65,7 +65,7 @@ contains | |||
#endif | |||
data%State%permissions%RemoveMudBucketPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%RemoveMudBucketPermission=', data%State%permissions%RemoveMudBucketPermission | |||
if(print_log) print*, 'data%State%permissions%RemoveMudBucketPermission=', data%State%permissions%RemoveMudBucketPermission | |||
#endif | |||
!**call data%State%permissions%OnRemoveMudBucketPermissionChange%RunAll() | |||
end subroutine | |||
@@ -84,7 +84,7 @@ contains | |||
#endif | |||
data%State%permissions%RemoveFillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%RemoveFillupHeadPermission=', data%State%permissions%RemoveFillupHeadPermission | |||
if(print_log) print*, 'data%State%permissions%RemoveFillupHeadPermission=', data%State%permissions%RemoveFillupHeadPermission | |||
#endif | |||
!**call data%State%permissions%OnRemoveFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
@@ -102,7 +102,7 @@ contains | |||
#endif | |||
data%State%permissions%IrSafetyValvePermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%IrSafetyValvePermission=', data%State%permissions%IrSafetyValvePermission | |||
if(print_log) print*, 'data%State%permissions%IrSafetyValvePermission=', data%State%permissions%IrSafetyValvePermission | |||
#endif | |||
!**call data%State%permissions%OnIrSafetyValvePermissionChange%RunAll() | |||
end subroutine | |||
@@ -120,7 +120,7 @@ contains | |||
#endif | |||
data%State%permissions%IrIbopPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%IrIbopPermission=', data%State%permissions%IrIbopPermission | |||
if(print_log) print*, 'data%State%permissions%IrIbopPermission=', data%State%permissions%IrIbopPermission | |||
#endif | |||
!**call data%State%permissions%OnIrIbopPermissionChange%RunAll() | |||
end subroutine | |||
@@ -139,7 +139,7 @@ contains | |||
#endif | |||
data%State%permissions%InstallMudBucketPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%InstallMudBucketPermission=', data%State%permissions%InstallMudBucketPermission | |||
if(print_log) print*, 'data%State%permissions%InstallMudBucketPermission=', data%State%permissions%InstallMudBucketPermission | |||
#endif | |||
!**call data%State%permissions%OnInstallMudBucketPermissionChange%RunAll() | |||
end subroutine | |||
@@ -157,7 +157,7 @@ contains | |||
#endif | |||
data%State%permissions%InstallFillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'InstallFillupHeadPermission=', data%State%permissions%InstallFillupHeadPermission | |||
if(print_log) print*, 'InstallFillupHeadPermission=', data%State%permissions%InstallFillupHeadPermission | |||
#endif | |||
!**call data%State%permissions%OnInstallFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
@@ -175,7 +175,7 @@ contains | |||
#endif | |||
data%State%permissions%FillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'FillupHeadPermission=', data%State%permissions%FillupHeadPermission | |||
if(print_log) print*, 'FillupHeadPermission=', data%State%permissions%FillupHeadPermission | |||
#endif | |||
!**call data%State%permissions%OnFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
@@ -11,7 +11,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%ZeroStringSpeed = v | |||
#ifdef deb | |||
print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||
if(print_log) print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||
#endif | |||
! call data%State%softwareInputs%OnZeroStringSpeedChange%RunAll() | |||
end subroutine | |||
@@ -30,7 +30,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%TdsStemJointHeight = v | |||
#ifdef deb | |||
print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||
if(print_log) print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||
#endif | |||
! call data%State%softwareInputs%OnTdsStemJointHeightChange%RunAll() | |||
end subroutine | |||
@@ -49,7 +49,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%StringPressure = v | |||
#ifdef deb | |||
print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||
if(print_log) print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||
#endif | |||
! call data%State%softwareInputs%OnStringPressureChange%RunAll() | |||
end subroutine | |||
@@ -67,7 +67,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%StandRack = v | |||
#ifdef deb | |||
print*, 'StandRack=', data%State%softwareInputs%StandRack | |||
if(print_log) print*, 'StandRack=', data%State%softwareInputs%StandRack | |||
#endif | |||
! call data%State%softwareInputs%OnStandRackChanged%RunAll() | |||
end subroutine | |||
@@ -85,7 +85,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%SlackOff = v | |||
#ifdef deb | |||
print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||
if(print_log) print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||
#endif | |||
! call data%State%softwareInputs%OnSlackOffChange%RunAll() | |||
end subroutine | |||
@@ -103,7 +103,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%SafetyValveHeight = v | |||
#ifdef deb | |||
print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||
if(print_log) print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||
#endif | |||
! call data%State%softwareInputs%OnSafetyValveHeightChange%RunAll() | |||
end subroutine | |||
@@ -123,7 +123,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%NearFloorConnection = v | |||
#ifdef deb | |||
print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||
if(print_log) print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||
#endif | |||
! call data%State%softwareInputs%OnNearFloorConnectionChange%RunAll() | |||
end subroutine | |||
@@ -142,7 +142,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%IbopHeight = v | |||
#ifdef deb | |||
print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||
if(print_log) print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||
#endif | |||
! call data%State%softwareInputs%OnIbopHeightChange%RunAll() | |||
end subroutine | |||
@@ -161,7 +161,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%HookHeight = v | |||
#ifdef deb | |||
print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||
if(print_log) print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||
#endif | |||
! call data%State%softwareInputs%OnHookHeightChange%RunAll() | |||
end subroutine | |||
@@ -12,7 +12,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%ZeroStringSpeed = v | |||
#ifdef deb | |||
print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||
if(print_log) print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||
#endif | |||
! call data%State%softwareInputs%OnZeroStringSpeedChange%RunAll() | |||
end subroutine | |||
@@ -31,7 +31,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%TdsStemJointHeight = v | |||
#ifdef deb | |||
print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||
if(print_log) print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||
#endif | |||
! call data%State%softwareInputs%OnTdsStemJointHeightChange%RunAll() | |||
end subroutine | |||
@@ -50,7 +50,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%StringPressure = v | |||
#ifdef deb | |||
print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||
if(print_log) print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||
#endif | |||
! call data%State%softwareInputs%OnStringPressureChange%RunAll() | |||
end subroutine | |||
@@ -68,7 +68,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%StandRack = v | |||
#ifdef deb | |||
print*, 'StandRack=', data%State%softwareInputs%StandRack | |||
if(print_log) print*, 'StandRack=', data%State%softwareInputs%StandRack | |||
#endif | |||
! call data%State%softwareInputs%OnStandRackChanged%RunAll() | |||
end subroutine | |||
@@ -86,7 +86,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%SlackOff = v | |||
#ifdef deb | |||
print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||
if(print_log) print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||
#endif | |||
! call data%State%softwareInputs%OnSlackOffChange%RunAll() | |||
end subroutine | |||
@@ -104,7 +104,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%SafetyValveHeight = v | |||
#ifdef deb | |||
print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||
if(print_log) print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||
#endif | |||
! call data%State%softwareInputs%OnSafetyValveHeightChange%RunAll() | |||
end subroutine | |||
@@ -124,7 +124,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%NearFloorConnection = v | |||
#ifdef deb | |||
print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||
if(print_log) print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||
#endif | |||
! call data%State%softwareInputs%OnNearFloorConnectionChange%RunAll() | |||
end subroutine | |||
@@ -143,7 +143,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%IbopHeight = v | |||
#ifdef deb | |||
print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||
if(print_log) print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||
#endif | |||
! call data%State%softwareInputs%OnIbopHeightChange%RunAll() | |||
end subroutine | |||
@@ -162,7 +162,7 @@ module SoftwareInputsModule | |||
#endif | |||
data%State%softwareInputs%HookHeight = v | |||
#ifdef deb | |||
print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||
if(print_log) print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||
#endif | |||
! call data%State%softwareInputs%OnHookHeightChange%RunAll() | |||
end subroutine | |||
@@ -11,7 +11,6 @@ module SoftwareInputsVariables | |||
real :: TdsStemJointHeight = 0 | |||
logical :: ZeroStringSpeed = .false. | |||
end type SoftwareInputsType | |||
! type(SoftwareInputsType):: softwareInputs | |||
contains | |||
@@ -1,11 +1,13 @@ | |||
module CUnityInputs | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
implicit none | |||
type :: UnityInputsType | |||
!Input from unity to fortran | |||
logical :: ElevatorConnectionPossible | |||
logical :: JointConnectionPossible | |||
logical :: IsKellyBushingSetInTable | |||
logical :: ElevatorPickup | |||
logical :: ElevatorPickup | |||
!only used in set and get | |||
logical :: NearFloorPosition | |||
logical :: SingleSetInMouseHole | |||
logical :: TdsConnectionPossible | |||
@@ -49,7 +51,7 @@ module CUnityInputs | |||
! ! OutOfMouseHole = v | |||
! ! call OnOutOfMouseHoleChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'OutOfMouseHole=', OutOfMouseHole | |||
! ! if(print_log) print*, 'OutOfMouseHole=', OutOfMouseHole | |||
! !#endif | |||
! end subroutine | |||
@@ -80,7 +82,7 @@ module CUnityInputs | |||
! ! Unlatch = v | |||
! ! call OnUnlatchChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'Unlatch=', Unlatch | |||
! ! if(print_log) print*, 'Unlatch=', Unlatch | |||
! !#endif | |||
! end subroutine | |||
@@ -113,7 +115,7 @@ module CUnityInputs | |||
! ! Latch = v | |||
! ! call OnLatchChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'Latch=', Latch | |||
! ! if(print_log) print*, 'Latch=', Latch | |||
! !#endif | |||
! end subroutine | |||
@@ -148,7 +150,7 @@ module CUnityInputs | |||
! ! SlipsUnSet = v | |||
! ! call OnSlipsUnSetChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'SlipsUnSet=', SlipsUnSet | |||
! ! if(print_log) print*, 'SlipsUnSet=', SlipsUnSet | |||
! !#endif | |||
! end subroutine | |||
@@ -180,7 +182,7 @@ module CUnityInputs | |||
! ! SlipsSet = v | |||
! ! call OnSlipsSetChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'SlipsSet=', SlipsSet | |||
! ! if(print_log) print*, 'SlipsSet=', SlipsSet | |||
! !#endif | |||
! end subroutine | |||
@@ -210,7 +212,7 @@ module CUnityInputs | |||
! ! BreakupTong = v | |||
! ! call OnBreakupTongChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'BreakupTong=', BreakupTong | |||
! ! if(print_log) print*, 'BreakupTong=', BreakupTong | |||
! !#endif | |||
! end subroutine | |||
@@ -238,7 +240,7 @@ module CUnityInputs | |||
! ! MakeupTong = v | |||
! ! call OnMakeupTongChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'MakeupTong=', MakeupTong | |||
! ! if(print_log) print*, 'MakeupTong=', MakeupTong | |||
! !#endif | |||
! end subroutine | |||
@@ -278,7 +280,7 @@ module CUnityInputs | |||
! ! NewHookHeight = v | |||
! ! call OnNewHookHeightChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'NewHookHeight=', NewHookHeight | |||
! ! if(print_log) print*, 'NewHookHeight=', NewHookHeight | |||
! !#endif | |||
! end subroutine | |||
@@ -306,7 +308,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%ElevatorConnectionPossible = v | |||
! !**call data%Equipments%UnityInputs%OnElevatorConnectionPossibleChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||
! if(print_log) print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||
! #endif | |||
! end subroutine | |||
@@ -337,7 +339,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%JointConnectionPossible = v | |||
! !**call data%Equipments%UnityInputs%OnJointConnectionPossibleChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||
! if(print_log) print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||
! #endif | |||
! end subroutine | |||
@@ -365,7 +367,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%IsKellyBushingSetInTable = v | |||
! !**call data%Equipments%UnityInputs%OnIsKellyBushingSetInTableChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||
! if(print_log) print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||
! #endif | |||
! end subroutine | |||
@@ -393,7 +395,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%ElevatorPickup = v | |||
! !**call data%Equipments%UnityInputs%OnElevatorPickupChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||
! if(print_log) print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||
! #endif | |||
! end subroutine | |||
@@ -449,7 +451,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%SingleSetInMouseHole = v | |||
! !**call data%Equipments%UnityInputs%OnSingleSetInMouseHoleChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||
! if(print_log) print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||
! #endif | |||
! end subroutine | |||
@@ -50,7 +50,7 @@ module CUnityInputs | |||
! ! OutOfMouseHole = v | |||
! ! call OnOutOfMouseHoleChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'OutOfMouseHole=', OutOfMouseHole | |||
! ! if(print_log) print*, 'OutOfMouseHole=', OutOfMouseHole | |||
! !#endif | |||
! end subroutine | |||
@@ -81,7 +81,7 @@ module CUnityInputs | |||
! ! Unlatch = v | |||
! ! call OnUnlatchChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'Unlatch=', Unlatch | |||
! ! if(print_log) print*, 'Unlatch=', Unlatch | |||
! !#endif | |||
! end subroutine | |||
@@ -114,7 +114,7 @@ module CUnityInputs | |||
! ! Latch = v | |||
! ! call OnLatchChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'Latch=', Latch | |||
! ! if(print_log) print*, 'Latch=', Latch | |||
! !#endif | |||
! end subroutine | |||
@@ -149,7 +149,7 @@ module CUnityInputs | |||
! ! SlipsUnSet = v | |||
! ! call OnSlipsUnSetChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'SlipsUnSet=', SlipsUnSet | |||
! ! if(print_log) print*, 'SlipsUnSet=', SlipsUnSet | |||
! !#endif | |||
! end subroutine | |||
@@ -181,7 +181,7 @@ module CUnityInputs | |||
! ! SlipsSet = v | |||
! ! call OnSlipsSetChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'SlipsSet=', SlipsSet | |||
! ! if(print_log) print*, 'SlipsSet=', SlipsSet | |||
! !#endif | |||
! end subroutine | |||
@@ -211,7 +211,7 @@ module CUnityInputs | |||
! ! BreakupTong = v | |||
! ! call OnBreakupTongChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'BreakupTong=', BreakupTong | |||
! ! if(print_log) print*, 'BreakupTong=', BreakupTong | |||
! !#endif | |||
! end subroutine | |||
@@ -239,7 +239,7 @@ module CUnityInputs | |||
! ! MakeupTong = v | |||
! ! call OnMakeupTongChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'MakeupTong=', MakeupTong | |||
! ! if(print_log) print*, 'MakeupTong=', MakeupTong | |||
! !#endif | |||
! end subroutine | |||
@@ -279,7 +279,7 @@ module CUnityInputs | |||
! ! NewHookHeight = v | |||
! ! call OnNewHookHeightChange%RunAll() | |||
! !#ifdef deb | |||
! ! print*, 'NewHookHeight=', NewHookHeight | |||
! ! if(print_log) print*, 'NewHookHeight=', NewHookHeight | |||
! !#endif | |||
! end subroutine | |||
@@ -307,7 +307,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%ElevatorConnectionPossible = v | |||
! !**call data%Equipments%UnityInputs%OnElevatorConnectionPossibleChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||
! if(print_log) print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||
! #endif | |||
! end subroutine | |||
@@ -338,7 +338,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%JointConnectionPossible = v | |||
! !**call data%Equipments%UnityInputs%OnJointConnectionPossibleChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||
! if(print_log) print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||
! #endif | |||
! end subroutine | |||
@@ -366,7 +366,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%IsKellyBushingSetInTable = v | |||
! !**call data%Equipments%UnityInputs%OnIsKellyBushingSetInTableChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||
! if(print_log) print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||
! #endif | |||
! end subroutine | |||
@@ -394,7 +394,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%ElevatorPickup = v | |||
! !**call data%Equipments%UnityInputs%OnElevatorPickupChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||
! if(print_log) print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||
! #endif | |||
! end subroutine | |||
@@ -450,7 +450,7 @@ module CUnityInputs | |||
! data%Equipments%UnityInputs%SingleSetInMouseHole = v | |||
! !**call data%Equipments%UnityInputs%OnSingleSetInMouseHoleChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||
! if(print_log) print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||
! #endif | |||
! end subroutine | |||
@@ -2,31 +2,27 @@ module UnityModule | |||
use SimulationVariables | |||
implicit none | |||
contains | |||
subroutine UnityInputsFromJson(parent) | |||
use json_module,IK =>json_ik | |||
type(json_value),pointer :: parent | |||
type(json_core) :: json | |||
type(json_value),pointer :: p,pval | |||
call json%get(parent,'Unity',p) | |||
call json%get(p,'ElevatorConnectionPossible',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%ElevatorConnectionPossible) | |||
call json%get(p,'JointConnectionPossible',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%JointConnectionPossible) | |||
call json%get(p,'IsKellyBushingSetInTable',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%IsKellyBushingSetInTable) | |||
call json%get(p,'ElevatorPickup',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%ElevatorPickup) | |||
call json%get(p,'NearFloorPosition',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%NearFloorPosition) | |||
call json%get(p,'SingleSetInMouseHole',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%SingleSetInMouseHole) | |||
call json%get(p,'TdsConnectionPossible',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%TdsConnectionPossible) | |||
call json%get(p,'TdsStemIn',pval) | |||
call json%get(pval,data%Equipments%UnityInputs%TdsStemIn) | |||
end subroutine | |||
subroutine UnityInputsFromJson(jsonfile) | |||
type(json_file)::jsonfile | |||
logical::found | |||
call jsonfile%get('UnityInputs.ElevatorConnectionPossible',data%Equipments%UnityInputs%ElevatorConnectionPossible,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%ElevatorConnectionPossible") | |||
call jsonfile%get('UnityInputs.JointConnectionPossible',data%Equipments%UnityInputs%JointConnectionPossible,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%JointConnectionPossible") | |||
call jsonfile%get('UnityInputs.IsKellyBushingSetInTable',data%Equipments%UnityInputs%IsKellyBushingSetInTable,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%IsKellyBushingSetInTable") | |||
call jsonfile%get('UnityInputs.ElevatorPickup',data%Equipments%UnityInputs%ElevatorPickup,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%ElevatorPickup") | |||
call jsonfile%get('UnityInputs.NearFloorPosition',data%Equipments%UnityInputs%NearFloorPosition,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%NearFloorPosition") | |||
call jsonfile%get('UnityInputs.SingleSetInMouseHole',data%Equipments%UnityInputs%SingleSetInMouseHole,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%SingleSetInMouseHole") | |||
call jsonfile%get('UnityInputs.TdsConnectionPossible',data%Equipments%UnityInputs%TdsConnectionPossible,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%TdsConnectionPossible") | |||
call jsonfile%get('UnityInputs.TdsStemIn',data%Equipments%UnityInputs%TdsStemIn,found) | |||
if ( .not. found ) call logg(4,"Not found: UnityInputs%TdsStemIn") | |||
end subroutine | |||
subroutine UnityOutputsToJson(parent) | |||
type(json_value),pointer :: parent | |||
@@ -80,7 +76,7 @@ subroutine Set_NearFloorPosition(v) | |||
data%Equipments%UnityInputs%NearFloorPosition = v | |||
!**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll() | |||
if(log_level>4) then | |||
print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||
if(print_log) print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||
endif | |||
end subroutine | |||
@@ -101,7 +97,7 @@ subroutine Set_BlowoutFromString(v) | |||
logical, intent (in) :: v | |||
data%Equipments%UnityOutputs%BlowoutFromString = v | |||
#ifdef deb | |||
print*, 'BlowoutFromString=', v | |||
if(print_log) print*, 'BlowoutFromString=', v | |||
#endif | |||
end subroutine | |||
@@ -115,7 +111,7 @@ subroutine Set_BlowoutFromAnnular(v) | |||
logical, intent (in) :: v | |||
data%Equipments%UnityOutputs%BlowoutFromAnnular = v | |||
#ifdef deb | |||
print*, 'BlowoutFromAnnular=', v | |||
if(print_log) print*, 'BlowoutFromAnnular=', v | |||
#endif | |||
end subroutine | |||
@@ -133,7 +129,7 @@ subroutine Set_FlowFromReturnLine(v) | |||
logical, intent (in) :: v | |||
data%Equipments%UnityOutputs%FlowFromReturnLine = v | |||
#ifdef deb | |||
print*, 'FlowFromReturnLine=', v | |||
if(print_log) print*, 'FlowFromReturnLine=', v | |||
#endif | |||
end subroutine | |||
@@ -149,7 +145,7 @@ subroutine Set_FlowFromKelly(v) | |||
real, intent (in) :: v | |||
data%Equipments%UnityOutputs%FlowFromKelly = v | |||
#ifdef deb | |||
print*, 'FlowFromKelly=', v | |||
if(print_log) print*, 'FlowFromKelly=', v | |||
#endif | |||
end subroutine | |||
@@ -167,7 +163,7 @@ subroutine Set_FlowFromFillupHead(v) | |||
real, intent (in) :: v | |||
data%Equipments%UnityOutputs%FlowFromFillupHead = v | |||
#ifdef deb | |||
print*, 'FlowFromFillupHead=', v | |||
if(print_log) print*, 'FlowFromFillupHead=', v | |||
#endif | |||
end subroutine | |||
@@ -186,7 +182,7 @@ subroutine Set_FlowKellyDisconnect(v) | |||
logical, intent (in) :: v | |||
data%Equipments%UnityOutputs%FlowKellyDisconnect = v | |||
#ifdef deb | |||
print*, 'FlowKellyDisconnect=', v | |||
if(print_log) print*, 'FlowKellyDisconnect=', v | |||
#endif | |||
end subroutine | |||
@@ -203,7 +199,7 @@ subroutine Set_FlowPipeDisconnect(v) | |||
logical, intent (in) :: v | |||
data%Equipments%UnityOutputs%FlowPipeDisconnect = v | |||
#ifdef deb | |||
print*, 'FlowPipeDisconnect=', v | |||
if(print_log) print*, 'FlowPipeDisconnect=', v | |||
#endif | |||
end subroutine | |||
@@ -217,7 +213,7 @@ subroutine Set_BlowoutFromStringPercent(v) | |||
real(8), intent (in) :: v | |||
data%Equipments%UnityOutputs%BlowoutFromStringPercent = v | |||
#ifdef deb | |||
print*, 'BlowoutFromStringPercent=', v | |||
if(print_log) print*, 'BlowoutFromStringPercent=', v | |||
#endif | |||
end subroutine | |||
@@ -234,7 +230,7 @@ subroutine Calc_KellyHoseVibrationRate(spm1, spm2) | |||
total = (spm1 + spm2)/2 | |||
data%Equipments%UnityOutputs%KellyHoseVibrationRate = ScaleRange(total, 0.0, 10.0, 0.0, 120.0) | |||
#ifdef deb | |||
print*, 'KellyHoseVibrationRate=', data%Equipments%UnityOutputs%KellyHoseVibrationRate | |||
if(print_log) print*, 'KellyHoseVibrationRate=', data%Equipments%UnityOutputs%KellyHoseVibrationRate | |||
#endif | |||
end subroutine | |||
@@ -248,7 +244,7 @@ subroutine Set_Pedal(v) | |||
real(8), intent (in) :: v | |||
data%Equipments%UnityOutputs%Pedal = v | |||
#ifdef deb | |||
print*, 'Pedal=', v | |||
if(print_log) print*, 'Pedal=', v | |||
#endif | |||
end subroutine | |||
@@ -262,7 +258,7 @@ subroutine Set_FlowRate(v) | |||
real(8), intent (in) :: v | |||
data%Equipments%UnityOutputs%FlowRate = v | |||
#ifdef deb | |||
print*, 'FlowRate=', v | |||
if(print_log) print*, 'FlowRate=', v | |||
#endif | |||
end subroutine | |||
@@ -276,7 +272,7 @@ subroutine Set_RotaryRpm(v) | |||
real(8), intent (in) :: v | |||
data%Equipments%UnityOutputs%RotaryRpm = v | |||
#ifdef deb | |||
print*, 'RotaryRpm=', v | |||
if(print_log) print*, 'RotaryRpm=', v | |||
#endif | |||
end subroutine | |||
@@ -81,7 +81,7 @@ subroutine Set_NearFloorPosition(v) | |||
data%Equipments%UnityInputs%NearFloorPosition = v | |||
!**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll() | |||
if(log_level>4) then | |||
print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||
if(print_log) print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||
endif | |||
end subroutine | |||
@@ -1,158 +0,0 @@ | |||
module CSlipsEnum | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_Slips() | |||
implicit none | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_Slips=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_Slips=Kelly' | |||
!#endif | |||
! endif | |||
end subroutine | |||
! subroutine Subscribe_Slips() | |||
! use CDrillingConsoleVariables | |||
! use ConfigurationVariables | |||
! use ConfigurationVariables | |||
! implicit none | |||
! !call Set_Slips(SLIPS_SET) | |||
! call OnSlipsPress%Add(ButtonPress_Slips) | |||
! end subroutine | |||
subroutine ButtonPress_Slips() | |||
use UnitySignalsModule | |||
use NotificationModule | |||
use CUnityOutputs | |||
use UnitySignalsModule !for CTdsConnectionModesEnum | |||
implicit none | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Slips=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=30 | |||
if (Get_Slips() == SLIPS_UNSET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_SET_BEGIN) | |||
return | |||
end if | |||
!TOPDRIVE-CODE=31 | |||
if (Get_TdsConnectionModes() == TDS_CONNECTION_STRING .and.& | |||
Get_Slips() == SLIPS_SET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
!TOPDRIVE-CODE=32 | |||
if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING .and.& | |||
Get_Slips() == SLIPS_SET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Slips=Kelly' | |||
#endif | |||
!OPERATION-CODE=19 | |||
if (Get_Slips() == SLIPS_UNSET_END .and.& | |||
Get_SlipsNotification()) then | |||
call Set_Slips(SLIPS_SET_BEGIN) | |||
return | |||
end if | |||
!OPERATION-CODE=20 | |||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
Get_KellyConnection() == KELLY_CONNECTION_STRING .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_SlipsNotification() .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
!OPERATION-CODE=21 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_SlipsNotification() .and.& | |||
Get_Slips() == SLIPS_SET_END) then | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
return | |||
end if | |||
endif | |||
end subroutine | |||
end module CSlipsEnum |
@@ -8,7 +8,7 @@ module CTdsBackupClamp | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsBackupClamp=TopDrive' | |||
if(print_log) print*, 'Evaluate_TdsBackupClamp=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=79 | |||
@@ -43,7 +43,7 @@ module CTdsBackupClamp | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsBackupClamp=Kelly' | |||
if(print_log) print*, 'Evaluate_TdsBackupClamp=Kelly' | |||
#endif | |||
endif | |||
@@ -10,7 +10,7 @@ module CTdsSpineEnum | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsSpine=TopDrive' | |||
if(print_log) print*, 'Evaluate_TdsSpine=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=83 | |||
@@ -49,7 +49,7 @@ module CTdsSpineEnum | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsSpine=Kelly' | |||
if(print_log) print*, 'Evaluate_TdsSpine=Kelly' | |||
#endif | |||
endif | |||
@@ -10,7 +10,7 @@ module CTdsSwingEnum | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsSwing=TopDrive' | |||
if(print_log) print*, 'Evaluate_TdsSwing=TopDrive' | |||
#endif | |||
@@ -128,7 +128,7 @@ module CTdsSwingEnum | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_TdsSwing=Kelly' | |||
! if(print_log) print*, 'Evaluate_TdsSwing=Kelly' | |||
!#endif | |||
! endif | |||
@@ -128,7 +128,7 @@ module CTdsSwingEnum | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_TdsSwing=Kelly' | |||
! if(print_log) print*, 'Evaluate_TdsSwing=Kelly' | |||
!#endif | |||
! endif | |||
@@ -8,7 +8,7 @@ module CTdsTongEnum | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsTong=TopDrive' | |||
if(print_log) print*, 'Evaluate_TdsTong=TopDrive' | |||
#endif | |||
@@ -50,7 +50,7 @@ module CTdsTongEnum | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsTong=Kelly' | |||
if(print_log) print*, 'Evaluate_TdsTong=Kelly' | |||
#endif | |||
endif | |||
@@ -7,30 +7,17 @@ module CTongEnum | |||
implicit none | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_Tong=TopDrive' | |||
!#endif | |||
! if(print_log) print*, 'Evaluate_Tong=TopDrive' | |||
! endif | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_Tong=Kelly' | |||
!#endif | |||
! if(print_log) print*, 'Evaluate_Tong=Kelly' | |||
! endif | |||
end subroutine | |||
! subroutine Subscribe_Tong() | |||
! use CDrillingConsoleVariables | |||
!@ use ConfigurationVariables | |||
!@ use ConfigurationVariables | |||
!@ use ConfigurationVariables | |||
! implicit none | |||
! call OnBreakoutLeverPress%Add(ButtonPress_Breakout_TongNotification) | |||
@@ -44,9 +31,7 @@ module CTongEnum | |||
subroutine ButtonPress_Breakout_TongNotification() | |||
implicit none | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Breakout_TongNotification=TopDrive' | |||
#endif | |||
if(print_log) print*, 'ButtonPress_Breakout_TongNotification=TopDrive' | |||
!TOPDRIVE-CODE=70 | |||
if (Get_TongNotification()) then | |||
call Set_Tong(TONG_BREAKOUT_BEGIN) | |||
@@ -54,9 +39,7 @@ module CTongEnum | |||
end if | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Breakout_TongNotification=Kelly' | |||
#endif | |||
if(print_log) print*, 'ButtonPress_Breakout_TongNotification=Kelly' | |||
!OPERATION-CODE=74 | |||
if (Get_TongNotification()) then | |||
call Set_Tong(TONG_BREAKOUT_BEGIN) | |||
@@ -74,81 +57,35 @@ module CTongEnum | |||
use NotificationModule | |||
implicit none | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Makeup_TongNotification=TopDrive' | |||
#endif | |||
if(print_log) print*, 'ButtonPress_Makeup_TongNotification=TopDrive' | |||
!TOPDRIVE-CODE=69 | |||
if (Get_TongNotification()) then | |||
call Set_Tong(TONG_MAKEUP_BEGIN) | |||
return | |||
end if | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Makeup_TongNotification=Kelly' | |||
#endif | |||
if(print_log) print*, 'ButtonPress_Makeup_TongNotification=Kelly' | |||
!OPERATION-CODE=73 | |||
if (Get_TongNotification()) then | |||
call Set_Tong(TONG_MAKEUP_BEGIN) | |||
endif | |||
endif | |||
endif | |||
end subroutine | |||
subroutine ButtonPress_Neutral_TongNotification() | |||
implicit none | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Neutral_TongNotification=TopDrive' | |||
#endif | |||
if(print_log) print*, 'ButtonPress_Neutral_TongNotification=TopDrive' | |||
endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Neutral_TongNotification=Kelly' | |||
#endif | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
if(print_log) print*, 'ButtonPress_Neutral_TongNotification=Kelly' | |||
call Set_Tong(TONG_NEUTRAL) | |||
endif | |||
end subroutine | |||
end module CTongEnum |
@@ -1,8 +1,62 @@ | |||
module UnitySignalsModule | |||
use UnitySignalVariables | |||
use SimulationVariables | |||
use RedisInterface | |||
contains | |||
subroutine UnitySignalsFromJson(jsonfile) | |||
type(json_value),pointer :: parent | |||
type(json_core) :: json | |||
type(json_value),pointer :: p,pval | |||
type(json_file)::jsonfile | |||
logical::found | |||
integer :: i | |||
call jsonfile%get('UnitySignals.MudBucket',data%State%unitySignals%MudBucket,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%MudBucket") | |||
call jsonfile%get('UnitySignals.Elevator',data%State%unitySignals%Elevator,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Elevator") | |||
call jsonfile%get('UnitySignals.FillupHead',data%State%unitySignals%FillupHead,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%FillupHead") | |||
call jsonfile%get('UnitySignals.Ibop',data%State%unitySignals%Ibop,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Ibop") | |||
call jsonfile%get('UnitySignals.Kelly',data%State%unitySignals%Kelly,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Kelly") | |||
call jsonfile%get('UnitySignals.MouseHole',data%State%unitySignals%MouseHole,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%MouseHole") | |||
call jsonfile%get('UnitySignals.OperationCondition',data%State%unitySignals%OperationCondition,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%OperationCondition") | |||
call jsonfile%get('UnitySignals.SafetyValve',data%State%unitySignals%SafetyValve,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%SafetyValve") | |||
call jsonfile%get('UnitySignals.operation',data%State%unitySignals%operation,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%operation") | |||
call jsonfile%get('UnitySignals.Slips',data%State%unitySignals%Slips,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Slips") | |||
call jsonfile%get('UnitySignals.Slips_S',data%State%unitySignals%Slips_S,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Slips_S") | |||
call jsonfile%get('UnitySignals.Swing',data%State%unitySignals%Swing,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Swing") | |||
call jsonfile%get('UnitySignals.Swing_S',data%State%unitySignals%Swing_S,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Swing_S") | |||
call jsonfile%get('UnitySignals.TdsBackupClamp',data%State%unitySignals%TdsBackupClamp,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%TdsBackupClamp") | |||
call jsonfile%get('UnitySignals.TdsSpine',data%State%unitySignals%TdsSpine,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%TdsSpine") | |||
call jsonfile%get('UnitySignals.TdsSwing',data%State%unitySignals%TdsSwing,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%TdsSwing") | |||
call jsonfile%get('UnitySignals.TdsTong',data%State%unitySignals%TdsTong,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%TdsTong") | |||
call jsonfile%get('UnitySignals.Tong',data%State%unitySignals%Tong,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Tong") | |||
call jsonfile%get('UnitySignals.Tong_S',data%State%unitySignals%Tong_S,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%Tong_S") | |||
call jsonfile%get('UnitySignals.TdsConnectionModes',data%State%unitySignals%TdsConnectionModes,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%TdsConnectionModes") | |||
call jsonfile%get('UnitySignals.TdsElevatorModes',data%State%unitySignals%TdsElevatorModes,found) | |||
if ( .not. found ) call logg(4,"Not found: unitySignals%TdsElevatorModes") | |||
end subroutine | |||
subroutine Set_TdsElevatorModes(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
@@ -31,13 +85,11 @@ end subroutine | |||
subroutine Set_Tong(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%unitySignals%Tong == v) return | |||
#endif | |||
if(data%State%unitySignals%Tong == v) return | |||
data%State%unitySignals%Tong = v | |||
#ifdef deb | |||
print*, 'Tong=', data%State%unitySignals%Tong | |||
#endif | |||
if(print_log) print*, 'Tong=', data%State%unitySignals%Tong | |||
if(data%State%unitySignals%Tong==TONG_MAKEUP_BEGIN) call publishMessageToChannel("TONG_MAKEUP_BEGIN") | |||
if(data%State%unitySignals%Tong==TONG_BREAKOUT_BEGIN) call publishMessageToChannel("TONG_BREAKOUT_BEGIN") | |||
!**call data%State%unitySignals%OnTongChange%RunAll() | |||
end subroutine | |||
@@ -55,7 +107,7 @@ subroutine Set_TdsTong(v) | |||
#endif | |||
data%State%unitySignals%TdsTong = v | |||
#ifdef deb | |||
print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||
if(print_log) print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||
#endif | |||
!**call data%State%unitySignals%OnTdsTongChange%RunAll() | |||
end subroutine | |||
@@ -74,7 +126,7 @@ subroutine Set_TdsSwing(v) | |||
#endif | |||
data%State%unitySignals%TdsSwing = v | |||
#ifdef deb | |||
print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||
if(print_log) print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||
#endif | |||
!**call data%State%unitySignals%OnTdsSwingChange%RunAll() | |||
end subroutine | |||
@@ -93,7 +145,7 @@ subroutine Set_TdsSpine(v) | |||
#endif | |||
data%State%unitySignals%TdsSpine = v | |||
#ifdef deb | |||
print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||
if(print_log) print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||
#endif | |||
!**call data%State%unitySignals%OnTdsSpineChange%RunAll() | |||
end subroutine | |||
@@ -112,7 +164,7 @@ subroutine Set_TdsBackupClamp(v) | |||
#endif | |||
data%State%unitySignals%TdsBackupClamp = v | |||
#ifdef deb | |||
print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||
if(print_log) print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||
#endif | |||
!**call data%State%unitySignals%OnTdsBackupClampChange%RunAll() | |||
end subroutine | |||
@@ -131,7 +183,7 @@ subroutine Set_Swing(v) | |||
#endif | |||
data%State%unitySignals%Swing = v | |||
#ifdef deb | |||
print*, 'Swing=', data%State%unitySignals%Swing | |||
if(print_log) print*, 'Swing=', data%State%unitySignals%Swing | |||
#endif | |||
!**call data%State%unitySignals%OnSwingChange%RunAll() | |||
end subroutine | |||
@@ -141,17 +193,15 @@ integer function Get_Swing() | |||
Get_Swing = data%State%unitySignals%Swing | |||
end function | |||
!//TODO: apparently every thing is started here for slips | |||
subroutine Set_Slips(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%unitySignals%Slips == v) return | |||
#endif | |||
if(data%State%unitySignals%Slips == v) return | |||
data%State%unitySignals%Slips = v | |||
#ifdef deb | |||
print*, 'Slips=', data%State%unitySignals%Slips | |||
#endif | |||
if(print_log) print*, 'Slips=', data%State%unitySignals%Slips | |||
if(v==SLIPS_SET_BEGIN) call publishMessageToChannel("SLIPS_SET_BEGIN") | |||
if(v==SLIPS_UNSET_BEGIN) call publishMessageToChannel("SLIPS_UNSET_BEGIN") | |||
!**call data%State%unitySignals%OnSlipsChange%RunAll() | |||
end subroutine | |||
@@ -175,11 +225,11 @@ subroutine Set_SafetyValve(v) | |||
data%State%unitySignals%SafetyValve = v | |||
#ifdef deb | |||
if(data%State%unitySignals%SafetyValve == SAFETY_VALVE_NEUTRAL) then | |||
print*, 'SafetyValve=SAFETY_VALVE_NEUTRAL' | |||
if(print_log) print*, 'SafetyValve=SAFETY_VALVE_NEUTRAL' | |||
else if (data%State%unitySignals%SafetyValve == SAFETY_VALVE_INSTALL) then | |||
print*, 'SafetyValve=SAFETY_VALVE_INSTALL' | |||
if(print_log) print*, 'SafetyValve=SAFETY_VALVE_INSTALL' | |||
else if (data%State%unitySignals%SafetyValve == SAFETY_VALVE_INSTALL) then | |||
print*, 'SafetyValve=SAFETY_VALVE_REMOVE' | |||
if(print_log) print*, 'SafetyValve=SAFETY_VALVE_REMOVE' | |||
endif | |||
#endif | |||
!**call data%State%unitySignals%OnSafetyValveChange%RunAll() | |||
@@ -210,7 +260,7 @@ subroutine Set_OperationCondition(v) | |||
#endif | |||
data%State%unitySignals%OperationCondition = v | |||
#ifdef deb | |||
print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||
if(print_log) print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||
#endif | |||
!**call data%State%unitySignals%OnOperationConditionChange%RunAll() | |||
!**call data%State%unitySignals%OnOperationConditionChangeInt%RunAll(data%State%unitySignals%OperationCondition) | |||
@@ -235,7 +285,7 @@ subroutine Set_MouseHole(v) | |||
!call sleep(2) | |||
data%State%unitySignals%MouseHole = v | |||
#ifdef deb | |||
print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||
if(print_log) print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||
#endif | |||
!**call data%State%unitySignals%OnMouseHoleChange%RunAll() | |||
end subroutine | |||
@@ -255,7 +305,7 @@ subroutine Set_Kelly(v) | |||
#endif | |||
data%State%unitySignals%Kelly = v | |||
#ifdef deb | |||
print*, 'Kelly=', data%State%unitySignals%Kelly | |||
if(print_log) print*, 'Kelly=', data%State%unitySignals%Kelly | |||
#endif | |||
!**call data%State%unitySignals%OnKellyChange%RunAll() | |||
end subroutine | |||
@@ -274,7 +324,7 @@ subroutine Set_Ibop(v) | |||
#endif | |||
data%State%unitySignals%Ibop = v | |||
#ifdef deb | |||
print*, 'Ibop=', data%State%unitySignals%Ibop | |||
if(print_log) print*, 'Ibop=', data%State%unitySignals%Ibop | |||
#endif | |||
!**call data%State%unitySignals%OnIbopChange%RunAll() | |||
end subroutine | |||
@@ -301,7 +351,7 @@ subroutine Set_FillupHead(v) | |||
endif | |||
#ifdef deb | |||
print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||
if(print_log) print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||
#endif | |||
!**call data%State%unitySignals%OnFillupHeadChange%RunAll() | |||
end subroutine | |||
@@ -319,7 +369,7 @@ subroutine Evaluate_FillupHead() | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillupHead=TopDrive' | |||
if(print_log) print*, 'Evaluate_FillupHead=TopDrive' | |||
#endif | |||
endif | |||
@@ -330,7 +380,7 @@ subroutine Evaluate_FillupHead() | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillupHead=Kelly' | |||
if(print_log) print*, 'Evaluate_FillupHead=Kelly' | |||
#endif | |||
endif | |||
@@ -352,7 +402,7 @@ subroutine Set_Elevator(v) | |||
#endif | |||
data%State%unitySignals%Elevator = v | |||
#ifdef deb | |||
print*, 'Elevator=', data%State%unitySignals%Elevator | |||
if(print_log) print*, 'Elevator=', data%State%unitySignals%Elevator | |||
#endif | |||
!**call data%State%unitySignals%OnElevatorChange%RunAll() | |||
end subroutine | |||
@@ -378,7 +428,7 @@ subroutine Set_MudBucket(v) | |||
call ToggleMudBox(.false.) | |||
endif | |||
#ifdef deb | |||
print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||
if(print_log) print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||
#endif | |||
!**call data%State%unitySignals%OnMudBucketChange%RunAll() | |||
end subroutine | |||
@@ -419,7 +469,7 @@ subroutine Set_TdsConnectionModes(v) | |||
endif | |||
#ifdef deb | |||
print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||
if(print_log) print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||
#endif | |||
!**call data%State%unitySignals%OnTdsConnectionModesChange%RunAll() | |||
end subroutine | |||
@@ -438,7 +488,7 @@ subroutine Evaluate_TdsConnectionModes() | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||
if(print_log) print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=3 | |||
if (Get_TdsStemIn() .and.& | |||
@@ -481,7 +531,7 @@ subroutine Evaluate_TdsConnectionModes() | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsConnectionModes=Kelly' | |||
if(print_log) print*, 'Evaluate_TdsConnectionModes=Kelly' | |||
#endif | |||
endif | |||
@@ -37,7 +37,7 @@ subroutine Set_Tong(v) | |||
#endif | |||
data%State%unitySignals%Tong = v | |||
#ifdef deb | |||
print*, 'Tong=', data%State%unitySignals%Tong | |||
if(print_log) print*, 'Tong=', data%State%unitySignals%Tong | |||
#endif | |||
!**call data%State%unitySignals%OnTongChange%RunAll() | |||
end subroutine | |||
@@ -56,7 +56,7 @@ subroutine Set_TdsTong(v) | |||
#endif | |||
data%State%unitySignals%TdsTong = v | |||
#ifdef deb | |||
print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||
if(print_log) print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||
#endif | |||
!**call data%State%unitySignals%OnTdsTongChange%RunAll() | |||
end subroutine | |||
@@ -75,7 +75,7 @@ subroutine Set_TdsSwing(v) | |||
#endif | |||
data%State%unitySignals%TdsSwing = v | |||
#ifdef deb | |||
print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||
if(print_log) print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||
#endif | |||
!**call data%State%unitySignals%OnTdsSwingChange%RunAll() | |||
end subroutine | |||
@@ -94,7 +94,7 @@ subroutine Set_TdsSpine(v) | |||
#endif | |||
data%State%unitySignals%TdsSpine = v | |||
#ifdef deb | |||
print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||
if(print_log) print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||
#endif | |||
!**call data%State%unitySignals%OnTdsSpineChange%RunAll() | |||
end subroutine | |||
@@ -113,7 +113,7 @@ subroutine Set_TdsBackupClamp(v) | |||
#endif | |||
data%State%unitySignals%TdsBackupClamp = v | |||
#ifdef deb | |||
print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||
if(print_log) print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||
#endif | |||
!**call data%State%unitySignals%OnTdsBackupClampChange%RunAll() | |||
end subroutine | |||
@@ -132,7 +132,7 @@ subroutine Set_Swing(v) | |||
#endif | |||
data%State%unitySignals%Swing = v | |||
#ifdef deb | |||
print*, 'Swing=', data%State%unitySignals%Swing | |||
if(print_log) print*, 'Swing=', data%State%unitySignals%Swing | |||
#endif | |||
!**call data%State%unitySignals%OnSwingChange%RunAll() | |||
end subroutine | |||
@@ -151,7 +151,7 @@ subroutine Set_Slips(v) | |||
#endif | |||
data%State%unitySignals%Slips = v | |||
#ifdef deb | |||
print*, 'Slips=', data%State%unitySignals%Slips | |||
if(print_log) print*, 'Slips=', data%State%unitySignals%Slips | |||
#endif | |||
!**call data%State%unitySignals%OnSlipsChange%RunAll() | |||
end subroutine | |||
@@ -203,7 +203,7 @@ subroutine Set_OperationCondition(v) | |||
#endif | |||
data%State%unitySignals%OperationCondition = v | |||
#ifdef deb | |||
print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||
if(print_log) print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||
#endif | |||
!**call data%State%unitySignals%OnOperationConditionChange%RunAll() | |||
!**call data%State%unitySignals%OnOperationConditionChangeInt%RunAll(data%State%unitySignals%OperationCondition) | |||
@@ -228,7 +228,7 @@ subroutine Set_MouseHole(v) | |||
!call sleep(2) | |||
data%State%unitySignals%MouseHole = v | |||
#ifdef deb | |||
print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||
if(print_log) print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||
#endif | |||
!**call data%State%unitySignals%OnMouseHoleChange%RunAll() | |||
end subroutine | |||
@@ -248,7 +248,7 @@ subroutine Set_Kelly(v) | |||
#endif | |||
data%State%unitySignals%Kelly = v | |||
#ifdef deb | |||
print*, 'Kelly=', data%State%unitySignals%Kelly | |||
if(print_log) print*, 'Kelly=', data%State%unitySignals%Kelly | |||
#endif | |||
!**call data%State%unitySignals%OnKellyChange%RunAll() | |||
end subroutine | |||
@@ -267,7 +267,7 @@ subroutine Set_Ibop(v) | |||
#endif | |||
data%State%unitySignals%Ibop = v | |||
#ifdef deb | |||
print*, 'Ibop=', data%State%unitySignals%Ibop | |||
if(print_log) print*, 'Ibop=', data%State%unitySignals%Ibop | |||
#endif | |||
!**call data%State%unitySignals%OnIbopChange%RunAll() | |||
end subroutine | |||
@@ -294,7 +294,7 @@ subroutine Set_FillupHead(v) | |||
endif | |||
#ifdef deb | |||
print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||
if(print_log) print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||
#endif | |||
!**call data%State%unitySignals%OnFillupHeadChange%RunAll() | |||
end subroutine | |||
@@ -343,7 +343,7 @@ subroutine Set_Elevator(v) | |||
#endif | |||
data%State%unitySignals%Elevator = v | |||
#ifdef deb | |||
print*, 'Elevator=', data%State%unitySignals%Elevator | |||
if(print_log) print*, 'Elevator=', data%State%unitySignals%Elevator | |||
#endif | |||
!**call data%State%unitySignals%OnElevatorChange%RunAll() | |||
end subroutine | |||
@@ -369,7 +369,7 @@ subroutine Set_MudBucket(v) | |||
call ToggleMudBox(.false.) | |||
endif | |||
#ifdef deb | |||
print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||
if(print_log) print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||
#endif | |||
!**call data%State%unitySignals%OnMudBucketChange%RunAll() | |||
end subroutine | |||
@@ -410,7 +410,7 @@ subroutine Set_TdsConnectionModes(v) | |||
endif | |||
#ifdef deb | |||
print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||
if(print_log) print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||
#endif | |||
!**call data%State%unitySignals%OnTdsConnectionModesChange%RunAll() | |||
end subroutine | |||
@@ -429,7 +429,7 @@ subroutine Evaluate_TdsConnectionModes() | |||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||
if(print_log) print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=3 | |||
if (Get_TdsStemIn() .and.& | |||
@@ -472,7 +472,7 @@ subroutine Evaluate_TdsConnectionModes() | |||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsConnectionModes=Kelly' | |||
if(print_log) print*, 'Evaluate_TdsConnectionModes=Kelly' | |||
#endif | |||
endif | |||
@@ -2,9 +2,20 @@ module UnitySignalVariables | |||
! use CVoidEventHandlerCollection | |||
! use CIntegerEventHandlerCollection | |||
enum, bind(c) | |||
enumerator SLIPS_NEUTRAL | |||
enumerator SLIPS_SET_BEGIN | |||
enumerator SLIPS_SET_END | |||
enumerator SLIPS_UNSET_BEGIN | |||
enumerator SLIPS_UNSET_END | |||
end enum | |||
type:: UnitySignalsType | |||
! used only in set and get (unitysignals.f90) | |||
integer :: MudBucket = 0 | |||
! used only in set and get (unitysignals.f90) and indirectly in Evaluate... | |||
integer :: Elevator = 0 | |||
! used only in set and get (unitysignals.f90) and indirectly in Evaluate... | |||
integer :: FillupHead = 0 | |||
integer :: Ibop = 0 | |||
integer :: Kelly = 0 | |||
@@ -12,7 +23,8 @@ module UnitySignalVariables | |||
integer :: OperationCondition = 0 | |||
integer :: SafetyValve = 0 | |||
integer :: operation = 0 | |||
integer :: Slips = 0 | |||
!previous value is 0 (neutral),set to unset_end by mahmood | |||
integer :: Slips = SLIPS_SET_END | |||
integer :: Slips_S = 0 | |||
integer :: Swing = 0 | |||
integer :: Swing_S = 0 | |||
@@ -24,7 +36,6 @@ module UnitySignalVariables | |||
integer :: Tong_S = 0 | |||
integer :: TdsConnectionModes = 0 | |||
integer :: TdsElevatorModes = 0 | |||
end type UnitySignalsType | |||
enum, bind(c) | |||
@@ -80,13 +91,7 @@ module UnitySignalVariables | |||
enumerator OPERATION_DRILL | |||
enumerator OPERATION_TRIP | |||
end enum | |||
enum, bind(c) | |||
enumerator SLIPS_NEUTRAL | |||
enumerator SLIPS_SET_BEGIN | |||
enumerator SLIPS_SET_END | |||
enumerator SLIPS_UNSET_BEGIN | |||
enumerator SLIPS_UNSET_END | |||
enum, bind(c) | |||
enumerator MOUSE_HOLE_NEUTRAL | |||
enumerator MOUSE_HOLE_FILL | |||
enumerator MOUSE_HOLE_EMPTY | |||
@@ -149,8 +149,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(AnnularWashPtr)) call AnnularWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AnnularWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AnnularWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AnnularWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AnnularWash_Execute' | |||
endsubroutine | |||
subroutine ChangeAnnularFail(status) | |||
@@ -177,8 +177,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(UpperRamWashPtr)) call UpperRamWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_UpperRamWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_UpperRamWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_UpperRamWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_UpperRamWash_Execute' | |||
endsubroutine | |||
subroutine ChangeUpperRamFail(status) | |||
@@ -204,8 +204,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(MiddleRamWashPtr)) call MiddleRamWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_MiddleRamWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_MiddleRamWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_MiddleRamWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_MiddleRamWash_Execute' | |||
endsubroutine | |||
subroutine ChangeMiddleRamFail(status) | |||
@@ -232,8 +232,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(LowerRamWashPtr)) call LowerRamWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_LowerRamWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_LowerRamWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_LowerRamWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_LowerRamWash_Execute' | |||
endsubroutine | |||
subroutine ChangeLowerRamFail(status) | |||
@@ -267,24 +267,24 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(AccumulatorPumpLeakPtr)) call AccumulatorPumpLeakPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AccumulatorPumpLeak_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AccumulatorPumpLeak_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AccumulatorPumpLeak_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AccumulatorPumpLeak_Execute' | |||
endsubroutine | |||
subroutine ChangeAccumulatorSystemFail(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(AccumulatorSystemFailPtr)) call AccumulatorSystemFailPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AccumulatorSystemFail_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AccumulatorSystemFail_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AccumulatorSystemFail_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AccumulatorSystemFail_Execute' | |||
endsubroutine | |||
subroutine ChangeAccumulatorSystemLeak(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(AccumulatorSystemLeakPtr)) call AccumulatorSystemLeakPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AccumulatorSystemLeak_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AccumulatorSystemLeak_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AccumulatorSystemLeak_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AccumulatorSystemLeak_Execute' | |||
endsubroutine | |||
end module CBopProblems |
@@ -150,8 +150,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(AnnularWashPtr)) call AnnularWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AnnularWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AnnularWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AnnularWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AnnularWash_Execute' | |||
endsubroutine | |||
subroutine ChangeAnnularFail(status) | |||
@@ -178,8 +178,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(UpperRamWashPtr)) call UpperRamWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_UpperRamWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_UpperRamWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_UpperRamWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_UpperRamWash_Execute' | |||
endsubroutine | |||
subroutine ChangeUpperRamFail(status) | |||
@@ -205,8 +205,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(MiddleRamWashPtr)) call MiddleRamWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_MiddleRamWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_MiddleRamWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_MiddleRamWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_MiddleRamWash_Execute' | |||
endsubroutine | |||
subroutine ChangeMiddleRamFail(status) | |||
@@ -233,8 +233,8 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! ! if(associated(LowerRamWashPtr)) call LowerRamWashPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_LowerRamWash_Clear' | |||
!if(status == Executed_StatusType) print*,'On_LowerRamWash_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_LowerRamWash_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_LowerRamWash_Execute' | |||
endsubroutine | |||
subroutine ChangeLowerRamFail(status) | |||
@@ -268,24 +268,24 @@ module CBopProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(AccumulatorPumpLeakPtr)) call AccumulatorPumpLeakPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AccumulatorPumpLeak_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AccumulatorPumpLeak_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AccumulatorPumpLeak_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AccumulatorPumpLeak_Execute' | |||
endsubroutine | |||
subroutine ChangeAccumulatorSystemFail(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(AccumulatorSystemFailPtr)) call AccumulatorSystemFailPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AccumulatorSystemFail_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AccumulatorSystemFail_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AccumulatorSystemFail_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AccumulatorSystemFail_Execute' | |||
endsubroutine | |||
subroutine ChangeAccumulatorSystemLeak(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(AccumulatorSystemLeakPtr)) call AccumulatorSystemLeakPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_AccumulatorSystemLeak_Clear' | |||
!if(status == Executed_StatusType) print*,'On_AccumulatorSystemLeak_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_AccumulatorSystemLeak_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_AccumulatorSystemLeak_Execute' | |||
endsubroutine | |||
end module CBopProblems |
@@ -225,8 +225,8 @@ use SimulationVariables !@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ManualChoke1Fail_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ManualChoke1Fail_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ManualChoke1Fail_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ManualChoke1Fail_Execute' | |||
endsubroutine | |||
subroutine ChangeManualChoke1Washout(status) | |||
@@ -256,8 +256,8 @@ use SimulationVariables !@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ManualChoke2Fail_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ManualChoke2Fail_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ManualChoke2Fail_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ManualChoke2Fail_Execute' | |||
endsubroutine | |||
subroutine ChangeManualChoke2Washout(status) | |||
@@ -226,8 +226,8 @@ use SimulationVariables !@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ManualChoke1Fail_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ManualChoke1Fail_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ManualChoke1Fail_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ManualChoke1Fail_Execute' | |||
endsubroutine | |||
subroutine ChangeManualChoke1Washout(status) | |||
@@ -257,8 +257,8 @@ use SimulationVariables !@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ManualChoke2Fail_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ManualChoke2Fail_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ManualChoke2Fail_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ManualChoke2Fail_Execute' | |||
endsubroutine | |||
subroutine ChangeManualChoke2Washout(status) | |||
@@ -75,24 +75,24 @@ module CDrillStemProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_StringDragIncrease_Clear' | |||
!if(status == Executed_StatusType) print*,'On_StringDragIncrease_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_StringDragIncrease_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_StringDragIncrease_Execute' | |||
endsubroutine | |||
subroutine ChangeStringTorqueIncrease(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_StringTorqueIncrease_Clear' | |||
!if(status == Executed_StatusType) print*,'On_StringTorqueIncrease_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_StringTorqueIncrease_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_StringTorqueIncrease_Execute' | |||
endsubroutine | |||
subroutine ChangeStringTorqueFluctuation(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_StringTorqueFluctuation_Clear' | |||
!if(status == Executed_StatusType) print*,'On_StringTorqueFluctuation_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_StringTorqueFluctuation_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_StringTorqueFluctuation_Execute' | |||
endsubroutine | |||
end module CDrillStemProblems |
@@ -76,24 +76,24 @@ module CDrillStemProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_StringDragIncrease_Clear' | |||
!if(status == Executed_StatusType) print*,'On_StringDragIncrease_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_StringDragIncrease_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_StringDragIncrease_Execute' | |||
endsubroutine | |||
subroutine ChangeStringTorqueIncrease(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_StringTorqueIncrease_Clear' | |||
!if(status == Executed_StatusType) print*,'On_StringTorqueIncrease_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_StringTorqueIncrease_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_StringTorqueIncrease_Execute' | |||
endsubroutine | |||
subroutine ChangeStringTorqueFluctuation(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_StringTorqueFluctuation_Clear' | |||
!if(status == Executed_StatusType) print*,'On_StringTorqueFluctuation_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_StringTorqueFluctuation_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_StringTorqueFluctuation_Execute' | |||
endsubroutine | |||
end module CDrillStemProblems |
@@ -262,8 +262,8 @@ use SimulationVariables !@@@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ReturnLineTemperature_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ReturnLineTemperature_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ReturnLineTemperature_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ReturnLineTemperature_Execute' | |||
endsubroutine | |||
subroutine ChangeTripTank(status) | |||
@@ -290,16 +290,16 @@ use SimulationVariables !@@@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(MudTankVolumePtr)) call MudTankVolumePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_MudTankVolume_Clear' | |||
!if(status == Executed_StatusType) print*,'On_MudTankVolume_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_MudTankVolume_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_MudTankVolume_Execute' | |||
endsubroutine | |||
subroutine ChangeReturnMudFlow(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ReturnMudFlow_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ReturnMudFlow_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ReturnMudFlow_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ReturnMudFlow_Execute' | |||
endsubroutine | |||
subroutine ChangeTorqueLimit(status) | |||
@@ -315,8 +315,8 @@ use SimulationVariables !@@@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(PowerLimitPtr)) call PowerLimitPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_PowerLimit_Clear' | |||
!if(status == Executed_StatusType) print*,'On_PowerLimit_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_PowerLimit_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_PowerLimit_Execute' | |||
endsubroutine | |||
subroutine ChangeAccumulatorPressure(status) | |||
@@ -263,8 +263,8 @@ use SimulationVariables !@@@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ReturnLineTemperature_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ReturnLineTemperature_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ReturnLineTemperature_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ReturnLineTemperature_Execute' | |||
endsubroutine | |||
subroutine ChangeTripTank(status) | |||
@@ -291,16 +291,16 @@ use SimulationVariables !@@@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(MudTankVolumePtr)) call MudTankVolumePtr(status) | |||
!if(status == Clear_StatusType) print*,'On_MudTankVolume_Clear' | |||
!if(status == Executed_StatusType) print*,'On_MudTankVolume_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_MudTankVolume_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_MudTankVolume_Execute' | |||
endsubroutine | |||
subroutine ChangeReturnMudFlow(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ReturnMudFlow_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ReturnMudFlow_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ReturnMudFlow_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ReturnMudFlow_Execute' | |||
endsubroutine | |||
subroutine ChangeTorqueLimit(status) | |||
@@ -316,8 +316,8 @@ use SimulationVariables !@@@ | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(PowerLimitPtr)) call PowerLimitPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_PowerLimit_Clear' | |||
!if(status == Executed_StatusType) print*,'On_PowerLimit_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_PowerLimit_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_PowerLimit_Execute' | |||
endsubroutine | |||
subroutine ChangeAccumulatorPressure(status) | |||
@@ -84,8 +84,8 @@ module CKickProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(data%problems%KickProblems%KickPtr)) call data%problems%KickProblems%KickPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Kick_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Kick_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Kick_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Kick_Execute' | |||
endsubroutine | |||
@@ -85,8 +85,8 @@ module CKickProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(data%problems%KickProblems%KickPtr)) call data%problems%KickProblems%KickPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Kick_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Kick_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Kick_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Kick_Execute' | |||
endsubroutine | |||
@@ -68,8 +68,8 @@ module CLostProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(LostCirculationPtr)) call LostCirculationPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_LostCirculation_Clear' | |||
!if(status == Executed_StatusType) print*,'On_LostCirculation_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_LostCirculation_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_LostCirculation_Execute' | |||
endsubroutine | |||
@@ -69,8 +69,8 @@ module CLostProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
! if(associated(LostCirculationPtr)) call LostCirculationPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_LostCirculation_Clear' | |||
!if(status == Executed_StatusType) print*,'On_LostCirculation_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_LostCirculation_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_LostCirculation_Execute' | |||
endsubroutine | |||
@@ -89,32 +89,32 @@ module CMudTreatmentProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(DegasserPtr)) call DegasserPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Degasser_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Degasser_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Degasser_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Degasser_Execute' | |||
endsubroutine | |||
subroutine ChangeShaleShaker(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(ShaleShakerPtr)) call ShaleShakerPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ShaleShaker_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ShaleShaker_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ShaleShaker_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ShaleShaker_Execute' | |||
endsubroutine | |||
subroutine ChangeDesander(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(DesanderPtr)) call DesanderPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Desander_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Desander_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Desander_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Desander_Execute' | |||
endsubroutine | |||
subroutine ChangeDesilter(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(DesilterPtr)) call DesilterPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Desilter_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Desilter_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Desilter_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Desilter_Execute' | |||
endsubroutine | |||
end module CMudTreatmentProblems |
@@ -90,32 +90,32 @@ module CMudTreatmentProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(DegasserPtr)) call DegasserPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Degasser_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Degasser_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Degasser_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Degasser_Execute' | |||
endsubroutine | |||
subroutine ChangeShaleShaker(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(ShaleShakerPtr)) call ShaleShakerPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_ShaleShaker_Clear' | |||
!if(status == Executed_StatusType) print*,'On_ShaleShaker_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_ShaleShaker_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_ShaleShaker_Execute' | |||
endsubroutine | |||
subroutine ChangeDesander(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(DesanderPtr)) call DesanderPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Desander_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Desander_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Desander_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Desander_Execute' | |||
endsubroutine | |||
subroutine ChangeDesilter(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(DesilterPtr)) call DesilterPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_Desilter_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Desilter_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Desilter_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Desilter_Execute' | |||
endsubroutine | |||
end module CMudTreatmentProblems |
@@ -125,16 +125,16 @@ module COtherProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(RigAlarmPtr)) call RigAlarmPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_RigAlarm_Clear' | |||
!if(status == Executed_StatusType) print*,'On_RigAlarm_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_RigAlarm_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_RigAlarm_Execute' | |||
endsubroutine | |||
subroutine ChangeRigWaterSupply(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_RigWaterSupply_Clear' | |||
!if(status == Executed_StatusType) print*,'On_RigWaterSupply_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_RigWaterSupply_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_RigWaterSupply_Execute' | |||
endsubroutine | |||
subroutine ChangeRigAir(status) | |||
@@ -150,64 +150,64 @@ module COtherProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen1Ptr)) call Gen1Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen1_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen1_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen1_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen1_Execute' | |||
endsubroutine | |||
subroutine ChangeGen2(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen2Ptr)) call Gen2Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen2_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen2_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen2_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen2_Execute' | |||
endsubroutine | |||
subroutine ChangeGen3(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen3Ptr)) call Gen3Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen3_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen3_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen3_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen3_Execute' | |||
endsubroutine | |||
subroutine ChangeGen4(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen4Ptr)) call Gen4Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen4_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen4_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen4_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen4_Execute' | |||
endsubroutine | |||
subroutine ChangeScr1(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr1Ptr)) call Scr1Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr1_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr1_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr1_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr1_Execute' | |||
endsubroutine | |||
subroutine ChangeScr2(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr2Ptr)) call Scr2Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr2_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr2_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr2_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr2_Execute' | |||
endsubroutine | |||
subroutine ChangeScr3(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr3Ptr)) call Scr3Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr3_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr3_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr3_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr3_Execute' | |||
endsubroutine | |||
subroutine ChangeScr4(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr4Ptr)) call Scr4Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr4_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr4_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr4_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr4_Execute' | |||
endsubroutine | |||
@@ -126,16 +126,16 @@ module COtherProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(RigAlarmPtr)) call RigAlarmPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_RigAlarm_Clear' | |||
!if(status == Executed_StatusType) print*,'On_RigAlarm_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_RigAlarm_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_RigAlarm_Execute' | |||
endsubroutine | |||
subroutine ChangeRigWaterSupply(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(status) | |||
!if(status == Clear_StatusType) print*,'On_RigWaterSupply_Clear' | |||
!if(status == Executed_StatusType) print*,'On_RigWaterSupply_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_RigWaterSupply_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_RigWaterSupply_Execute' | |||
endsubroutine | |||
subroutine ChangeRigAir(status) | |||
@@ -151,64 +151,64 @@ module COtherProblems | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen1Ptr)) call Gen1Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen1_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen1_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen1_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen1_Execute' | |||
endsubroutine | |||
subroutine ChangeGen2(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen2Ptr)) call Gen2Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen2_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen2_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen2_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen2_Execute' | |||
endsubroutine | |||
subroutine ChangeGen3(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen3Ptr)) call Gen3Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen3_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen3_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen3_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen3_Execute' | |||
endsubroutine | |||
subroutine ChangeGen4(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Gen4Ptr)) call Gen4Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Gen4_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Gen4_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Gen4_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Gen4_Execute' | |||
endsubroutine | |||
subroutine ChangeScr1(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr1Ptr)) call Scr1Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr1_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr1_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr1_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr1_Execute' | |||
endsubroutine | |||
subroutine ChangeScr2(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr2Ptr)) call Scr2Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr2_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr2_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr2_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr2_Execute' | |||
endsubroutine | |||
subroutine ChangeScr3(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr3Ptr)) call Scr3Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr3_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr3_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr3_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr3_Execute' | |||
endsubroutine | |||
subroutine ChangeScr4(status) | |||
implicit none | |||
integer, intent (in) :: status | |||
!if(associated(Scr4Ptr)) call Scr4Ptr(status) | |||
!if(status == Clear_StatusType) print*,'On_Scr4_Clear' | |||
!if(status == Executed_StatusType) print*,'On_Scr4_Execute' | |||
!if(status == Clear_StatusType) if(print_log) print*,'On_Scr4_Clear' | |||
!if(status == Executed_StatusType) if(print_log) print*,'On_Scr4_Execute' | |||
endsubroutine | |||
@@ -17,7 +17,7 @@ module BOP | |||
data%State%BopStackInput%BOP_timeCounter= data%State%BopStackInput%BOP_timeCounter + 1 | |||
write(*,*) 'BOP_timeCounter=' , data%State%BopStackInput%BOP_timeCounter | |||
! write(*,*) 'BOP_timeCounter=' , data%State%BopStackInput%BOP_timeCounter | |||
data%Equipments%BopControlPanel%AirSupplyPressureGauge= (1 - data%State%BopStackAcc%AirSupplyPressureGaugeMalf)* (1 - data%State%BopStackAcc%RigAirMalf) *120. !psi | |||
@@ -24,7 +24,7 @@ use SimulationVariables !@ | |||
implicit none | |||
INTEGER CHNUMBER | |||
IF(data%Equipments%ChokeControlPanel%ChokeSelectorSwitch== 1) THEN | |||
IF(data%Equipments%ChokeControlPanel%ChokeSelectorSwitch) THEN | |||
data%Equipments%ChokeControlPanel%Choke1LED=1 | |||
data%Equipments%ChokeControlPanel%Choke2LED=0 | |||
CHNUMBER=1 | |||
@@ -9,21 +9,41 @@ subroutine Drawworks_Direction | |||
IMPLICIT NONE | |||
if (data%State%Drawworks%Switch==1) then !Up | |||
! ! if (data%State%Drawworks%Switch==1) then !Up | |||
! if (data%State%Drawworks%Throttle >= 0.d0) then !Up | |||
! data%State%Drawworks%motion = +1 | |||
! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ? | |||
! data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s] | |||
! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] | |||
! ! else if (data%State%Drawworks%Switch==-1) then !Down | |||
! else if (data%State%Drawworks%Throttle < 0.d0) then !Down | |||
! data%State%Drawworks%motion = -1 | |||
! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ? | |||
! data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s] | |||
! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] | |||
! !else if (data%State%Drawworks%Switch==0) then !Off | |||
! ! data%State%Drawworks%motion = 0 | |||
! ! data%State%Drawworks%w_old_drum = 0.d0 | |||
! ! data%State%Drawworks%w_drum = 0.d0 | |||
! ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height | |||
! end if | |||
if ((data%State%Drawworks%Throttle>0.d0) .or. (data%State%Drawworks%Throttle==0.d0 .and. data%State%Drawworks%Speed/=0.d0 .and. data%State%Drawworks%motion==+1)) then !Up | |||
data%State%Drawworks%motion = +1 | |||
data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ? | |||
data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s] | |||
data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] | |||
else if (data%State%Drawworks%Switch==-1) then !Down | |||
else if ((data%State%Drawworks%Throttle<0.d0) .or. (data%State%Drawworks%Throttle==0.d0 .and. data%State%Drawworks%Speed/=0.d0 .and. data%State%Drawworks%motion==-1)) then !Down | |||
data%State%Drawworks%motion = -1 | |||
data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ? | |||
data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s] | |||
data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] | |||
!else if (data%State%Drawworks%Switch==0) then !Off | |||
! data%State%Drawworks%motion = 0 | |||
! data%State%Drawworks%w_old_drum = 0.d0 | |||
! data%State%Drawworks%w_drum = 0.d0 | |||
! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height | |||
else !fixed | |||
data%State%Drawworks%motion = 0 | |||
data%State%Drawworks%w_old_drum = 0.d0 | |||
data%State%Drawworks%w_drum = 0.d0 | |||
data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height | |||
end if | |||
@@ -39,8 +59,6 @@ subroutine Drawworks_Direction | |||
!if (data%State%Drawworks%Conv_Ratio==1.d0) then | |||
! | |||
! | |||
@@ -8,7 +8,7 @@ subroutine Drawworks_MainSolver | |||
Call Drawworks_Inputs | |||
if (data%State%Drawworks%Throttle<=0.d0) then | |||
if (data%State%Drawworks%Throttle==0.d0) then | |||
data%State%Drawworks%K_Throttle = 1 | |||
end if | |||
@@ -22,7 +22,7 @@ subroutine Drawworks_Solver | |||
!>>>>>>>>>>>>>>>>>>>> Speed <<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Drawworks%N_Throtle = data%State%Drawworks%Throttle ![rpm] | |||
data%State%Drawworks%N_Throtle = abs(data%State%Drawworks%Throttle) ![rpm] | |||
!data%State%Drawworks%N_Accelarator = (data%State%Drawworks%Acceleretor/100.d0)*965.d0 ![rpm] | |||
!IF (data%State%Drawworks%N_Throtle>data%State%Drawworks%N_Accelarator) THEN | |||
@@ -247,14 +247,6 @@ subroutine Drawworks_Solver | |||
end if | |||
return | |||
end if | |||
!=====> BottomHole ROP Condition | |||
if ( (int(data%State%Drawworks%TDDrillStemBottom*10000.d0)>=(int((data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax)*10000.d0))) .and. (data%State%Drawworks%motion==-1 .or. data%State%Drawworks%motion==0) ) then | |||
@@ -2555,12 +2555,12 @@ use SimulationVariables !@ | |||
if(Pump2_Lasts%Length() <= 0) cycle | |||
if(any(Pump2_Lasts%Array == Pump1_Lasts%Array(i))) then | |||
State2 = .true. ! Pumps 1 & 2 have same destination | |||
!print*, 'State2 = .true.' | |||
!if(print_log) print*, 'State2 = .true.' | |||
endif | |||
if(Pump3_Lasts%Length() <= 0) cycle | |||
if(any(Pump3_Lasts%Array == Pump1_Lasts%Array(i))) then | |||
State3 = .true. ! Pumps 1 & 3 have same destination | |||
!print*, 'State3 = .true.' | |||
!if(print_log) print*, 'State3 = .true.' | |||
endif | |||
enddo | |||
@@ -2569,12 +2569,12 @@ use SimulationVariables !@ | |||
if(Pump3_Lasts%Length() <= 0) cycle | |||
if(any(Pump3_Lasts%Array == Pump2_Lasts%Array(i))) then | |||
State4 = .true. ! Pumps 2 & 3 have same destination | |||
!print*, 'State4 = .true.' | |||
!if(print_log) print*, 'State4 = .true.' | |||
endif | |||
enddo | |||
State1 = State2 .and. State3 ! Pumps 1 & 2 & 3 have same destination | |||
!if(State1) print*, 'State1 = .true.' | |||
!if(State1) if(print_log) print*, 'State1 = .true.' | |||
end subroutine | |||
@@ -2650,18 +2650,18 @@ use SimulationVariables !@ | |||
!ThereIsPathFrom82 = .false. | |||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!ThereIsPathFrom83 = .false. | |||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!ThereIsPathFrom84 = .false. | |||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
ThereIsPathFrom_71_72_73_To_82 = .false. | |||
!print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
ThereIsPathFrom_71_72_73_To_83 = .false. | |||
!print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
ThereIsPathFrom_71_72_73_To_84 = .false. | |||
!print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
DumpFromKelly_Pump1 = .false. | |||
DumpFromFillupHead_Pump1 = .false. | |||
@@ -2728,55 +2728,55 @@ use SimulationVariables !@ | |||
if(valves(first) == 83) call Pump2_Lasts%Add(valves(last)) | |||
if(valves(first) == 84) call Pump3_Lasts%Add(valves(last)) | |||
!print*, '==============================================' | |||
!if(print_log) print*, '==============================================' | |||
!do i = 1, Pump1_Lasts%Length() | |||
! print*, 'mp1=', Pump1_Lasts%Array(i) | |||
! if(print_log) print*, 'mp1=', Pump1_Lasts%Array(i) | |||
!enddo | |||
! | |||
!print*, '-------------------------------' | |||
!if(print_log) print*, '-------------------------------' | |||
! | |||
!do i = 1, Pump2_Lasts%Length() | |||
! print*, 'mp2=', Pump2_Lasts%Array(i) | |||
! if(print_log) print*, 'mp2=', Pump2_Lasts%Array(i) | |||
!enddo | |||
! | |||
!print*, '-------------------------------' | |||
!if(print_log) print*, '-------------------------------' | |||
! | |||
! | |||
!do i = 1, Pump3_Lasts%Length() | |||
! print*, 'mp3=', Pump3_Lasts%Array(i) | |||
! if(print_log) print*, 'mp3=', Pump3_Lasts%Array(i) | |||
!enddo | |||
! | |||
!print*, '==============================================' | |||
!if(print_log) print*, '==============================================' | |||
!if(valves(first)==82 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | |||
! ThereIsPathFrom82 = .true. | |||
! !print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
! !if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!endif | |||
! | |||
!if(valves(first)==83 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | |||
! ThereIsPathFrom83 = .true. | |||
! !print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||
! !if(print_log) print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||
!endif | |||
! | |||
!if(valves(first)==84 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | |||
! ThereIsPathFrom84 = .true. | |||
! !print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||
! !if(print_log) print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||
!endif | |||
if(valves(last)==82 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | |||
ThereIsPathFrom_71_72_73_To_82 = .true. | |||
!print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
endif | |||
if(valves(last)==83 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | |||
ThereIsPathFrom_71_72_73_To_83 = .true. | |||
!print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
endif | |||
if(valves(last)==84 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | |||
ThereIsPathFrom_71_72_73_To_84 = .true. | |||
!print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
endif | |||
!if (.not.allocated(OpenPaths)) exit | |||
@@ -3031,7 +3031,7 @@ use SimulationVariables !@ | |||
if(valves(first)==83) then | |||
!DumpPump2=1 | |||
print*, "THERE IS DUMP" | |||
if(print_log) print*, "THERE IS DUMP" | |||
condition27 = .true. | |||
IF(any(valves == 56)) DumpFromKelly_Pump2 = .true. | |||
IF(any(valves == 14)) DumpFromFillupHead_Pump2 = .true. | |||
@@ -2556,12 +2556,12 @@ use SimulationVariables !@ | |||
if(Pump2_Lasts%Length() <= 0) cycle | |||
if(any(Pump2_Lasts%Array == Pump1_Lasts%Array(i))) then | |||
State2 = .true. ! Pumps 1 & 2 have same destination | |||
!print*, 'State2 = .true.' | |||
!if(print_log) print*, 'State2 = .true.' | |||
endif | |||
if(Pump3_Lasts%Length() <= 0) cycle | |||
if(any(Pump3_Lasts%Array == Pump1_Lasts%Array(i))) then | |||
State3 = .true. ! Pumps 1 & 3 have same destination | |||
!print*, 'State3 = .true.' | |||
!if(print_log) print*, 'State3 = .true.' | |||
endif | |||
enddo | |||
@@ -2570,12 +2570,12 @@ use SimulationVariables !@ | |||
if(Pump3_Lasts%Length() <= 0) cycle | |||
if(any(Pump3_Lasts%Array == Pump2_Lasts%Array(i))) then | |||
State4 = .true. ! Pumps 2 & 3 have same destination | |||
!print*, 'State4 = .true.' | |||
!if(print_log) print*, 'State4 = .true.' | |||
endif | |||
enddo | |||
State1 = State2 .and. State3 ! Pumps 1 & 2 & 3 have same destination | |||
!if(State1) print*, 'State1 = .true.' | |||
!if(State1) if(print_log) print*, 'State1 = .true.' | |||
end subroutine | |||
@@ -2651,18 +2651,18 @@ use SimulationVariables !@ | |||
!ThereIsPathFrom82 = .false. | |||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!ThereIsPathFrom83 = .false. | |||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!ThereIsPathFrom84 = .false. | |||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
ThereIsPathFrom_71_72_73_To_82 = .false. | |||
!print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
ThereIsPathFrom_71_72_73_To_83 = .false. | |||
!print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
ThereIsPathFrom_71_72_73_To_84 = .false. | |||
!print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
DumpFromKelly_Pump1 = .false. | |||
DumpFromFillupHead_Pump1 = .false. | |||
@@ -2729,55 +2729,55 @@ use SimulationVariables !@ | |||
if(valves(first) == 83) call Pump2_Lasts%Add(valves(last)) | |||
if(valves(first) == 84) call Pump3_Lasts%Add(valves(last)) | |||
!print*, '==============================================' | |||
!if(print_log) print*, '==============================================' | |||
!do i = 1, Pump1_Lasts%Length() | |||
! print*, 'mp1=', Pump1_Lasts%Array(i) | |||
! if(print_log) print*, 'mp1=', Pump1_Lasts%Array(i) | |||
!enddo | |||
! | |||
!print*, '-------------------------------' | |||
!if(print_log) print*, '-------------------------------' | |||
! | |||
!do i = 1, Pump2_Lasts%Length() | |||
! print*, 'mp2=', Pump2_Lasts%Array(i) | |||
! if(print_log) print*, 'mp2=', Pump2_Lasts%Array(i) | |||
!enddo | |||
! | |||
!print*, '-------------------------------' | |||
!if(print_log) print*, '-------------------------------' | |||
! | |||
! | |||
!do i = 1, Pump3_Lasts%Length() | |||
! print*, 'mp3=', Pump3_Lasts%Array(i) | |||
! if(print_log) print*, 'mp3=', Pump3_Lasts%Array(i) | |||
!enddo | |||
! | |||
!print*, '==============================================' | |||
!if(print_log) print*, '==============================================' | |||
!if(valves(first)==82 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | |||
! ThereIsPathFrom82 = .true. | |||
! !print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
! !if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||
!endif | |||
! | |||
!if(valves(first)==83 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | |||
! ThereIsPathFrom83 = .true. | |||
! !print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||
! !if(print_log) print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||
!endif | |||
! | |||
!if(valves(first)==84 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | |||
! ThereIsPathFrom84 = .true. | |||
! !print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||
! !if(print_log) print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||
!endif | |||
if(valves(last)==82 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | |||
ThereIsPathFrom_71_72_73_To_82 = .true. | |||
!print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_82=",ThereIsPathFrom_71_72_73_To_82 | |||
endif | |||
if(valves(last)==83 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | |||
ThereIsPathFrom_71_72_73_To_83 = .true. | |||
!print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_83=",ThereIsPathFrom_71_72_73_To_83 | |||
endif | |||
if(valves(last)==84 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | |||
ThereIsPathFrom_71_72_73_To_84 = .true. | |||
!print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
!if(print_log) print*, "ThereIsPathFrom_71_72_73_To_84=",ThereIsPathFrom_71_72_73_To_84 | |||
endif | |||
!if (.not.allocated(OpenPaths)) exit | |||
@@ -3032,7 +3032,7 @@ use SimulationVariables !@ | |||
if(valves(first)==83) then | |||
!DumpPump2=1 | |||
print*, "THERE IS DUMP" | |||
if(print_log) print*, "THERE IS DUMP" | |||
condition27 = .true. | |||
IF(any(valves == 56)) DumpFromKelly_Pump2 = .true. | |||
IF(any(valves == 14)) DumpFromFillupHead_Pump2 = .true. | |||
@@ -16,13 +16,13 @@ module MudSystemMain | |||
subroutine MudSystem_Stop | |||
implicit none | |||
!print* , 'MudSystem_Stop' | |||
!if(print_log) print* , 'MudSystem_Stop' | |||
CALL DEALLOCATE_ARRAYS_MudSystem() | |||
end subroutine MudSystem_Stop | |||
subroutine MudSystem_Init | |||
implicit none | |||
!print* , 'MudSystem_Start' | |||
!if(print_log) print* , 'MudSystem_Start' | |||
CALL MudSystem_StartUp() | |||
end subroutine MudSystem_Init | |||
@@ -30,7 +30,7 @@ module MudSystemMain | |||
use MudSystemModule | |||
use CManifolds | |||
implicit none | |||
!print* , 'MudSystem_Step' | |||
!if(print_log) print* , 'MudSystem_Step' | |||
!CALL main | |||
if(Manifold%IsTraverse) then | |||
call LineupAndPath() | |||
@@ -1628,14 +1628,14 @@ use SimulationVariables !@@@ | |||
!WellToChokeManifoldWasOpen | |||
data%State%MudSystem%SoundGasThroughChoke = 100 !100:chon dar adadhaye kamtar az 100 seda ghaat mishavad. eslah shavad.5.8.98 !int (min(ChokeLineFlowRate/2. , 100.)) | |||
print* , 'SoundGasThroughChoke1=', data%State%MudSystem%SoundGasThroughChoke | |||
if(print_log) print* , 'SoundGasThroughChoke1=', data%State%MudSystem%SoundGasThroughChoke | |||
!WRITE (*,*) 'WellToChokeManifoldWasOpen-Sound', WellToChokeManifoldWasOpen | |||
WRITE (*,*) 'WellToChokeManifoldOpen', data%State%MudSystem%WellToChokeManifoldOpen | |||
else | |||
data%State%MudSystem%SoundGasThroughChoke = 0 | |||
print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||
if(print_log) print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||
endif | |||
!print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||
!if(print_log) print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||
@@ -1629,14 +1629,14 @@ use SimulationVariables !@@@ | |||
!WellToChokeManifoldWasOpen | |||
data%State%MudSystem%SoundGasThroughChoke = 100 !100:chon dar adadhaye kamtar az 100 seda ghaat mishavad. eslah shavad.5.8.98 !int (min(ChokeLineFlowRate/2. , 100.)) | |||
print* , 'SoundGasThroughChoke1=', data%State%MudSystem%SoundGasThroughChoke | |||
if(print_log) print* , 'SoundGasThroughChoke1=', data%State%MudSystem%SoundGasThroughChoke | |||
!WRITE (*,*) 'WellToChokeManifoldWasOpen-Sound', WellToChokeManifoldWasOpen | |||
WRITE (*,*) 'WellToChokeManifoldOpen', data%State%MudSystem%WellToChokeManifoldOpen | |||
else | |||
data%State%MudSystem%SoundGasThroughChoke = 0 | |||
print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||
if(print_log) print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||
endif | |||
!print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||
!if(print_log) print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||
@@ -191,7 +191,7 @@ module PumpsMain | |||
! !! | |||
! !! Call DATE_AND_TIME(values=MP_END_TIME) | |||
! !! MP_SolDuration = 100-(MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) | |||
! !! !print*, 'MPtime=', MP_SolDuration | |||
! !! !if(print_log) print*, 'MPtime=', MP_SolDuration | |||
! !! if(MP_SolDuration > 0.0) then | |||
! !! Call sleepqq(MP_SolDuration) | |||
! !! end if | |||
@@ -192,7 +192,7 @@ module PumpsMain | |||
! !! | |||
! !! Call DATE_AND_TIME(values=MP_END_TIME) | |||
! !! MP_SolDuration = 100-(MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) | |||
! !! !print*, 'MPtime=', MP_SolDuration | |||
! !! !if(print_log) print*, 'MPtime=', MP_SolDuration | |||
! !! if(MP_SolDuration > 0.0) then | |||
! !! Call sleepqq(MP_SolDuration) | |||
! !! end if | |||