@@ -1,6 +1,19 @@ | |||||
{ | { | ||||
"version": "0.2.0", | "version": "0.2.0", | ||||
"configurations": [ | "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", | "name": "(gdb) Launch", | ||||
"type": "cppdbg", | "type": "cppdbg", | ||||
@@ -8,7 +21,8 @@ | |||||
"program": "${workspaceFolder}/a.out", | "program": "${workspaceFolder}/a.out", | ||||
"args": [], | "args": [], | ||||
"stopAtEntry": false, | "stopAtEntry": false, | ||||
"cwd": "${fileDirname}", | |||||
"cwd": "${workspaceFolder}", | |||||
#fileDirname | |||||
"environment": [], | "environment": [], | ||||
"externalConsole": false, | "externalConsole": false, | ||||
"MIMode": "gdb", | "MIMode": "gdb", | ||||
@@ -22,15 +36,16 @@ | |||||
"description": "Set Disassembly Flavor to Intel", | "description": "Set Disassembly Flavor to Intel", | ||||
"text": "-gdb-set disassembly-flavor intel", | "text": "-gdb-set disassembly-flavor intel", | ||||
"ignoreFailures": true | "ignoreFailures": true | ||||
} | |||||
] | |||||
}, | |||||
], | |||||
"preLaunchTask": "build" | |||||
}, | }, | ||||
{ | { | ||||
"name": "Debug (Liara)", | "name": "Debug (Liara)", | ||||
"type": "cppdbg", | "type": "cppdbg", | ||||
"request": "launch", | "request": "launch", | ||||
"program": "${workspaceRoot}/SimulationCore2", | "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, | "stopAtEntry": false, | ||||
"cwd": "${workspaceRoot}", | "cwd": "${workspaceRoot}", | ||||
"externalConsole": false, | "externalConsole": false, | ||||
@@ -42,7 +57,7 @@ | |||||
"type": "cppdbg", | "type": "cppdbg", | ||||
"request": "launch", | "request": "launch", | ||||
"program": "${workspaceRoot}/SimulationCore2", | "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, | "stopAtEntry": false, | ||||
"cwd": "${workspaceRoot}", | "cwd": "${workspaceRoot}", | ||||
"externalConsole": false, | "externalConsole": false, | ||||
@@ -1,5 +1,7 @@ | |||||
{ | { | ||||
"files.associations": { | "files.associations": { | ||||
"hiredis.h": "c" | |||||
"hiredis.h": "c", | |||||
"async.h": "c", | |||||
"libevent.h": "c" | |||||
} | } | ||||
} | } |
@@ -20,6 +20,24 @@ | |||||
"cwd": "${workspaceRoot}" | "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), intent(inout), target :: array(count) | ||||
type(CFluid), pointer :: item | type(CFluid), pointer :: item | ||||
data%Equipments%DownHole%AnnalusFluidsCount = count | data%Equipments%DownHole%AnnalusFluidsCount = count | ||||
print*, 'AnnalusFluidsCount = ', count | |||||
if(print_log) print*, 'AnnalusFluidsCount = ', count | |||||
if(size(data%Equipments%DownHole%AnnalusFluids) > 0) then | if(size(data%Equipments%DownHole%AnnalusFluids) > 0) then | ||||
deallocate(data%Equipments%DownHole%AnnalusFluids) | deallocate(data%Equipments%DownHole%AnnalusFluids) | ||||
end if | end if | ||||
@@ -73,22 +73,22 @@ module DownHoleModule | |||||
! call AnnalusMudCountPtr(AnnalusFluidsCount) | ! call AnnalusMudCountPtr(AnnalusFluidsCount) | ||||
!end if | !end if | ||||
if(.not.allocated(data%Equipments%DownHole%AnnalusFluids))allocate(data%Equipments%DownHole%AnnalusFluids(data%Equipments%DownHole%AnnalusFluidsCount)) | 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 | if(item%StartMd < 0) data%Equipments%DownHole%AnnalusFluids(1)%StartMd = 0 | ||||
do i = 1, count | do i = 1, count | ||||
item => array(i) | item => array(i) | ||||
data%Equipments%DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | data%Equipments%DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | ||||
if(i==1) data%Equipments%DownHole%AnnalusFluids(i)%StartMd = 0 | 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 | 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 | 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 | 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 | end do | ||||
!print*, '============END-AN============' | |||||
!if(print_log) print*, '============END-AN============' | |||||
!if(associated(AnnalusMudArrayPtr)) then | !if(associated(AnnalusMudArrayPtr)) then | ||||
! !AnnalusFluidsPtr => AnnalusFluids | ! !AnnalusFluidsPtr => AnnalusFluids | ||||
! call AnnalusMudArrayPtr(AnnalusFluids) | ! call AnnalusMudArrayPtr(AnnalusFluids) | ||||
@@ -103,7 +103,7 @@ module DownHoleModule | |||||
type(CFluid), intent(inout), target :: array(count) | type(CFluid), intent(inout), target :: array(count) | ||||
type(CFluid), pointer :: item | type(CFluid), pointer :: item | ||||
data%Equipments%DownHole%StringFluidsCount = count | data%Equipments%DownHole%StringFluidsCount = count | ||||
print*, 'StringFluidsCount = ', count | |||||
if(print_log) print*, 'StringFluidsCount = ', count | |||||
if(size(data%Equipments%DownHole%StringFluids) > 0) then | if(size(data%Equipments%DownHole%StringFluids) > 0) then | ||||
deallocate(data%Equipments%DownHole%StringFluids) | deallocate(data%Equipments%DownHole%StringFluids) | ||||
end if | end if | ||||
@@ -137,21 +137,21 @@ module DownHoleModule | |||||
! call StringMudCountPtr(count) | ! call StringMudCountPtr(count) | ||||
!end if | !end if | ||||
if(.not.allocated(data%Equipments%DownHole%StringFluids))allocate(data%Equipments%DownHole%StringFluids(data%Equipments%DownHole%StringFluidsCount)) | 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 | do i = 1, count | ||||
item => array(i) | item => array(i) | ||||
data%Equipments%DownHole%StringFluids(i + offset)%StartMd = item%StartMd | data%Equipments%DownHole%StringFluids(i + offset)%StartMd = item%StartMd | ||||
if(i==1) data%Equipments%DownHole%StringFluids(i)%StartMd = 0 | 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 | 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)%Density = item%Density | ||||
data%Equipments%DownHole%StringFluids(i + offset)%MudType = item%MudType | data%Equipments%DownHole%StringFluids(i + offset)%MudType = item%MudType | ||||
!print*, '----------------------------' | |||||
!if(print_log) print*, '----------------------------' | |||||
end do | end do | ||||
!!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | !!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | ||||
!!print*, '============END-ST============' | |||||
!!if(print_log) print*, '============END-ST============' | |||||
!if(associated(StringMudArrayPtr)) then | !if(associated(StringMudArrayPtr)) then | ||||
! call StringMudArrayPtr(StringFluids) | ! call StringMudArrayPtr(StringFluids) | ||||
!end if | !end if | ||||
@@ -175,7 +175,7 @@ module DownHoleModule | |||||
!end if | !end if | ||||
allocate(data%Equipments%DownHole%String(count)) | allocate(data%Equipments%DownHole%String(count)) | ||||
!j = 0 | !j = 0 | ||||
!print*, '============CMP-ST============' | |||||
!if(print_log) print*, '============CMP-ST============' | |||||
!call Log_3( '============CMP-ST============') | !call Log_3( '============CMP-ST============') | ||||
!do i = count, 1, -1 | !do i = count, 1, -1 | ||||
do i = 1, count | do i = 1, count | ||||
@@ -199,11 +199,11 @@ module DownHoleModule | |||||
if(item%ComponentType == 4) data%Equipments%DownHole%String(i)%ComponentType=1 | 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 == 2) data%Equipments%DownHole%String(i)%ComponentType=2 | ||||
if(item%ComponentType == 1) data%Equipments%DownHole%String(i)%ComponentType=3 | 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( 'item%ComponentType=', item%ComponentType) | ||||
!call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | !call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | ||||
@@ -212,7 +212,7 @@ module DownHoleModule | |||||
!call Log_3( '----------------------------') | !call Log_3( '----------------------------') | ||||
end do | end do | ||||
!!print*, '============CMP-ST============' | |||||
!!if(print_log) print*, '============CMP-ST============' | |||||
!!call Log_3( '============CMP-ST============') | !!call Log_3( '============CMP-ST============') | ||||
!if(associated(StringComponentArrayPtr)) then | !if(associated(StringComponentArrayPtr)) then | ||||
! call StringComponentArrayPtr(String) | ! call StringComponentArrayPtr(String) | ||||
@@ -53,7 +53,7 @@ module DownHoleModule | |||||
type(CFluid), intent(inout), target :: array(count) | type(CFluid), intent(inout), target :: array(count) | ||||
type(CFluid), pointer :: item | type(CFluid), pointer :: item | ||||
data%Equipments%DownHole%AnnalusFluidsCount = count | data%Equipments%DownHole%AnnalusFluidsCount = count | ||||
print*, 'AnnalusFluidsCount = ', count | |||||
if(print_log) print*, 'AnnalusFluidsCount = ', count | |||||
if(size(data%Equipments%DownHole%AnnalusFluids) > 0) then | if(size(data%Equipments%DownHole%AnnalusFluids) > 0) then | ||||
deallocate(data%Equipments%DownHole%AnnalusFluids) | deallocate(data%Equipments%DownHole%AnnalusFluids) | ||||
end if | end if | ||||
@@ -74,22 +74,22 @@ module DownHoleModule | |||||
! call AnnalusMudCountPtr(AnnalusFluidsCount) | ! call AnnalusMudCountPtr(AnnalusFluidsCount) | ||||
!end if | !end if | ||||
if(.not.allocated(data%Equipments%DownHole%AnnalusFluids))allocate(data%Equipments%DownHole%AnnalusFluids(data%Equipments%DownHole%AnnalusFluidsCount)) | 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 | if(item%StartMd < 0) data%Equipments%DownHole%AnnalusFluids(1)%StartMd = 0 | ||||
do i = 1, count | do i = 1, count | ||||
item => array(i) | item => array(i) | ||||
data%Equipments%DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | data%Equipments%DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | ||||
if(i==1) data%Equipments%DownHole%AnnalusFluids(i)%StartMd = 0 | 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 | 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 | 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 | 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 | end do | ||||
!print*, '============END-AN============' | |||||
!if(print_log) print*, '============END-AN============' | |||||
!if(associated(AnnalusMudArrayPtr)) then | !if(associated(AnnalusMudArrayPtr)) then | ||||
! !AnnalusFluidsPtr => AnnalusFluids | ! !AnnalusFluidsPtr => AnnalusFluids | ||||
! call AnnalusMudArrayPtr(AnnalusFluids) | ! call AnnalusMudArrayPtr(AnnalusFluids) | ||||
@@ -104,7 +104,7 @@ module DownHoleModule | |||||
type(CFluid), intent(inout), target :: array(count) | type(CFluid), intent(inout), target :: array(count) | ||||
type(CFluid), pointer :: item | type(CFluid), pointer :: item | ||||
data%Equipments%DownHole%StringFluidsCount = count | data%Equipments%DownHole%StringFluidsCount = count | ||||
print*, 'StringFluidsCount = ', count | |||||
if(print_log) print*, 'StringFluidsCount = ', count | |||||
if(size(data%Equipments%DownHole%StringFluids) > 0) then | if(size(data%Equipments%DownHole%StringFluids) > 0) then | ||||
deallocate(data%Equipments%DownHole%StringFluids) | deallocate(data%Equipments%DownHole%StringFluids) | ||||
end if | end if | ||||
@@ -138,21 +138,21 @@ module DownHoleModule | |||||
! call StringMudCountPtr(count) | ! call StringMudCountPtr(count) | ||||
!end if | !end if | ||||
if(.not.allocated(data%Equipments%DownHole%StringFluids))allocate(data%Equipments%DownHole%StringFluids(data%Equipments%DownHole%StringFluidsCount)) | 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 | do i = 1, count | ||||
item => array(i) | item => array(i) | ||||
data%Equipments%DownHole%StringFluids(i + offset)%StartMd = item%StartMd | data%Equipments%DownHole%StringFluids(i + offset)%StartMd = item%StartMd | ||||
if(i==1) data%Equipments%DownHole%StringFluids(i)%StartMd = 0 | 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 | 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)%Density = item%Density | ||||
data%Equipments%DownHole%StringFluids(i + offset)%MudType = item%MudType | data%Equipments%DownHole%StringFluids(i + offset)%MudType = item%MudType | ||||
!print*, '----------------------------' | |||||
!if(print_log) print*, '----------------------------' | |||||
end do | end do | ||||
!!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | !!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | ||||
!!print*, '============END-ST============' | |||||
!!if(print_log) print*, '============END-ST============' | |||||
!if(associated(StringMudArrayPtr)) then | !if(associated(StringMudArrayPtr)) then | ||||
! call StringMudArrayPtr(StringFluids) | ! call StringMudArrayPtr(StringFluids) | ||||
!end if | !end if | ||||
@@ -176,7 +176,7 @@ module DownHoleModule | |||||
!end if | !end if | ||||
allocate(data%Equipments%DownHole%String(count)) | allocate(data%Equipments%DownHole%String(count)) | ||||
!j = 0 | !j = 0 | ||||
!print*, '============CMP-ST============' | |||||
!if(print_log) print*, '============CMP-ST============' | |||||
!call Log_3( '============CMP-ST============') | !call Log_3( '============CMP-ST============') | ||||
!do i = count, 1, -1 | !do i = count, 1, -1 | ||||
do i = 1, count | do i = 1, count | ||||
@@ -200,11 +200,11 @@ module DownHoleModule | |||||
if(item%ComponentType == 4) data%Equipments%DownHole%String(i)%ComponentType=1 | 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 == 2) data%Equipments%DownHole%String(i)%ComponentType=2 | ||||
if(item%ComponentType == 1) data%Equipments%DownHole%String(i)%ComponentType=3 | 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( 'item%ComponentType=', item%ComponentType) | ||||
!call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | !call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | ||||
@@ -213,7 +213,7 @@ module DownHoleModule | |||||
!call Log_3( '----------------------------') | !call Log_3( '----------------------------') | ||||
end do | end do | ||||
!!print*, '============CMP-ST============' | |||||
!!if(print_log) print*, '============CMP-ST============' | |||||
!!call Log_3( '============CMP-ST============') | !!call Log_3( '============CMP-ST============') | ||||
!if(associated(StringComponentArrayPtr)) then | !if(associated(StringComponentArrayPtr)) then | ||||
! call StringComponentArrayPtr(String) | ! call StringComponentArrayPtr(String) | ||||
@@ -68,7 +68,6 @@ module CBopControlPanel | |||||
! call json%get(pval,data%Equipments%BopControlPanel%MiddleRamsStatus) | ! call json%get(pval,data%Equipments%BopControlPanel%MiddleRamsStatus) | ||||
! call json%get(p,'LowerRamsStatus',pval) | ! call json%get(p,'LowerRamsStatus',pval) | ||||
! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsStatus) | ! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsStatus) | ||||
call json%get(p,'AnnularRegulatorSetControl',pval) | call json%get(p,'AnnularRegulatorSetControl',pval) | ||||
call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl) | call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl) | ||||
! 2. get member of data type from node | ! 2. get member of data type from node | ||||
@@ -5,47 +5,24 @@ module CChokeControlPanel | |||||
public | public | ||||
contains | 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) | subroutine ChokeControlPanelToJson(parent) | ||||
@@ -16,7 +16,6 @@ module CDataDisplayConsole | |||||
call json%get(p,'ResetWob',pval) | call json%get(p,'ResetWob',pval) | ||||
call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob) | call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob) | ||||
call json%get(p,'TotalStrokeCounterResetSwitch',pval) | call json%get(p,'TotalStrokeCounterResetSwitch',pval) | ||||
call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch) | call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch) | ||||
@@ -291,7 +290,7 @@ module CDataDisplayConsole | |||||
data%Equipments%DataDisplayConsole%MP1SPM = v | data%Equipments%DataDisplayConsole%MP1SPM = v | ||||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||||
if(print_log) print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -302,7 +301,7 @@ module CDataDisplayConsole | |||||
data%Equipments%DataDisplayConsole%MP2SPM = v | data%Equipments%DataDisplayConsole%MP2SPM = v | ||||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||||
if(print_log) print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
end module CDataDisplayConsole | end module CDataDisplayConsole |
@@ -292,7 +292,7 @@ module CDataDisplayConsole | |||||
data%Equipments%DataDisplayConsole%MP1SPM = v | data%Equipments%DataDisplayConsole%MP1SPM = v | ||||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||||
if(print_log) print*, 'MP1SPMGauge=', data%Equipments%DataDisplayConsole%MP1SPMGauge | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -303,7 +303,7 @@ module CDataDisplayConsole | |||||
data%Equipments%DataDisplayConsole%MP2SPM = v | data%Equipments%DataDisplayConsole%MP2SPM = v | ||||
!@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%Equipments%DataDisplayConsole%MP1SPMGauge, data%Equipments%DataDisplayConsole%MP2SPMGauge) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||||
if(print_log) print*, 'MP2SPMGauge=', data%Equipments%DataDisplayConsole%MP2SPMGauge | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
end module CDataDisplayConsole | end module CDataDisplayConsole |
@@ -1,7 +1,6 @@ | |||||
module CDrillingConsole | module CDrillingConsole | ||||
use CDrillingConsoleVariables | use CDrillingConsoleVariables | ||||
use SimulationVariables | use SimulationVariables | ||||
use SimulationVariables | |||||
! use CSimulationVariables | ! use CSimulationVariables | ||||
use CLog4 | use CLog4 | ||||
use CLog3 | use CLog3 | ||||
@@ -63,8 +62,8 @@ module CDrillingConsole | |||||
if ( .not. found ) call logg(4,"Not found: DWTransmisionLever") | if ( .not. found ) call logg(4,"Not found: DWTransmisionLever") | ||||
call jsonfile%get('Equipments.Drilling.DWPowerLever',data%Equipments%DrillingConsole%DWPowerLever,found) | call jsonfile%get('Equipments.Drilling.DWPowerLever',data%Equipments%DrillingConsole%DWPowerLever,found) | ||||
if ( .not. found ) call logg(4,"Not found: DWPowerLever") | 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) | call jsonfile%get('Equipments.Drilling.RTTransmissionLever',data%Equipments%DrillingConsole%RTTransmissionLever,found) | ||||
if ( .not. found ) call logg(4,"Not found: RTTransmissionLever") | if ( .not. found ) call logg(4,"Not found: RTTransmissionLever") | ||||
call jsonfile%get('Equipments.Drilling.DWClutchLever',data%Equipments%DrillingConsole%DWClutchLever,found) | 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,"MP2Throttle",data%Equipments%DrillingConsole%MP2Throttle) | ||||
call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle) | call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle) | ||||
call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle) | call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle) | ||||
call json%add(parent,p) | call json%add(parent,p) | ||||
end subroutine | 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 | end module CDrillingConsole |
@@ -29,7 +29,7 @@ module CDrillingConsoleVariables | |||||
real(8) :: DWAcceleretor | real(8) :: DWAcceleretor | ||||
real(8) :: DWTransmisionLever | real(8) :: DWTransmisionLever | ||||
real(8) :: DWPowerLever | real(8) :: DWPowerLever | ||||
real(8) :: TongLever | |||||
! real(8) :: TongLever | |||||
real(8) :: RTTransmissionLever | real(8) :: RTTransmissionLever | ||||
real(8) :: DWClutchLever | real(8) :: DWClutchLever | ||||
real(8) :: EddyBreakLever | real(8) :: EddyBreakLever | ||||
@@ -107,7 +107,7 @@ end subroutine PathFinding_Step | |||||
#ifdef Log5 | #ifdef Log5 | ||||
CALL DATE_AND_TIME(values=EndTime) | CALL DATE_AND_TIME(values=EndTime) | ||||
Duration= EndTime(8) - StartTime(8) | Duration= EndTime(8) - StartTime(8) | ||||
!print*, 'Duration= ', Duration, 'ms' | |||||
!if(print_log) print*, 'Duration= ', Duration, 'ms' | |||||
call Log_5('Duration= ', Duration) | call Log_5('Duration= ', Duration) | ||||
call DisplayOpenPaths() | call DisplayOpenPaths() | ||||
@@ -703,7 +703,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(103)%AdjacentTo(127) | call Manifold%Valve(103)%AdjacentTo(127) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'KellyConnected()' | |||||
if(print_log) print*, 'KellyConnected()' | |||||
!call Log_3( 'KellyConnected()') | !call Log_3( 'KellyConnected()') | ||||
#endif | #endif | ||||
Manifold%IsPathsDirty = .true. | Manifold%IsPathsDirty = .true. | ||||
@@ -719,7 +719,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(127)%AdjacentTo(78) | call Manifold%Valve(127)%AdjacentTo(78) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'KellyDisconnected()' | |||||
if(print_log) print*, 'KellyDisconnected()' | |||||
!call Log_3( 'KellyDisconnected()') | !call Log_3( 'KellyDisconnected()') | ||||
#endif | #endif | ||||
@@ -764,7 +764,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(127)%AdjacentTo(56) | call Manifold%Valve(127)%AdjacentTo(56) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallSafetyValve_KellyMode()' | |||||
if(print_log) print*, 'InstallSafetyValve_KellyMode()' | |||||
#endif | #endif | ||||
data%Equipments%DrillingConsole%IRSafetyValveLed = 1 | data%Equipments%DrillingConsole%IRSafetyValveLed = 1 | ||||
@@ -790,7 +790,7 @@ end subroutine PathFinding_Step | |||||
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RemoveSafetyValve_KellyMode()' | |||||
if(print_log) print*, 'RemoveSafetyValve_KellyMode()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -804,7 +804,7 @@ end subroutine PathFinding_Step | |||||
call ChangeValve(56, Manifold%SafetyValve) | call ChangeValve(56, Manifold%SafetyValve) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OpenSafetyValve_KellyMode()' | |||||
if(print_log) print*, 'OpenSafetyValve_KellyMode()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -818,7 +818,7 @@ end subroutine PathFinding_Step | |||||
call ChangeValve(56, Manifold%SafetyValve) | call ChangeValve(56, Manifold%SafetyValve) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'CloseSafetyValve_KellyMode()' | |||||
if(print_log) print*, 'CloseSafetyValve_KellyMode()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -859,7 +859,7 @@ end subroutine PathFinding_Step | |||||
call OpenSafetyValve_TripMode() | call OpenSafetyValve_TripMode() | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallSafetyValve_TripMode()' | |||||
if(print_log) print*, 'InstallSafetyValve_TripMode()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -883,7 +883,7 @@ end subroutine PathFinding_Step | |||||
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RemoveSafetyValve_TripMode()' | |||||
if(print_log) print*, 'RemoveSafetyValve_TripMode()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -897,7 +897,7 @@ end subroutine PathFinding_Step | |||||
call ChangeValve(54, Manifold%SafetyValve) | call ChangeValve(54, Manifold%SafetyValve) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OpenSafetyValve_TripMode()' | |||||
if(print_log) print*, 'OpenSafetyValve_TripMode()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -911,7 +911,7 @@ end subroutine PathFinding_Step | |||||
call ChangeValve(54, Manifold%SafetyValve) | call ChangeValve(54, Manifold%SafetyValve) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'CloseSafetyValve_TripMode()' | |||||
if(print_log) print*, 'CloseSafetyValve_TripMode()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -946,7 +946,7 @@ end subroutine PathFinding_Step | |||||
call OpenSafetyValve_TopDrive() | call OpenSafetyValve_TopDrive() | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallSafetyValve_TopDrive()' | |||||
if(print_log) print*, 'InstallSafetyValve_TopDrive()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -970,7 +970,7 @@ end subroutine PathFinding_Step | |||||
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RemoveSafetyValve_TopDrive()' | |||||
if(print_log) print*, 'RemoveSafetyValve_TopDrive()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -983,7 +983,7 @@ end subroutine PathFinding_Step | |||||
Manifold%SafetyValve = .true. | Manifold%SafetyValve = .true. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OpenSafetyValve_TopDrive()' | |||||
if(print_log) print*, 'OpenSafetyValve_TopDrive()' | |||||
#endif | #endif | ||||
call ChangeValve(54, Manifold%SafetyValve) | call ChangeValve(54, Manifold%SafetyValve) | ||||
@@ -997,7 +997,7 @@ end subroutine PathFinding_Step | |||||
Manifold%SafetyValve = .false. | Manifold%SafetyValve = .false. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'CloseSafetyValve_TopDrive()' | |||||
if(print_log) print*, 'CloseSafetyValve_TopDrive()' | |||||
#endif | #endif | ||||
call ChangeValve(54, Manifold%SafetyValve) | call ChangeValve(54, Manifold%SafetyValve) | ||||
@@ -1025,7 +1025,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(124)%AdjacentTo(55) | call Manifold%Valve(124)%AdjacentTo(55) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallIBop()' | |||||
if(print_log) print*, 'InstallIBop()' | |||||
#endif | #endif | ||||
data%Equipments%DrillingConsole%IRIBopLed = 1 | data%Equipments%DrillingConsole%IRIBopLed = 1 | ||||
@@ -1046,7 +1046,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(124)%AdjacentTo(103) | call Manifold%Valve(124)%AdjacentTo(103) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RemoveIBop()' | |||||
if(print_log) print*, 'RemoveIBop()' | |||||
#endif | #endif | ||||
data%Equipments%DrillingConsole%IRIBopLed = 0 | data%Equipments%DrillingConsole%IRIBopLed = 0 | ||||
@@ -1060,7 +1060,7 @@ end subroutine PathFinding_Step | |||||
Manifold%IBop = .true. | Manifold%IBop = .true. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OpenIBop()' | |||||
if(print_log) print*, 'OpenIBop()' | |||||
#endif | #endif | ||||
call ChangeValve(55, Manifold%IBop) | call ChangeValve(55, Manifold%IBop) | ||||
@@ -1072,7 +1072,7 @@ end subroutine PathFinding_Step | |||||
Manifold%IBop = .false. | Manifold%IBop = .false. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'CloseIBop()' | |||||
if(print_log) print*, 'CloseIBop()' | |||||
#endif | #endif | ||||
call ChangeValve(55, Manifold%IBop) | call ChangeValve(55, Manifold%IBop) | ||||
@@ -1098,7 +1098,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(126)%AdjacentTo(68) | call Manifold%Valve(126)%AdjacentTo(68) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallKellyCock()' | |||||
if(print_log) print*, 'InstallKellyCock()' | |||||
#endif | #endif | ||||
call OpenKellyCock() | call OpenKellyCock() | ||||
@@ -1123,7 +1123,7 @@ end subroutine PathFinding_Step | |||||
data%Equipments%DrillingConsole%OpenKellyCockLed = 0 | data%Equipments%DrillingConsole%OpenKellyCockLed = 0 | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RemoveKellyCock()' | |||||
if(print_log) print*, 'RemoveKellyCock()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -1136,7 +1136,7 @@ end subroutine PathFinding_Step | |||||
Manifold%KellyCock = .true. | Manifold%KellyCock = .true. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OpenKellyCock()' | |||||
if(print_log) print*, 'OpenKellyCock()' | |||||
#endif | #endif | ||||
call ChangeValve(68, Manifold%KellyCock) | call ChangeValve(68, Manifold%KellyCock) | ||||
@@ -1150,7 +1150,7 @@ end subroutine PathFinding_Step | |||||
Manifold%KellyCock = .false. | Manifold%KellyCock = .false. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'CloseKellyCock()' | |||||
if(print_log) print*, 'CloseKellyCock()' | |||||
#endif | #endif | ||||
call ChangeValve(68, Manifold%KellyCock) | call ChangeValve(68, Manifold%KellyCock) | ||||
@@ -1178,7 +1178,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(70)%AdjacentTo(128) | call Manifold%Valve(70)%AdjacentTo(128) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallTopDriveIBop()' | |||||
if(print_log) print*, 'InstallTopDriveIBop()' | |||||
#endif | #endif | ||||
call OpenTopDriveIBop() | call OpenTopDriveIBop() | ||||
end subroutine | end subroutine | ||||
@@ -1197,7 +1197,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(128)%AdjacentTo(126) | call Manifold%Valve(128)%AdjacentTo(126) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RemoveTopDriveIBop()' | |||||
if(print_log) print*, 'RemoveTopDriveIBop()' | |||||
#endif | #endif | ||||
Manifold%TopDriveIBop = .false. | Manifold%TopDriveIBop = .false. | ||||
call ChangeValve(70, Manifold%TopDriveIBop) | call ChangeValve(70, Manifold%TopDriveIBop) | ||||
@@ -1209,7 +1209,7 @@ end subroutine PathFinding_Step | |||||
Manifold%TopDriveIBop = .true. | Manifold%TopDriveIBop = .true. | ||||
call ChangeValve(70, Manifold%TopDriveIBop) | call ChangeValve(70, Manifold%TopDriveIBop) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OpenTopDriveIBop()' | |||||
if(print_log) print*, 'OpenTopDriveIBop()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -1219,7 +1219,7 @@ end subroutine PathFinding_Step | |||||
Manifold%TopDriveIBop = .false. | Manifold%TopDriveIBop = .false. | ||||
call ChangeValve(70, Manifold%TopDriveIBop) | call ChangeValve(70, Manifold%TopDriveIBop) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'CloseTopDriveIBop()' | |||||
if(print_log) print*, 'CloseTopDriveIBop()' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -1244,7 +1244,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(69)%AdjacentTo(48) | call Manifold%Valve(69)%AdjacentTo(48) | ||||
call Manifold%Valve(79)%AdjacentTo(48) | call Manifold%Valve(79)%AdjacentTo(48) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallFloatValve()' | |||||
if(print_log) print*, 'InstallFloatValve()' | |||||
#endif | #endif | ||||
call OpenFloatValve() | call OpenFloatValve() | ||||
end subroutine | end subroutine | ||||
@@ -1262,7 +1262,7 @@ end subroutine PathFinding_Step | |||||
call Manifold%Valve(69)%AdjacentTo(79) | call Manifold%Valve(69)%AdjacentTo(79) | ||||
call Manifold%Valve(79)%AdjacentTo(69) | call Manifold%Valve(79)%AdjacentTo(69) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RemoveFloatValve()' | |||||
if(print_log) print*, 'RemoveFloatValve()' | |||||
#endif | #endif | ||||
Manifold%FloatValve = .false. | Manifold%FloatValve = .false. | ||||
call ChangeValve(48, Manifold%FloatValve) | call ChangeValve(48, Manifold%FloatValve) | ||||
@@ -1273,7 +1273,7 @@ end subroutine PathFinding_Step | |||||
if(.not.Manifold%IsFloatValveInstalled) return | if(.not.Manifold%IsFloatValveInstalled) return | ||||
Manifold%FloatValve = .true. | Manifold%FloatValve = .true. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OpenFloatValve()' | |||||
if(print_log) print*, 'OpenFloatValve()' | |||||
#endif | #endif | ||||
call ChangeValve(48, Manifold%FloatValve) | call ChangeValve(48, Manifold%FloatValve) | ||||
end subroutine | end subroutine | ||||
@@ -1283,7 +1283,7 @@ end subroutine PathFinding_Step | |||||
if(.not.Manifold%IsFloatValveInstalled) return | if(.not.Manifold%IsFloatValveInstalled) return | ||||
Manifold%FloatValve = .false. | Manifold%FloatValve = .false. | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'CloseFloatValve()' | |||||
if(print_log) print*, 'CloseFloatValve()' | |||||
#endif | #endif | ||||
call ChangeValve(48, Manifold%FloatValve) | call ChangeValve(48, Manifold%FloatValve) | ||||
end subroutine | end subroutine | ||||
@@ -1360,7 +1360,7 @@ end subroutine PathFinding_Step | |||||
endif | endif | ||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Valve(', i, ') = ', state | |||||
if(print_log) print*, 'Valve(', i, ') = ', state | |||||
#endif | #endif | ||||
!call Traverse() | !call Traverse() | ||||
Manifold%IsPathsDirty = .true. | Manifold%IsPathsDirty = .true. | ||||
@@ -92,7 +92,7 @@ | |||||
data%Equipments%Tank%ManualPumpPower = v | data%Equipments%Tank%ManualPumpPower = v | ||||
call ChangeValve(43, v) | call ChangeValve(43, v) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||||
if(print_log) print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -93,7 +93,7 @@ | |||||
data%Equipments%Tank%ManualPumpPower = v | data%Equipments%Tank%ManualPumpPower = v | ||||
call ChangeValve(43, v) | call ChangeValve(43, v) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||||
if(print_log) print*, 'ManualPumpPower=', data%Equipments%Tank%ManualPumpPower | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -1,12 +1,11 @@ | |||||
module COperationScenariosMain | module COperationScenariosMain | ||||
use CIActionReference | use CIActionReference | ||||
use UnitySignalsModule | |||||
implicit none | implicit none | ||||
public | public | ||||
! procedure (ActionVoid), pointer :: UpdateUnityPtr | |||||
contains | contains | ||||
subroutine OperationScenarios_Step | subroutine OperationScenarios_Step | ||||
! use CSimulationVariables | |||||
use OperationScenariosModule | use OperationScenariosModule | ||||
use CElevatorConnectionEnum | use CElevatorConnectionEnum | ||||
use CCloseKellyCockLedNotification | use CCloseKellyCockLedNotification | ||||
@@ -28,42 +27,23 @@ module COperationScenariosMain | |||||
use CRemoveFillupHeadPermission | use CRemoveFillupHeadPermission | ||||
use CRemoveMudBucketPermission | use CRemoveMudBucketPermission | ||||
use SoftwareInputsVariables | 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 UnityModule | ||||
use CElevatorEnum | |||||
! use CHeadEnum | |||||
use CIbopEnum | |||||
use CKellyEnum | |||||
use CMouseHoleEnum | |||||
! use CElevatorEnum | |||||
! use CIbopEnum | |||||
! use CKellyEnum | |||||
! use CMouseHoleEnum | |||||
use UnitySignalsModule | use UnitySignalsModule | ||||
use CSafetyValveEnum | |||||
use CSlipsEnum | |||||
use CSwingEnum | |||||
! use CSafetyValveEnum | |||||
! use CSlipsEnum | |||||
! use CSwingEnum | |||||
use CTongEnum | use CTongEnum | ||||
! use CStringUpdate | |||||
use CFlowPipeDisconnectEnum | |||||
! use CFlowPipeDisconnectEnum | |||||
use CFlowKellyDisconnectEnum | use CFlowKellyDisconnectEnum | ||||
use CFillupHeadPermission | use CFillupHeadPermission | ||||
use CSwingDrillPermission | use CSwingDrillPermission | ||||
use CSwingOffPermission | use CSwingOffPermission | ||||
use CSwingTiltPermission | use CSwingTiltPermission | ||||
! use CTdsStemJointHeight | |||||
! use UnitySignalsModule !for CTdsConnectionModesEnum | |||||
use CTdsElevatorModesEnum | use CTdsElevatorModesEnum | ||||
use CTdsSpineEnum | use CTdsSpineEnum | ||||
use CTdsSwingEnum | use CTdsSwingEnum | ||||
@@ -72,7 +52,8 @@ module COperationScenariosMain | |||||
use CTdsIbopLedNotification | use CTdsIbopLedNotification | ||||
use CTdsPowerLedNotification | use CTdsPowerLedNotification | ||||
use CTdsTorqueWrenchLedNotification | use CTdsTorqueWrenchLedNotification | ||||
use CElevatorConnectionEnum | |||||
implicit none | implicit none | ||||
call Evaluate_KellyConnection() | call Evaluate_KellyConnection() | ||||
@@ -99,22 +80,21 @@ module COperationScenariosMain | |||||
call Evaluate_RemoveMudBucketPermission() | call Evaluate_RemoveMudBucketPermission() | ||||
call Evaluate_MudBucket() | call Evaluate_MudBucket() | ||||
call Evaluate_Elevator() | |||||
! call Evaluate_Elevator() | |||||
call Evaluate_FillupHead() | 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_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 | !if(Get_FillMouseHoleLed()) then | ||||
! call Set_MouseHole(MOUSE_HOLE_FILL) | ! call Set_MouseHole(MOUSE_HOLE_FILL) | ||||
@@ -159,13 +139,13 @@ module COperationScenariosMain | |||||
! if(associated(UpdateUnityPtr)) call UpdateUnityPtr() | ! if(associated(UpdateUnityPtr)) call UpdateUnityPtr() | ||||
! end subroutine | ! end subroutine | ||||
subroutine Kelly_ConnectionNothing | |||||
subroutine Kelly_ConnectionNothing() bind (C,name="Kelly_ConnectionNothine") | |||||
use UnitySignalVariables | use UnitySignalVariables | ||||
use UnitySignalsModule | |||||
use CHook | use CHook | ||||
use SimulationVariables | use SimulationVariables | ||||
implicit none | implicit none | ||||
! call logg(4,"Kelly_ConnectionNothing started") | |||||
print *,"Kelly_ConnectionNothing started" | |||||
call Set_HookHeight(75.0) | call Set_HookHeight(75.0) | ||||
call sleep(1) | call sleep(1) | ||||
@@ -206,12 +186,13 @@ module COperationScenariosMain | |||||
! move to final hook height | ! move to final hook height | ||||
call Update_HookHeight_From_Snapshot() | call Update_HookHeight_From_Snapshot() | ||||
call sleep(3) | call sleep(3) | ||||
! call logg(4,"Kelly_ConnectionNothing end") | |||||
print *,"Kelly_ConnectionNothing end" | |||||
end subroutine Kelly_ConnectionNothing | end subroutine Kelly_ConnectionNothing | ||||
subroutine Kelly_ConnectionString | |||||
subroutine Kelly_ConnectionString() BIND(C,name='Kelly_ConnectionString') | |||||
use UnitySignalVariables | use UnitySignalVariables | ||||
use UnitySignalsModule | |||||
use CHook | use CHook | ||||
use SimulationVariables | use SimulationVariables | ||||
implicit none | implicit none | ||||
@@ -268,12 +249,8 @@ module COperationScenariosMain | |||||
end subroutine Kelly_ConnectionString | end subroutine Kelly_ConnectionString | ||||
subroutine Kelly_ConnectionSingle | |||||
! use CSwingEnumVariables | |||||
! use CSlipsEnumVariables | |||||
! use CTongEnumVariables | |||||
subroutine Kelly_ConnectionSingle() BIND(C,name='Kelly_ConnectionSingle') | |||||
use UnitySignalVariables | use UnitySignalVariables | ||||
use UnitySignalsModule | |||||
use CHook | use CHook | ||||
use SimulationVariables | use SimulationVariables | ||||
implicit none | implicit none | ||||
@@ -343,9 +320,8 @@ module COperationScenariosMain | |||||
end subroutine Kelly_ConnectionSingle | end subroutine Kelly_ConnectionSingle | ||||
subroutine Elevator_ConnectionNothing | |||||
subroutine Elevator_ConnectionNothing() BIND(C,name='Elevator_ConnectionNothing') | |||||
use UnitySignalVariables | use UnitySignalVariables | ||||
use UnitySignalsModule | |||||
use CHook | use CHook | ||||
use SimulationVariables | use SimulationVariables | ||||
implicit none | implicit none | ||||
@@ -155,7 +155,7 @@ module COperationScenariosSettings | |||||
subroutine SetDefaultValues() | subroutine SetDefaultValues() | ||||
use OperationScenariosModule | use OperationScenariosModule | ||||
use CHoistingVariables | use CHoistingVariables | ||||
use SimulationVariables!, only: data%Configuration%Hoisting%DriveType, TopDrive_DriveType | |||||
use SimulationVariables | |||||
use CManifolds, only: RemoveSafetyValve_TripMode, RemoveSafetyValve_KellyMode | use CManifolds, only: RemoveSafetyValve_TripMode, RemoveSafetyValve_KellyMode | ||||
implicit none | implicit none | ||||
@@ -26,11 +26,13 @@ module COperationScenariosVariables | |||||
enumerator STRING_UPDATE_ADD_STAND | enumerator STRING_UPDATE_ADD_STAND | ||||
enumerator STRING_UPDATE_REMOVE_SINGLE | enumerator STRING_UPDATE_REMOVE_SINGLE | ||||
enumerator STRING_UPDATE_REMOVE_STAND | enumerator STRING_UPDATE_REMOVE_STAND | ||||
end enum | |||||
enum, bind(c) | |||||
enumerator KELLY_CONNECTION_NOTHING | enumerator KELLY_CONNECTION_NOTHING | ||||
enumerator KELLY_CONNECTION_STRING | enumerator KELLY_CONNECTION_STRING | ||||
enumerator KELLY_CONNECTION_SINGLE | enumerator KELLY_CONNECTION_SINGLE | ||||
end enum | |||||
enum, bind(c) | |||||
enumerator ELEVATOR_CONNECTION_NOTHING | enumerator ELEVATOR_CONNECTION_NOTHING | ||||
enumerator ELEVATOR_CONNECTION_STRING | enumerator ELEVATOR_CONNECTION_STRING | ||||
enumerator ELEVATOR_CONNECTION_STAND | enumerator ELEVATOR_CONNECTION_STAND | ||||
@@ -2,18 +2,12 @@ module OperationScenariosModule | |||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||||
!! Paseted From ....Variables.f90 | !! Paseted From ....Variables.f90 | ||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||||
! use OperationScenariosModule ! | |||||
! use OperationScenariosModule !!CElevator... | |||||
! use COperationScenariosVariables | |||||
use SimulationVariables | use SimulationVariables | ||||
use PermissionsModule | use PermissionsModule | ||||
! use SoftwareInputsVariables | |||||
! use CUnityInputs | |||||
use UnityModule | use UnityModule | ||||
use UnitySignalVariables | use UnitySignalVariables | ||||
use UnitySignalsModule | use UnitySignalsModule | ||||
use PermissionsModule | use PermissionsModule | ||||
! use CTdsElevatorModesEnumVariables ! | |||||
use CHoistingVariables | use CHoistingVariables | ||||
use CTopDrivePanelVariables | use CTopDrivePanelVariables | ||||
use NotificationModule | use NotificationModule | ||||
@@ -57,7 +51,7 @@ module OperationScenariosModule | |||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||||
if(print_log) print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||||
#endif | #endif | ||||
!**call data%State%OperationScenario%OnKellyConnectionChange%RunAll() | !**call data%State%OperationScenario%OnKellyConnectionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -71,12 +65,12 @@ module OperationScenariosModule | |||||
implicit none | implicit none | ||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_KellyConnection=TopDrive' | |||||
if(print_log) print*, 'Evaluate_KellyConnection=TopDrive' | |||||
#endif | #endif | ||||
endif | endif | ||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_KellyConnection=Kelly' | |||||
if(print_log) print*, 'Evaluate_KellyConnection=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=1 | !OPERATION-CODE=1 | ||||
@@ -183,14 +177,14 @@ module OperationScenariosModule | |||||
subroutine ButtonPress_Breakout() | subroutine ButtonPress_Breakout() | ||||
implicit none | implicit none | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'ButtonPress_Breakout on ======> CKellyConnectionEnum' | |||||
if(print_log) print*, 'ButtonPress_Breakout on ======> CKellyConnectionEnum' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
subroutine ButtonPress_Makeup() | subroutine ButtonPress_Makeup() | ||||
implicit none | implicit none | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'ButtonPress_Makeup on ======> CKellyConnectionEnum' | |||||
if(print_log) print*, 'ButtonPress_Makeup on ======> CKellyConnectionEnum' | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -236,7 +230,7 @@ module OperationScenariosModule | |||||
data%State%OperationScenario%ElevatorConnection = v | data%State%OperationScenario%ElevatorConnection = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||||
if(print_log) print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||||
#endif | #endif | ||||
!**call data%State%OperationScenario%OnElevatorConnectionChange%RunAll() | !**call data%State%OperationScenario%OnElevatorConnectionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -246,4 +240,73 @@ module OperationScenariosModule | |||||
Get_ElevatorConnection = data%State%OperationScenario%ElevatorConnection | Get_ElevatorConnection = data%State%OperationScenario%ElevatorConnection | ||||
end function | 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 | end module OperationScenariosModule |
@@ -58,7 +58,7 @@ module OperationScenariosModule | |||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||||
if(print_log) print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||||
#endif | #endif | ||||
!**call data%State%OperationScenario%OnKellyConnectionChange%RunAll() | !**call data%State%OperationScenario%OnKellyConnectionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -72,12 +72,12 @@ module OperationScenariosModule | |||||
implicit none | implicit none | ||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_KellyConnection=TopDrive' | |||||
if(print_log) print*, 'Evaluate_KellyConnection=TopDrive' | |||||
#endif | #endif | ||||
endif | endif | ||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_KellyConnection=Kelly' | |||||
if(print_log) print*, 'Evaluate_KellyConnection=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=1 | !OPERATION-CODE=1 | ||||
@@ -235,7 +235,7 @@ module OperationScenariosModule | |||||
data%State%OperationScenario%ElevatorConnection = v | data%State%OperationScenario%ElevatorConnection = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||||
if(print_log) print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||||
#endif | #endif | ||||
!**call data%State%OperationScenario%OnElevatorConnectionChange%RunAll() | !**call data%State%OperationScenario%OnElevatorConnectionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -14,7 +14,7 @@ module CElevatorConnectionEnum | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_ElevatorConnection=TopDrive' | |||||
if(print_log) print*, 'Evaluate_ElevatorConnection=TopDrive' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -28,7 +28,7 @@ module CElevatorConnectionEnum | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ElevatorConnection=Kelly' | |||||
if(print_log) print*, 'ElevatorConnection=Kelly' | |||||
#endif | #endif | ||||
!!OPERATION-CODE=83 | !!OPERATION-CODE=83 | ||||
@@ -344,7 +344,7 @@ module CElevatorConnectionEnum | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_Latch_ElevatorConnection=TopDrive' | |||||
if(print_log) print*, 'ButtonPress_Latch_ElevatorConnection=TopDrive' | |||||
#endif | #endif | ||||
@@ -416,7 +416,7 @@ module CElevatorConnectionEnum | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_Latch_ElevatorConnection=Kelly' | |||||
if(print_log) print*, 'ButtonPress_Latch_ElevatorConnection=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=86 | !OPERATION-CODE=86 | ||||
@@ -487,7 +487,7 @@ module CElevatorConnectionEnum | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_Unlatch_ElevatorConnection=TopDrive' | |||||
if(print_log) print*, 'ButtonPress_Unlatch_ElevatorConnection=TopDrive' | |||||
#endif | #endif | ||||
@@ -555,7 +555,7 @@ module CElevatorConnectionEnum | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_Unlatch_ElevatorConnection=Kelly' | |||||
if(print_log) print*, 'ButtonPress_Unlatch_ElevatorConnection=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=89 | !OPERATION-CODE=89 | ||||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | if (Get_OperationCondition() == OPERATION_TRIP .and.& | ||||
@@ -10,7 +10,7 @@ module CTdsElevatorModesEnum | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsElevatorModes=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TdsElevatorModes=TopDrive' | |||||
#endif | #endif | ||||
@@ -314,7 +314,7 @@ module CTdsElevatorModesEnum | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsElevatorModes=Kelly' | |||||
if(print_log) print*, 'Evaluate_TdsElevatorModes=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -9,7 +9,7 @@ module CCloseKellyCockLedNotification | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -24,7 +24,7 @@ module CCloseKellyCockLedNotification | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -45,13 +45,13 @@ module CCloseKellyCockLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||||
#endif | #endif | ||||
endif | endif | ||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=66 | !OPERATION-CODE=66 | ||||
@@ -10,7 +10,7 @@ module CCloseKellyCockLedNotification | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -25,7 +25,7 @@ module CCloseKellyCockLedNotification | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -9,7 +9,7 @@ module CCloseSafetyValveLedNotification | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -23,7 +23,7 @@ module CCloseSafetyValveLedNotification | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -47,7 +47,7 @@ module CCloseSafetyValveLedNotification | |||||
#endif | #endif | ||||
data%State%notifications%operation_CloseSafetyValveLed = v | data%State%notifications%operation_CloseSafetyValveLed = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'operation_CloseSafetyValveLed=', data%State%notifications%operation_CloseSafetyValveLed | |||||
if(print_log) print*, 'operation_CloseSafetyValveLed=', data%State%notifications%operation_CloseSafetyValveLed | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -59,7 +59,7 @@ module CCloseSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -86,7 +86,7 @@ module CCloseSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=59 | !OPERATION-CODE=59 | ||||
@@ -12,7 +12,7 @@ module CIrIBopLedNotification | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_IrIBopLed=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_IrIBopLed=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -25,7 +25,7 @@ module CIrIBopLedNotification | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_IrIBopLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_IrIBopLed=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -51,7 +51,7 @@ module CIrIBopLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrIBopLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_IrIBopLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -89,7 +89,7 @@ module CIrIBopLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrIBopLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_IrIBopLed=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=63 | !OPERATION-CODE=63 | ||||
@@ -13,7 +13,7 @@ module CIrIBopLedNotification | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_IrIBopLed=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_IrIBopLed=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -26,7 +26,7 @@ module CIrIBopLedNotification | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_IrIBopLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_IrIBopLed=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -13,7 +13,7 @@ module CIrSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -33,7 +33,7 @@ module CIrSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=56 | !OPERATION-CODE=56 | ||||
@@ -79,7 +79,7 @@ module CIrSafetyValveLedNotification | |||||
#endif | #endif | ||||
data%State%notifications%operation_IrSafetyValveLed = v | data%State%notifications%operation_IrSafetyValveLed = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'operation_IrSafetyValveLed=', data%State%notifications%operation_IrSafetyValveLed | |||||
if(print_log) print*, 'operation_IrSafetyValveLed=', data%State%notifications%operation_IrSafetyValveLed | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -91,7 +91,7 @@ module CIrSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -130,7 +130,7 @@ module CIrSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=54 | !OPERATION-CODE=54 | ||||
@@ -13,7 +13,7 @@ module CLatchLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_LatchLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_LatchLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -108,7 +108,7 @@ module CLatchLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_LatchLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_LatchLed=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=36 | !OPERATION-CODE=36 | ||||
@@ -9,12 +9,12 @@ module COpenKellyCockLedNotification | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_OpenKellyCockLed=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_OpenKellyCockLed=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_OpenKellyCockLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_OpenKellyCockLed=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -36,7 +36,7 @@ module COpenKellyCockLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_OpenKellyCock=TopDrive' | |||||
if(print_log) print*, 'ButtonPress_OpenKellyCock=TopDrive' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -45,7 +45,7 @@ module COpenKellyCockLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_OpenKellyCock=Kelly' | |||||
if(print_log) print*, 'ButtonPress_OpenKellyCock=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=65 | !OPERATION-CODE=65 | ||||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | if (Get_OperationCondition() == OPERATION_DRILL .and.& | ||||
@@ -10,7 +10,7 @@ module COpenSafetyValveLedNotification | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_OpenSafetyValveLed=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_OpenSafetyValveLed=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -23,7 +23,7 @@ module COpenSafetyValveLedNotification | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_OpenSafetyValveLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_OpenSafetyValveLed=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -49,7 +49,7 @@ module COpenSafetyValveLedNotification | |||||
#endif | #endif | ||||
data%State%notifications%operation_OpenSafetyValveLed = v | data%State%notifications%operation_OpenSafetyValveLed = v | ||||
#ifdef deb | #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 | #endif | ||||
end subroutine | end subroutine | ||||
@@ -60,7 +60,7 @@ module COpenSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_OpenSafetyValve=TopDrive' | |||||
if(print_log) print*, 'ButtonPress_OpenSafetyValve=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=56 | !TOPDRIVE-CODE=56 | ||||
@@ -84,7 +84,7 @@ module COpenSafetyValveLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'ButtonPress_OpenSafetyValve=Kelly' | |||||
if(print_log) print*, 'ButtonPress_OpenSafetyValve=Kelly' | |||||
#endif | #endif | ||||
@@ -11,7 +11,7 @@ module CSlipsNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SlipsNotification=TopDrive' | |||||
if(print_log) print*, 'Evaluate_SlipsNotification=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=28 | !TOPDRIVE-CODE=28 | ||||
@@ -54,7 +54,7 @@ module CSlipsNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SlipsNotification=Kelly' | |||||
if(print_log) print*, 'Evaluate_SlipsNotification=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=53 | !OPERATION-CODE=53 | ||||
@@ -13,7 +13,7 @@ module CSwingLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SwingLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_SwingLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -30,7 +30,7 @@ module CSwingLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SwingLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_SwingLed=Kelly' | |||||
#endif | #endif | ||||
@@ -10,7 +10,7 @@ module CTdsIbopLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IbopLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_IbopLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -54,7 +54,7 @@ module CTdsIbopLedNotification | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_IbopLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_IbopLed=Kelly' | |||||
!#endif | !#endif | ||||
! | ! | ||||
! endif | ! endif | ||||
@@ -54,7 +54,7 @@ module CTdsIbopLedNotification | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_IbopLed=Kelly' | |||||
! if(print_log) print*, 'Evaluate_IbopLed=Kelly' | |||||
!#endif | !#endif | ||||
! | ! | ||||
! endif | ! endif | ||||
@@ -11,7 +11,7 @@ module CTdsPowerLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_PowerLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_PowerLed=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=63 | !TOPDRIVE-CODE=63 | ||||
@@ -31,7 +31,7 @@ module CTdsPowerLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_PowerLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_PowerLed=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -8,7 +8,7 @@ module CTdsTorqueWrenchLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TorqueWrenchLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TorqueWrenchLed=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=81 | !TOPDRIVE-CODE=81 | ||||
@@ -41,7 +41,7 @@ module CTdsTorqueWrenchLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SwingLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_SwingLed=Kelly' | |||||
#endif | #endif | ||||
@@ -11,13 +11,8 @@ module CTongNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | 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 | !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.& | 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.& | (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 | return | ||||
end if | end if | ||||
!TOPDRIVE-CODE=51 | !TOPDRIVE-CODE=51 | ||||
if (GetRotaryRpm() == 0.0d0 .and.& | 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.) | call Set_TongNotification(.true.) | ||||
return | return | ||||
end if | end if | ||||
!TOPDRIVE-CODE=52 | !TOPDRIVE-CODE=52 | ||||
if (GetRotaryRpm() == 0.0d0 .and.& | 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.) | call Set_TongNotification(.true.) | ||||
return | return | ||||
end if | end if | ||||
endif | endif | ||||
@@ -88,7 +65,7 @@ module CTongNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TongNotification=Kelly' | |||||
if(print_log) print*, 'Evaluate_TongNotification=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=44 | !OPERATION-CODE=44 | ||||
@@ -250,13 +227,11 @@ module CTongNotification | |||||
! call Set_TongNotification(.true.) | ! call Set_TongNotification(.true.) | ||||
! return | ! return | ||||
!end if | !end if | ||||
! | |||||
! | |||||
call Set_TongNotification(.false.) | call Set_TongNotification(.false.) | ||||
endif | endif | ||||
call Set_TongNotification(.true.) | |||||
@@ -12,7 +12,7 @@ module CUnlatchLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_UnlatchLed=TopDrive' | |||||
if(print_log) print*, 'Evaluate_UnlatchLed=TopDrive' | |||||
#endif | #endif | ||||
@@ -95,7 +95,7 @@ module CUnlatchLedNotification | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_UnlatchLed=Kelly' | |||||
if(print_log) print*, 'Evaluate_UnlatchLed=Kelly' | |||||
#endif | #endif | ||||
@@ -37,7 +37,7 @@ contains | |||||
data%State%notifications%TongNotification = v | data%State%notifications%TongNotification = v | ||||
! if(associated(data%State%notifications%TongNotificationPtr)) !**call data%State%notifications%TongNotificationPtr(data%State%notifications%TongNotification) | ! if(associated(data%State%notifications%TongNotificationPtr)) !**call data%State%notifications%TongNotificationPtr(data%State%notifications%TongNotification) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||||
if(print_log) print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||||
#endif | #endif | ||||
!**call data%State%notifications%OnTongNotificationChange%RunAll() | !**call data%State%notifications%OnTongNotificationChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -153,7 +153,7 @@ contains | |||||
data%State%notifications%SlipsNotification = v | data%State%notifications%SlipsNotification = v | ||||
! if(associated(data%State%notifications%SlipsNotificationPtr)) !**call data%State%notifications%SlipsNotificationPtr(data%State%notifications%SlipsNotification) | ! if(associated(data%State%notifications%SlipsNotificationPtr)) !**call data%State%notifications%SlipsNotificationPtr(data%State%notifications%SlipsNotification) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||||
if(print_log) print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||||
#endif | #endif | ||||
!**call data%State%notifications%OnSlipsNotificationChange%RunAll() | !**call data%State%notifications%OnSlipsNotificationChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -38,7 +38,7 @@ contains | |||||
data%State%notifications%TongNotification = v | data%State%notifications%TongNotification = v | ||||
! if(associated(data%State%notifications%TongNotificationPtr)) !**call data%State%notifications%TongNotificationPtr(data%State%notifications%TongNotification) | ! if(associated(data%State%notifications%TongNotificationPtr)) !**call data%State%notifications%TongNotificationPtr(data%State%notifications%TongNotification) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||||
if(print_log) print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||||
#endif | #endif | ||||
!**call data%State%notifications%OnTongNotificationChange%RunAll() | !**call data%State%notifications%OnTongNotificationChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -154,7 +154,7 @@ contains | |||||
data%State%notifications%SlipsNotification = v | data%State%notifications%SlipsNotification = v | ||||
! if(associated(data%State%notifications%SlipsNotificationPtr)) !**call data%State%notifications%SlipsNotificationPtr(data%State%notifications%SlipsNotification) | ! if(associated(data%State%notifications%SlipsNotificationPtr)) !**call data%State%notifications%SlipsNotificationPtr(data%State%notifications%SlipsNotification) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||||
if(print_log) print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||||
#endif | #endif | ||||
!**call data%State%notifications%OnSlipsNotificationChange%RunAll() | !**call data%State%notifications%OnSlipsNotificationChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -10,7 +10,7 @@ module CFillupHeadPermission | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_FillupHeadPermission=TopDrive' | |||||
if(print_log) print*, 'Evaluate_FillupHeadPermission=TopDrive' | |||||
#endif | #endif | ||||
@@ -39,7 +39,7 @@ module CFillupHeadPermission | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_FillupHeadPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_FillupHeadPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -12,7 +12,7 @@ module CInstallFillupHeadPermission | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_InstallFillupHeadPermission=TopDrive' | |||||
if(print_log) print*, 'Evaluate_InstallFillupHeadPermission=TopDrive' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -26,7 +26,7 @@ module CInstallFillupHeadPermission | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_InstallFillupHeadPermission=Kelly' | |||||
if(print_log) print*, 'Evaluate_InstallFillupHeadPermission=Kelly' | |||||
#endif | #endif | ||||
@@ -9,7 +9,7 @@ module CInstallMudBucketPermission | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_InstallMudBucketPermission=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_InstallMudBucketPermission=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -21,7 +21,7 @@ module CInstallMudBucketPermission | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_InstallMudBucketPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_InstallMudBucketPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -12,7 +12,7 @@ module CIrIbopPermission | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrIbopPermission=TopDrive' | |||||
if(print_log) print*, 'Evaluate_IrIbopPermission=TopDrive' | |||||
#endif | #endif | ||||
@@ -42,7 +42,7 @@ module CIrIbopPermission | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrIbopPermission=Kelly' | |||||
if(print_log) print*, 'Evaluate_IrIbopPermission=Kelly' | |||||
#endif | #endif | ||||
!OPERATION-CODE=62 | !OPERATION-CODE=62 | ||||
@@ -13,7 +13,7 @@ module CIrSafetyValvePermission | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_IrSafetyValvePermission=TopDrive' | |||||
if(print_log) print*, 'Evaluate_IrSafetyValvePermission=TopDrive' | |||||
#endif | #endif | ||||
@@ -41,10 +41,7 @@ module CIrSafetyValvePermission | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | 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 | !OPERATION-CODE=57 | ||||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | if (Get_OperationCondition() == OPERATION_TRIP .and.& | ||||
@@ -8,7 +8,7 @@ module CRemoveFillupHeadPermission | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_RemoveFillupHeadPermission=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_RemoveFillupHeadPermission=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -22,7 +22,7 @@ module CRemoveFillupHeadPermission | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_RemoveFillupHeadPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_RemoveFillupHeadPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -8,7 +8,7 @@ module CRemoveMudBucketPermission | |||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_RemoveMudBucketPermission=TopDrive' | |||||
! if(print_log) print*, 'Evaluate_RemoveMudBucketPermission=TopDrive' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
! | ! | ||||
@@ -20,7 +20,7 @@ module CRemoveMudBucketPermission | |||||
! | ! | ||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_RemoveMudBucketPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_RemoveMudBucketPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -12,7 +12,7 @@ module CSwingDrillPermission | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SwingDrillPermission=TopDrive' | |||||
if(print_log) print*, 'Evaluate_SwingDrillPermission=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=33 | !TOPDRIVE-CODE=33 | ||||
@@ -47,7 +47,7 @@ module CSwingDrillPermission | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_SwingDrillPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_SwingDrillPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -47,7 +47,7 @@ module CSwingDrillPermission | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_SwingDrillPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_SwingDrillPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -10,7 +10,7 @@ module CSwingOffPermission | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SwingOffPermission=TopDrive' | |||||
if(print_log) print*, 'Evaluate_SwingOffPermission=TopDrive' | |||||
#endif | #endif | ||||
@@ -54,7 +54,7 @@ module CSwingOffPermission | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_SwingOffPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_SwingOffPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -54,7 +54,7 @@ module CSwingOffPermission | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_SwingOffPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_SwingOffPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -11,7 +11,7 @@ module CSwingTiltPermission | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_SwingTiltPermission=TopDrive' | |||||
if(print_log) print*, 'Evaluate_SwingTiltPermission=TopDrive' | |||||
#endif | #endif | ||||
@@ -41,7 +41,7 @@ module CSwingTiltPermission | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_SwingTiltPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_SwingTiltPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -41,7 +41,7 @@ module CSwingTiltPermission | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_SwingTiltPermission=Kelly' | |||||
! if(print_log) print*, 'Evaluate_SwingTiltPermission=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -11,7 +11,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%SwingTiltPermission = v | data%State%permissions%SwingTiltPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%SwingTiltPermission=', data%State%permissions%SwingTiltPermission | |||||
if(print_log) print*, 'data%State%permissions%SwingTiltPermission=', data%State%permissions%SwingTiltPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnSwingTiltPermissionChange%RunAll() | !**call data%State%permissions%OnSwingTiltPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -29,7 +29,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%SwingOffPermission = v | data%State%permissions%SwingOffPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%SwingOffPermission=', data%State%permissions%SwingOffPermission | |||||
if(print_log) print*, 'data%State%permissions%SwingOffPermission=', data%State%permissions%SwingOffPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnSwingOffPermissionChange%RunAll() | !**call data%State%permissions%OnSwingOffPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -47,7 +47,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%SwingDrillPermission = v | data%State%permissions%SwingDrillPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%SwingDrillPermission=', data%State%permissions%SwingDrillPermission | |||||
if(print_log) print*, 'data%State%permissions%SwingDrillPermission=', data%State%permissions%SwingDrillPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnSwingDrillPermissionChange%RunAll() | !**call data%State%permissions%OnSwingDrillPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -65,7 +65,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%RemoveMudBucketPermission = v | data%State%permissions%RemoveMudBucketPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%RemoveMudBucketPermission=', data%State%permissions%RemoveMudBucketPermission | |||||
if(print_log) print*, 'data%State%permissions%RemoveMudBucketPermission=', data%State%permissions%RemoveMudBucketPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnRemoveMudBucketPermissionChange%RunAll() | !**call data%State%permissions%OnRemoveMudBucketPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -84,7 +84,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%RemoveFillupHeadPermission = v | data%State%permissions%RemoveFillupHeadPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%RemoveFillupHeadPermission=', data%State%permissions%RemoveFillupHeadPermission | |||||
if(print_log) print*, 'data%State%permissions%RemoveFillupHeadPermission=', data%State%permissions%RemoveFillupHeadPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnRemoveFillupHeadPermissionChange%RunAll() | !**call data%State%permissions%OnRemoveFillupHeadPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -102,7 +102,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%IrSafetyValvePermission = v | data%State%permissions%IrSafetyValvePermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%IrSafetyValvePermission=', data%State%permissions%IrSafetyValvePermission | |||||
if(print_log) print*, 'data%State%permissions%IrSafetyValvePermission=', data%State%permissions%IrSafetyValvePermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnIrSafetyValvePermissionChange%RunAll() | !**call data%State%permissions%OnIrSafetyValvePermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -120,7 +120,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%IrIbopPermission = v | data%State%permissions%IrIbopPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%IrIbopPermission=', data%State%permissions%IrIbopPermission | |||||
if(print_log) print*, 'data%State%permissions%IrIbopPermission=', data%State%permissions%IrIbopPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnIrIbopPermissionChange%RunAll() | !**call data%State%permissions%OnIrIbopPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -139,7 +139,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%InstallMudBucketPermission = v | data%State%permissions%InstallMudBucketPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%permissions%InstallMudBucketPermission=', data%State%permissions%InstallMudBucketPermission | |||||
if(print_log) print*, 'data%State%permissions%InstallMudBucketPermission=', data%State%permissions%InstallMudBucketPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnInstallMudBucketPermissionChange%RunAll() | !**call data%State%permissions%OnInstallMudBucketPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -157,7 +157,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%InstallFillupHeadPermission = v | data%State%permissions%InstallFillupHeadPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'InstallFillupHeadPermission=', data%State%permissions%InstallFillupHeadPermission | |||||
if(print_log) print*, 'InstallFillupHeadPermission=', data%State%permissions%InstallFillupHeadPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnInstallFillupHeadPermissionChange%RunAll() | !**call data%State%permissions%OnInstallFillupHeadPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -175,7 +175,7 @@ contains | |||||
#endif | #endif | ||||
data%State%permissions%FillupHeadPermission = v | data%State%permissions%FillupHeadPermission = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FillupHeadPermission=', data%State%permissions%FillupHeadPermission | |||||
if(print_log) print*, 'FillupHeadPermission=', data%State%permissions%FillupHeadPermission | |||||
#endif | #endif | ||||
!**call data%State%permissions%OnFillupHeadPermissionChange%RunAll() | !**call data%State%permissions%OnFillupHeadPermissionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -11,7 +11,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%ZeroStringSpeed = v | data%State%softwareInputs%ZeroStringSpeed = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||||
if(print_log) print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnZeroStringSpeedChange%RunAll() | ! call data%State%softwareInputs%OnZeroStringSpeedChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -30,7 +30,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%TdsStemJointHeight = v | data%State%softwareInputs%TdsStemJointHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||||
if(print_log) print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnTdsStemJointHeightChange%RunAll() | ! call data%State%softwareInputs%OnTdsStemJointHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -49,7 +49,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%StringPressure = v | data%State%softwareInputs%StringPressure = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||||
if(print_log) print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnStringPressureChange%RunAll() | ! call data%State%softwareInputs%OnStringPressureChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -67,7 +67,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%StandRack = v | data%State%softwareInputs%StandRack = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'StandRack=', data%State%softwareInputs%StandRack | |||||
if(print_log) print*, 'StandRack=', data%State%softwareInputs%StandRack | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnStandRackChanged%RunAll() | ! call data%State%softwareInputs%OnStandRackChanged%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -85,7 +85,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%SlackOff = v | data%State%softwareInputs%SlackOff = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||||
if(print_log) print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnSlackOffChange%RunAll() | ! call data%State%softwareInputs%OnSlackOffChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -103,7 +103,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%SafetyValveHeight = v | data%State%softwareInputs%SafetyValveHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||||
if(print_log) print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnSafetyValveHeightChange%RunAll() | ! call data%State%softwareInputs%OnSafetyValveHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -123,7 +123,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%NearFloorConnection = v | data%State%softwareInputs%NearFloorConnection = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||||
if(print_log) print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnNearFloorConnectionChange%RunAll() | ! call data%State%softwareInputs%OnNearFloorConnectionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -142,7 +142,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%IbopHeight = v | data%State%softwareInputs%IbopHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||||
if(print_log) print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnIbopHeightChange%RunAll() | ! call data%State%softwareInputs%OnIbopHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -161,7 +161,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%HookHeight = v | data%State%softwareInputs%HookHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||||
if(print_log) print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnHookHeightChange%RunAll() | ! call data%State%softwareInputs%OnHookHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -12,7 +12,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%ZeroStringSpeed = v | data%State%softwareInputs%ZeroStringSpeed = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||||
if(print_log) print*, 'ZeroStringSpeed=', data%State%softwareInputs%ZeroStringSpeed | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnZeroStringSpeedChange%RunAll() | ! call data%State%softwareInputs%OnZeroStringSpeedChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -31,7 +31,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%TdsStemJointHeight = v | data%State%softwareInputs%TdsStemJointHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||||
if(print_log) print*, 'TdsStemJointHeight=', data%State%softwareInputs%TdsStemJointHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnTdsStemJointHeightChange%RunAll() | ! call data%State%softwareInputs%OnTdsStemJointHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -50,7 +50,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%StringPressure = v | data%State%softwareInputs%StringPressure = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||||
if(print_log) print*, 'StringPressure=', data%State%softwareInputs%StringPressure | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnStringPressureChange%RunAll() | ! call data%State%softwareInputs%OnStringPressureChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -68,7 +68,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%StandRack = v | data%State%softwareInputs%StandRack = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'StandRack=', data%State%softwareInputs%StandRack | |||||
if(print_log) print*, 'StandRack=', data%State%softwareInputs%StandRack | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnStandRackChanged%RunAll() | ! call data%State%softwareInputs%OnStandRackChanged%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -86,7 +86,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%SlackOff = v | data%State%softwareInputs%SlackOff = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||||
if(print_log) print*, 'SlackOff=', data%State%softwareInputs%SlackOff | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnSlackOffChange%RunAll() | ! call data%State%softwareInputs%OnSlackOffChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -104,7 +104,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%SafetyValveHeight = v | data%State%softwareInputs%SafetyValveHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||||
if(print_log) print*, 'SafetyValveHeight=', data%State%softwareInputs%SafetyValveHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnSafetyValveHeightChange%RunAll() | ! call data%State%softwareInputs%OnSafetyValveHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -124,7 +124,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%NearFloorConnection = v | data%State%softwareInputs%NearFloorConnection = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||||
if(print_log) print*, 'NearFloorConnection=', data%State%softwareInputs%NearFloorConnection | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnNearFloorConnectionChange%RunAll() | ! call data%State%softwareInputs%OnNearFloorConnectionChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -143,7 +143,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%IbopHeight = v | data%State%softwareInputs%IbopHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||||
if(print_log) print*, 'IbopHeight=', data%State%softwareInputs%IbopHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnIbopHeightChange%RunAll() | ! call data%State%softwareInputs%OnIbopHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -162,7 +162,7 @@ module SoftwareInputsModule | |||||
#endif | #endif | ||||
data%State%softwareInputs%HookHeight = v | data%State%softwareInputs%HookHeight = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||||
if(print_log) print*, 'HookHeight=', data%State%softwareInputs%HookHeight | |||||
#endif | #endif | ||||
! call data%State%softwareInputs%OnHookHeightChange%RunAll() | ! call data%State%softwareInputs%OnHookHeightChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -11,7 +11,6 @@ module SoftwareInputsVariables | |||||
real :: TdsStemJointHeight = 0 | real :: TdsStemJointHeight = 0 | ||||
logical :: ZeroStringSpeed = .false. | logical :: ZeroStringSpeed = .false. | ||||
end type SoftwareInputsType | end type SoftwareInputsType | ||||
! type(SoftwareInputsType):: softwareInputs | |||||
contains | contains | ||||
@@ -1,11 +1,13 @@ | |||||
module CUnityInputs | module CUnityInputs | ||||
! use CVoidEventHandlerCollection | ! use CVoidEventHandlerCollection | ||||
implicit none | |||||
implicit none | |||||
type :: UnityInputsType | type :: UnityInputsType | ||||
!Input from unity to fortran | |||||
logical :: ElevatorConnectionPossible | logical :: ElevatorConnectionPossible | ||||
logical :: JointConnectionPossible | logical :: JointConnectionPossible | ||||
logical :: IsKellyBushingSetInTable | logical :: IsKellyBushingSetInTable | ||||
logical :: ElevatorPickup | |||||
logical :: ElevatorPickup | |||||
!only used in set and get | |||||
logical :: NearFloorPosition | logical :: NearFloorPosition | ||||
logical :: SingleSetInMouseHole | logical :: SingleSetInMouseHole | ||||
logical :: TdsConnectionPossible | logical :: TdsConnectionPossible | ||||
@@ -49,7 +51,7 @@ module CUnityInputs | |||||
! ! OutOfMouseHole = v | ! ! OutOfMouseHole = v | ||||
! ! call OnOutOfMouseHoleChange%RunAll() | ! ! call OnOutOfMouseHoleChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'OutOfMouseHole=', OutOfMouseHole | |||||
! ! if(print_log) print*, 'OutOfMouseHole=', OutOfMouseHole | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -80,7 +82,7 @@ module CUnityInputs | |||||
! ! Unlatch = v | ! ! Unlatch = v | ||||
! ! call OnUnlatchChange%RunAll() | ! ! call OnUnlatchChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'Unlatch=', Unlatch | |||||
! ! if(print_log) print*, 'Unlatch=', Unlatch | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -113,7 +115,7 @@ module CUnityInputs | |||||
! ! Latch = v | ! ! Latch = v | ||||
! ! call OnLatchChange%RunAll() | ! ! call OnLatchChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'Latch=', Latch | |||||
! ! if(print_log) print*, 'Latch=', Latch | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -148,7 +150,7 @@ module CUnityInputs | |||||
! ! SlipsUnSet = v | ! ! SlipsUnSet = v | ||||
! ! call OnSlipsUnSetChange%RunAll() | ! ! call OnSlipsUnSetChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'SlipsUnSet=', SlipsUnSet | |||||
! ! if(print_log) print*, 'SlipsUnSet=', SlipsUnSet | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -180,7 +182,7 @@ module CUnityInputs | |||||
! ! SlipsSet = v | ! ! SlipsSet = v | ||||
! ! call OnSlipsSetChange%RunAll() | ! ! call OnSlipsSetChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'SlipsSet=', SlipsSet | |||||
! ! if(print_log) print*, 'SlipsSet=', SlipsSet | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -210,7 +212,7 @@ module CUnityInputs | |||||
! ! BreakupTong = v | ! ! BreakupTong = v | ||||
! ! call OnBreakupTongChange%RunAll() | ! ! call OnBreakupTongChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'BreakupTong=', BreakupTong | |||||
! ! if(print_log) print*, 'BreakupTong=', BreakupTong | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -238,7 +240,7 @@ module CUnityInputs | |||||
! ! MakeupTong = v | ! ! MakeupTong = v | ||||
! ! call OnMakeupTongChange%RunAll() | ! ! call OnMakeupTongChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'MakeupTong=', MakeupTong | |||||
! ! if(print_log) print*, 'MakeupTong=', MakeupTong | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -278,7 +280,7 @@ module CUnityInputs | |||||
! ! NewHookHeight = v | ! ! NewHookHeight = v | ||||
! ! call OnNewHookHeightChange%RunAll() | ! ! call OnNewHookHeightChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'NewHookHeight=', NewHookHeight | |||||
! ! if(print_log) print*, 'NewHookHeight=', NewHookHeight | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -306,7 +308,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%ElevatorConnectionPossible = v | ! data%Equipments%UnityInputs%ElevatorConnectionPossible = v | ||||
! !**call data%Equipments%UnityInputs%OnElevatorConnectionPossibleChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnElevatorConnectionPossibleChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||||
! if(print_log) print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -337,7 +339,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%JointConnectionPossible = v | ! data%Equipments%UnityInputs%JointConnectionPossible = v | ||||
! !**call data%Equipments%UnityInputs%OnJointConnectionPossibleChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnJointConnectionPossibleChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||||
! if(print_log) print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -365,7 +367,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%IsKellyBushingSetInTable = v | ! data%Equipments%UnityInputs%IsKellyBushingSetInTable = v | ||||
! !**call data%Equipments%UnityInputs%OnIsKellyBushingSetInTableChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnIsKellyBushingSetInTableChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||||
! if(print_log) print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -393,7 +395,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%ElevatorPickup = v | ! data%Equipments%UnityInputs%ElevatorPickup = v | ||||
! !**call data%Equipments%UnityInputs%OnElevatorPickupChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnElevatorPickupChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||||
! if(print_log) print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -449,7 +451,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%SingleSetInMouseHole = v | ! data%Equipments%UnityInputs%SingleSetInMouseHole = v | ||||
! !**call data%Equipments%UnityInputs%OnSingleSetInMouseHoleChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnSingleSetInMouseHoleChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||||
! if(print_log) print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -50,7 +50,7 @@ module CUnityInputs | |||||
! ! OutOfMouseHole = v | ! ! OutOfMouseHole = v | ||||
! ! call OnOutOfMouseHoleChange%RunAll() | ! ! call OnOutOfMouseHoleChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'OutOfMouseHole=', OutOfMouseHole | |||||
! ! if(print_log) print*, 'OutOfMouseHole=', OutOfMouseHole | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -81,7 +81,7 @@ module CUnityInputs | |||||
! ! Unlatch = v | ! ! Unlatch = v | ||||
! ! call OnUnlatchChange%RunAll() | ! ! call OnUnlatchChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'Unlatch=', Unlatch | |||||
! ! if(print_log) print*, 'Unlatch=', Unlatch | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -114,7 +114,7 @@ module CUnityInputs | |||||
! ! Latch = v | ! ! Latch = v | ||||
! ! call OnLatchChange%RunAll() | ! ! call OnLatchChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'Latch=', Latch | |||||
! ! if(print_log) print*, 'Latch=', Latch | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -149,7 +149,7 @@ module CUnityInputs | |||||
! ! SlipsUnSet = v | ! ! SlipsUnSet = v | ||||
! ! call OnSlipsUnSetChange%RunAll() | ! ! call OnSlipsUnSetChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'SlipsUnSet=', SlipsUnSet | |||||
! ! if(print_log) print*, 'SlipsUnSet=', SlipsUnSet | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -181,7 +181,7 @@ module CUnityInputs | |||||
! ! SlipsSet = v | ! ! SlipsSet = v | ||||
! ! call OnSlipsSetChange%RunAll() | ! ! call OnSlipsSetChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'SlipsSet=', SlipsSet | |||||
! ! if(print_log) print*, 'SlipsSet=', SlipsSet | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -211,7 +211,7 @@ module CUnityInputs | |||||
! ! BreakupTong = v | ! ! BreakupTong = v | ||||
! ! call OnBreakupTongChange%RunAll() | ! ! call OnBreakupTongChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'BreakupTong=', BreakupTong | |||||
! ! if(print_log) print*, 'BreakupTong=', BreakupTong | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -239,7 +239,7 @@ module CUnityInputs | |||||
! ! MakeupTong = v | ! ! MakeupTong = v | ||||
! ! call OnMakeupTongChange%RunAll() | ! ! call OnMakeupTongChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'MakeupTong=', MakeupTong | |||||
! ! if(print_log) print*, 'MakeupTong=', MakeupTong | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -279,7 +279,7 @@ module CUnityInputs | |||||
! ! NewHookHeight = v | ! ! NewHookHeight = v | ||||
! ! call OnNewHookHeightChange%RunAll() | ! ! call OnNewHookHeightChange%RunAll() | ||||
! !#ifdef deb | ! !#ifdef deb | ||||
! ! print*, 'NewHookHeight=', NewHookHeight | |||||
! ! if(print_log) print*, 'NewHookHeight=', NewHookHeight | |||||
! !#endif | ! !#endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -307,7 +307,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%ElevatorConnectionPossible = v | ! data%Equipments%UnityInputs%ElevatorConnectionPossible = v | ||||
! !**call data%Equipments%UnityInputs%OnElevatorConnectionPossibleChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnElevatorConnectionPossibleChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||||
! if(print_log) print*, 'ElevatorConnectionPossible=', data%Equipments%UnityInputs%ElevatorConnectionPossible | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -338,7 +338,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%JointConnectionPossible = v | ! data%Equipments%UnityInputs%JointConnectionPossible = v | ||||
! !**call data%Equipments%UnityInputs%OnJointConnectionPossibleChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnJointConnectionPossibleChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||||
! if(print_log) print*, 'JointConnectionPossible=', data%Equipments%UnityInputs%JointConnectionPossible | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -366,7 +366,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%IsKellyBushingSetInTable = v | ! data%Equipments%UnityInputs%IsKellyBushingSetInTable = v | ||||
! !**call data%Equipments%UnityInputs%OnIsKellyBushingSetInTableChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnIsKellyBushingSetInTableChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||||
! if(print_log) print*, 'IsKellyBushingSetInTable=', data%Equipments%UnityInputs%IsKellyBushingSetInTable | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -394,7 +394,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%ElevatorPickup = v | ! data%Equipments%UnityInputs%ElevatorPickup = v | ||||
! !**call data%Equipments%UnityInputs%OnElevatorPickupChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnElevatorPickupChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||||
! if(print_log) print*, 'ElevatorPickup =', data%Equipments%UnityInputs%ElevatorPickup | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -450,7 +450,7 @@ module CUnityInputs | |||||
! data%Equipments%UnityInputs%SingleSetInMouseHole = v | ! data%Equipments%UnityInputs%SingleSetInMouseHole = v | ||||
! !**call data%Equipments%UnityInputs%OnSingleSetInMouseHoleChange%RunAll() | ! !**call data%Equipments%UnityInputs%OnSingleSetInMouseHoleChange%RunAll() | ||||
! #ifdef deb | ! #ifdef deb | ||||
! print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||||
! if(print_log) print*, 'singleSetInMouseHole=', data%Equipments%UnityInputs%SingleSetInMouseHole | |||||
! #endif | ! #endif | ||||
! end subroutine | ! end subroutine | ||||
@@ -2,31 +2,27 @@ module UnityModule | |||||
use SimulationVariables | use SimulationVariables | ||||
implicit none | implicit none | ||||
contains | 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) | subroutine UnityOutputsToJson(parent) | ||||
type(json_value),pointer :: parent | type(json_value),pointer :: parent | ||||
@@ -80,7 +76,7 @@ subroutine Set_NearFloorPosition(v) | |||||
data%Equipments%UnityInputs%NearFloorPosition = v | data%Equipments%UnityInputs%NearFloorPosition = v | ||||
!**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll() | !**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll() | ||||
if(log_level>4) then | if(log_level>4) then | ||||
print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||||
if(print_log) print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||||
endif | endif | ||||
end subroutine | end subroutine | ||||
@@ -101,7 +97,7 @@ subroutine Set_BlowoutFromString(v) | |||||
logical, intent (in) :: v | logical, intent (in) :: v | ||||
data%Equipments%UnityOutputs%BlowoutFromString = v | data%Equipments%UnityOutputs%BlowoutFromString = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'BlowoutFromString=', v | |||||
if(print_log) print*, 'BlowoutFromString=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -115,7 +111,7 @@ subroutine Set_BlowoutFromAnnular(v) | |||||
logical, intent (in) :: v | logical, intent (in) :: v | ||||
data%Equipments%UnityOutputs%BlowoutFromAnnular = v | data%Equipments%UnityOutputs%BlowoutFromAnnular = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'BlowoutFromAnnular=', v | |||||
if(print_log) print*, 'BlowoutFromAnnular=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -133,7 +129,7 @@ subroutine Set_FlowFromReturnLine(v) | |||||
logical, intent (in) :: v | logical, intent (in) :: v | ||||
data%Equipments%UnityOutputs%FlowFromReturnLine = v | data%Equipments%UnityOutputs%FlowFromReturnLine = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FlowFromReturnLine=', v | |||||
if(print_log) print*, 'FlowFromReturnLine=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -149,7 +145,7 @@ subroutine Set_FlowFromKelly(v) | |||||
real, intent (in) :: v | real, intent (in) :: v | ||||
data%Equipments%UnityOutputs%FlowFromKelly = v | data%Equipments%UnityOutputs%FlowFromKelly = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FlowFromKelly=', v | |||||
if(print_log) print*, 'FlowFromKelly=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -167,7 +163,7 @@ subroutine Set_FlowFromFillupHead(v) | |||||
real, intent (in) :: v | real, intent (in) :: v | ||||
data%Equipments%UnityOutputs%FlowFromFillupHead = v | data%Equipments%UnityOutputs%FlowFromFillupHead = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FlowFromFillupHead=', v | |||||
if(print_log) print*, 'FlowFromFillupHead=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -186,7 +182,7 @@ subroutine Set_FlowKellyDisconnect(v) | |||||
logical, intent (in) :: v | logical, intent (in) :: v | ||||
data%Equipments%UnityOutputs%FlowKellyDisconnect = v | data%Equipments%UnityOutputs%FlowKellyDisconnect = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FlowKellyDisconnect=', v | |||||
if(print_log) print*, 'FlowKellyDisconnect=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -203,7 +199,7 @@ subroutine Set_FlowPipeDisconnect(v) | |||||
logical, intent (in) :: v | logical, intent (in) :: v | ||||
data%Equipments%UnityOutputs%FlowPipeDisconnect = v | data%Equipments%UnityOutputs%FlowPipeDisconnect = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FlowPipeDisconnect=', v | |||||
if(print_log) print*, 'FlowPipeDisconnect=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -217,7 +213,7 @@ subroutine Set_BlowoutFromStringPercent(v) | |||||
real(8), intent (in) :: v | real(8), intent (in) :: v | ||||
data%Equipments%UnityOutputs%BlowoutFromStringPercent = v | data%Equipments%UnityOutputs%BlowoutFromStringPercent = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'BlowoutFromStringPercent=', v | |||||
if(print_log) print*, 'BlowoutFromStringPercent=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -234,7 +230,7 @@ subroutine Calc_KellyHoseVibrationRate(spm1, spm2) | |||||
total = (spm1 + spm2)/2 | total = (spm1 + spm2)/2 | ||||
data%Equipments%UnityOutputs%KellyHoseVibrationRate = ScaleRange(total, 0.0, 10.0, 0.0, 120.0) | data%Equipments%UnityOutputs%KellyHoseVibrationRate = ScaleRange(total, 0.0, 10.0, 0.0, 120.0) | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'KellyHoseVibrationRate=', data%Equipments%UnityOutputs%KellyHoseVibrationRate | |||||
if(print_log) print*, 'KellyHoseVibrationRate=', data%Equipments%UnityOutputs%KellyHoseVibrationRate | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -248,7 +244,7 @@ subroutine Set_Pedal(v) | |||||
real(8), intent (in) :: v | real(8), intent (in) :: v | ||||
data%Equipments%UnityOutputs%Pedal = v | data%Equipments%UnityOutputs%Pedal = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Pedal=', v | |||||
if(print_log) print*, 'Pedal=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -262,7 +258,7 @@ subroutine Set_FlowRate(v) | |||||
real(8), intent (in) :: v | real(8), intent (in) :: v | ||||
data%Equipments%UnityOutputs%FlowRate = v | data%Equipments%UnityOutputs%FlowRate = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FlowRate=', v | |||||
if(print_log) print*, 'FlowRate=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -276,7 +272,7 @@ subroutine Set_RotaryRpm(v) | |||||
real(8), intent (in) :: v | real(8), intent (in) :: v | ||||
data%Equipments%UnityOutputs%RotaryRpm = v | data%Equipments%UnityOutputs%RotaryRpm = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'RotaryRpm=', v | |||||
if(print_log) print*, 'RotaryRpm=', v | |||||
#endif | #endif | ||||
end subroutine | end subroutine | ||||
@@ -81,7 +81,7 @@ subroutine Set_NearFloorPosition(v) | |||||
data%Equipments%UnityInputs%NearFloorPosition = v | data%Equipments%UnityInputs%NearFloorPosition = v | ||||
!**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll() | !**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll() | ||||
if(log_level>4) then | if(log_level>4) then | ||||
print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||||
if(print_log) print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition | |||||
endif | endif | ||||
end subroutine | 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 | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsBackupClamp=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TdsBackupClamp=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=79 | !TOPDRIVE-CODE=79 | ||||
@@ -43,7 +43,7 @@ module CTdsBackupClamp | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsBackupClamp=Kelly' | |||||
if(print_log) print*, 'Evaluate_TdsBackupClamp=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -10,7 +10,7 @@ module CTdsSpineEnum | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsSpine=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TdsSpine=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=83 | !TOPDRIVE-CODE=83 | ||||
@@ -49,7 +49,7 @@ module CTdsSpineEnum | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsSpine=Kelly' | |||||
if(print_log) print*, 'Evaluate_TdsSpine=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -10,7 +10,7 @@ module CTdsSwingEnum | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsSwing=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TdsSwing=TopDrive' | |||||
#endif | #endif | ||||
@@ -128,7 +128,7 @@ module CTdsSwingEnum | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_TdsSwing=Kelly' | |||||
! if(print_log) print*, 'Evaluate_TdsSwing=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -128,7 +128,7 @@ module CTdsSwingEnum | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | !#ifdef OST | ||||
! print*, 'Evaluate_TdsSwing=Kelly' | |||||
! if(print_log) print*, 'Evaluate_TdsSwing=Kelly' | |||||
!#endif | !#endif | ||||
! endif | ! endif | ||||
@@ -8,7 +8,7 @@ module CTdsTongEnum | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsTong=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TdsTong=TopDrive' | |||||
#endif | #endif | ||||
@@ -50,7 +50,7 @@ module CTdsTongEnum | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsTong=Kelly' | |||||
if(print_log) print*, 'Evaluate_TdsTong=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -7,30 +7,17 @@ module CTongEnum | |||||
implicit none | implicit none | ||||
! if (DriveType == TopDrive_DriveType) then | ! if (DriveType == TopDrive_DriveType) then | ||||
!#ifdef OST | |||||
! print*, 'Evaluate_Tong=TopDrive' | |||||
!#endif | |||||
! if(print_log) print*, 'Evaluate_Tong=TopDrive' | |||||
! endif | ! endif | ||||
! | |||||
! | |||||
! | |||||
! | |||||
! | |||||
! | |||||
! | |||||
! | |||||
! if (DriveType == Kelly_DriveType) then | ! if (DriveType == Kelly_DriveType) then | ||||
!#ifdef OST | |||||
! print*, 'Evaluate_Tong=Kelly' | |||||
!#endif | |||||
! if(print_log) print*, 'Evaluate_Tong=Kelly' | |||||
! endif | ! endif | ||||
end subroutine | end subroutine | ||||
! subroutine Subscribe_Tong() | ! subroutine Subscribe_Tong() | ||||
! use CDrillingConsoleVariables | ! use CDrillingConsoleVariables | ||||
!@ use ConfigurationVariables | |||||
!@ use ConfigurationVariables | |||||
!@ use ConfigurationVariables | |||||
! implicit none | ! implicit none | ||||
! call OnBreakoutLeverPress%Add(ButtonPress_Breakout_TongNotification) | ! call OnBreakoutLeverPress%Add(ButtonPress_Breakout_TongNotification) | ||||
@@ -44,9 +31,7 @@ module CTongEnum | |||||
subroutine ButtonPress_Breakout_TongNotification() | subroutine ButtonPress_Breakout_TongNotification() | ||||
implicit none | implicit none | ||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | 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 | !TOPDRIVE-CODE=70 | ||||
if (Get_TongNotification()) then | if (Get_TongNotification()) then | ||||
call Set_Tong(TONG_BREAKOUT_BEGIN) | call Set_Tong(TONG_BREAKOUT_BEGIN) | ||||
@@ -54,9 +39,7 @@ module CTongEnum | |||||
end if | end if | ||||
endif | endif | ||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | 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 | !OPERATION-CODE=74 | ||||
if (Get_TongNotification()) then | if (Get_TongNotification()) then | ||||
call Set_Tong(TONG_BREAKOUT_BEGIN) | call Set_Tong(TONG_BREAKOUT_BEGIN) | ||||
@@ -74,81 +57,35 @@ module CTongEnum | |||||
use NotificationModule | use NotificationModule | ||||
implicit none | implicit none | ||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | 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 | !TOPDRIVE-CODE=69 | ||||
if (Get_TongNotification()) then | if (Get_TongNotification()) then | ||||
call Set_Tong(TONG_MAKEUP_BEGIN) | call Set_Tong(TONG_MAKEUP_BEGIN) | ||||
return | return | ||||
end if | end if | ||||
endif | endif | ||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | 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 | !OPERATION-CODE=73 | ||||
if (Get_TongNotification()) then | if (Get_TongNotification()) then | ||||
call Set_Tong(TONG_MAKEUP_BEGIN) | call Set_Tong(TONG_MAKEUP_BEGIN) | ||||
endif | endif | ||||
endif | |||||
endif | |||||
end subroutine | end subroutine | ||||
subroutine ButtonPress_Neutral_TongNotification() | subroutine ButtonPress_Neutral_TongNotification() | ||||
implicit none | implicit none | ||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | 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 | 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) | call Set_Tong(TONG_NEUTRAL) | ||||
endif | endif | ||||
end subroutine | end subroutine | ||||
end module CTongEnum | end module CTongEnum |
@@ -1,8 +1,62 @@ | |||||
module UnitySignalsModule | module UnitySignalsModule | ||||
use UnitySignalVariables | use UnitySignalVariables | ||||
use SimulationVariables | use SimulationVariables | ||||
use RedisInterface | |||||
contains | 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) | subroutine Set_TdsElevatorModes(v) | ||||
implicit none | implicit none | ||||
integer , intent(in) :: v | integer , intent(in) :: v | ||||
@@ -31,13 +85,11 @@ end subroutine | |||||
subroutine Set_Tong(v) | subroutine Set_Tong(v) | ||||
implicit none | implicit none | ||||
integer , intent(in) :: v | 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 | 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() | !**call data%State%unitySignals%OnTongChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -55,7 +107,7 @@ subroutine Set_TdsTong(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsTong = v | data%State%unitySignals%TdsTong = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||||
if(print_log) print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsTongChange%RunAll() | !**call data%State%unitySignals%OnTdsTongChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -74,7 +126,7 @@ subroutine Set_TdsSwing(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsSwing = v | data%State%unitySignals%TdsSwing = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||||
if(print_log) print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsSwingChange%RunAll() | !**call data%State%unitySignals%OnTdsSwingChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -93,7 +145,7 @@ subroutine Set_TdsSpine(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsSpine = v | data%State%unitySignals%TdsSpine = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||||
if(print_log) print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsSpineChange%RunAll() | !**call data%State%unitySignals%OnTdsSpineChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -112,7 +164,7 @@ subroutine Set_TdsBackupClamp(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsBackupClamp = v | data%State%unitySignals%TdsBackupClamp = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||||
if(print_log) print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsBackupClampChange%RunAll() | !**call data%State%unitySignals%OnTdsBackupClampChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -131,7 +183,7 @@ subroutine Set_Swing(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Swing = v | data%State%unitySignals%Swing = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Swing=', data%State%unitySignals%Swing | |||||
if(print_log) print*, 'Swing=', data%State%unitySignals%Swing | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnSwingChange%RunAll() | !**call data%State%unitySignals%OnSwingChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -141,17 +193,15 @@ integer function Get_Swing() | |||||
Get_Swing = data%State%unitySignals%Swing | Get_Swing = data%State%unitySignals%Swing | ||||
end function | end function | ||||
!//TODO: apparently every thing is started here for slips | |||||
subroutine Set_Slips(v) | subroutine Set_Slips(v) | ||||
implicit none | implicit none | ||||
integer , intent(in) :: v | 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 | 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() | !**call data%State%unitySignals%OnSlipsChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -175,11 +225,11 @@ subroutine Set_SafetyValve(v) | |||||
data%State%unitySignals%SafetyValve = v | data%State%unitySignals%SafetyValve = v | ||||
#ifdef deb | #ifdef deb | ||||
if(data%State%unitySignals%SafetyValve == SAFETY_VALVE_NEUTRAL) then | 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 | 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 | 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 | ||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnSafetyValveChange%RunAll() | !**call data%State%unitySignals%OnSafetyValveChange%RunAll() | ||||
@@ -210,7 +260,7 @@ subroutine Set_OperationCondition(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%OperationCondition = v | data%State%unitySignals%OperationCondition = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||||
if(print_log) print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnOperationConditionChange%RunAll() | !**call data%State%unitySignals%OnOperationConditionChange%RunAll() | ||||
!**call data%State%unitySignals%OnOperationConditionChangeInt%RunAll(data%State%unitySignals%OperationCondition) | !**call data%State%unitySignals%OnOperationConditionChangeInt%RunAll(data%State%unitySignals%OperationCondition) | ||||
@@ -235,7 +285,7 @@ subroutine Set_MouseHole(v) | |||||
!call sleep(2) | !call sleep(2) | ||||
data%State%unitySignals%MouseHole = v | data%State%unitySignals%MouseHole = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||||
if(print_log) print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnMouseHoleChange%RunAll() | !**call data%State%unitySignals%OnMouseHoleChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -255,7 +305,7 @@ subroutine Set_Kelly(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Kelly = v | data%State%unitySignals%Kelly = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Kelly=', data%State%unitySignals%Kelly | |||||
if(print_log) print*, 'Kelly=', data%State%unitySignals%Kelly | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnKellyChange%RunAll() | !**call data%State%unitySignals%OnKellyChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -274,7 +324,7 @@ subroutine Set_Ibop(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Ibop = v | data%State%unitySignals%Ibop = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Ibop=', data%State%unitySignals%Ibop | |||||
if(print_log) print*, 'Ibop=', data%State%unitySignals%Ibop | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnIbopChange%RunAll() | !**call data%State%unitySignals%OnIbopChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -301,7 +351,7 @@ subroutine Set_FillupHead(v) | |||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||||
if(print_log) print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnFillupHeadChange%RunAll() | !**call data%State%unitySignals%OnFillupHeadChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -319,7 +369,7 @@ subroutine Evaluate_FillupHead() | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_FillupHead=TopDrive' | |||||
if(print_log) print*, 'Evaluate_FillupHead=TopDrive' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -330,7 +380,7 @@ subroutine Evaluate_FillupHead() | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_FillupHead=Kelly' | |||||
if(print_log) print*, 'Evaluate_FillupHead=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -352,7 +402,7 @@ subroutine Set_Elevator(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Elevator = v | data%State%unitySignals%Elevator = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Elevator=', data%State%unitySignals%Elevator | |||||
if(print_log) print*, 'Elevator=', data%State%unitySignals%Elevator | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnElevatorChange%RunAll() | !**call data%State%unitySignals%OnElevatorChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -378,7 +428,7 @@ subroutine Set_MudBucket(v) | |||||
call ToggleMudBox(.false.) | call ToggleMudBox(.false.) | ||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||||
if(print_log) print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnMudBucketChange%RunAll() | !**call data%State%unitySignals%OnMudBucketChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -419,7 +469,7 @@ subroutine Set_TdsConnectionModes(v) | |||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||||
if(print_log) print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsConnectionModesChange%RunAll() | !**call data%State%unitySignals%OnTdsConnectionModesChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -438,7 +488,7 @@ subroutine Evaluate_TdsConnectionModes() | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=3 | !TOPDRIVE-CODE=3 | ||||
if (Get_TdsStemIn() .and.& | if (Get_TdsStemIn() .and.& | ||||
@@ -481,7 +531,7 @@ subroutine Evaluate_TdsConnectionModes() | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsConnectionModes=Kelly' | |||||
if(print_log) print*, 'Evaluate_TdsConnectionModes=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -37,7 +37,7 @@ subroutine Set_Tong(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Tong = v | data%State%unitySignals%Tong = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Tong=', data%State%unitySignals%Tong | |||||
if(print_log) print*, 'Tong=', data%State%unitySignals%Tong | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTongChange%RunAll() | !**call data%State%unitySignals%OnTongChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -56,7 +56,7 @@ subroutine Set_TdsTong(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsTong = v | data%State%unitySignals%TdsTong = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||||
if(print_log) print*, 'TdsTong=', data%State%unitySignals%TdsTong | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsTongChange%RunAll() | !**call data%State%unitySignals%OnTdsTongChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -75,7 +75,7 @@ subroutine Set_TdsSwing(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsSwing = v | data%State%unitySignals%TdsSwing = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||||
if(print_log) print*, 'TdsSwing=', data%State%unitySignals%TdsSwing | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsSwingChange%RunAll() | !**call data%State%unitySignals%OnTdsSwingChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -94,7 +94,7 @@ subroutine Set_TdsSpine(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsSpine = v | data%State%unitySignals%TdsSpine = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||||
if(print_log) print*, 'TdsSpine=', data%State%unitySignals%TdsSpine | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsSpineChange%RunAll() | !**call data%State%unitySignals%OnTdsSpineChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -113,7 +113,7 @@ subroutine Set_TdsBackupClamp(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%TdsBackupClamp = v | data%State%unitySignals%TdsBackupClamp = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||||
if(print_log) print*, 'TdsBackupClamp=', data%State%unitySignals%TdsBackupClamp | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsBackupClampChange%RunAll() | !**call data%State%unitySignals%OnTdsBackupClampChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -132,7 +132,7 @@ subroutine Set_Swing(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Swing = v | data%State%unitySignals%Swing = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Swing=', data%State%unitySignals%Swing | |||||
if(print_log) print*, 'Swing=', data%State%unitySignals%Swing | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnSwingChange%RunAll() | !**call data%State%unitySignals%OnSwingChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -151,7 +151,7 @@ subroutine Set_Slips(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Slips = v | data%State%unitySignals%Slips = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Slips=', data%State%unitySignals%Slips | |||||
if(print_log) print*, 'Slips=', data%State%unitySignals%Slips | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnSlipsChange%RunAll() | !**call data%State%unitySignals%OnSlipsChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -203,7 +203,7 @@ subroutine Set_OperationCondition(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%OperationCondition = v | data%State%unitySignals%OperationCondition = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||||
if(print_log) print*, 'OperationCondition=', data%State%unitySignals%OperationCondition | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnOperationConditionChange%RunAll() | !**call data%State%unitySignals%OnOperationConditionChange%RunAll() | ||||
!**call data%State%unitySignals%OnOperationConditionChangeInt%RunAll(data%State%unitySignals%OperationCondition) | !**call data%State%unitySignals%OnOperationConditionChangeInt%RunAll(data%State%unitySignals%OperationCondition) | ||||
@@ -228,7 +228,7 @@ subroutine Set_MouseHole(v) | |||||
!call sleep(2) | !call sleep(2) | ||||
data%State%unitySignals%MouseHole = v | data%State%unitySignals%MouseHole = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||||
if(print_log) print*, 'MouseHole=', data%State%unitySignals%MouseHole | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnMouseHoleChange%RunAll() | !**call data%State%unitySignals%OnMouseHoleChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -248,7 +248,7 @@ subroutine Set_Kelly(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Kelly = v | data%State%unitySignals%Kelly = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Kelly=', data%State%unitySignals%Kelly | |||||
if(print_log) print*, 'Kelly=', data%State%unitySignals%Kelly | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnKellyChange%RunAll() | !**call data%State%unitySignals%OnKellyChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -267,7 +267,7 @@ subroutine Set_Ibop(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Ibop = v | data%State%unitySignals%Ibop = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Ibop=', data%State%unitySignals%Ibop | |||||
if(print_log) print*, 'Ibop=', data%State%unitySignals%Ibop | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnIbopChange%RunAll() | !**call data%State%unitySignals%OnIbopChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -294,7 +294,7 @@ subroutine Set_FillupHead(v) | |||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||||
if(print_log) print*, 'FillupHead=', data%State%unitySignals%FillupHead | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnFillupHeadChange%RunAll() | !**call data%State%unitySignals%OnFillupHeadChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -343,7 +343,7 @@ subroutine Set_Elevator(v) | |||||
#endif | #endif | ||||
data%State%unitySignals%Elevator = v | data%State%unitySignals%Elevator = v | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'Elevator=', data%State%unitySignals%Elevator | |||||
if(print_log) print*, 'Elevator=', data%State%unitySignals%Elevator | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnElevatorChange%RunAll() | !**call data%State%unitySignals%OnElevatorChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -369,7 +369,7 @@ subroutine Set_MudBucket(v) | |||||
call ToggleMudBox(.false.) | call ToggleMudBox(.false.) | ||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||||
if(print_log) print*, 'MudBucket=', data%State%unitySignals%MudBucket | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnMudBucketChange%RunAll() | !**call data%State%unitySignals%OnMudBucketChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -410,7 +410,7 @@ subroutine Set_TdsConnectionModes(v) | |||||
endif | endif | ||||
#ifdef deb | #ifdef deb | ||||
print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||||
if(print_log) print*, 'data%State%unitySignals%TdsConnectionModes=', data%State%unitySignals%TdsConnectionModes | |||||
#endif | #endif | ||||
!**call data%State%unitySignals%OnTdsConnectionModesChange%RunAll() | !**call data%State%unitySignals%OnTdsConnectionModesChange%RunAll() | ||||
end subroutine | end subroutine | ||||
@@ -429,7 +429,7 @@ subroutine Evaluate_TdsConnectionModes() | |||||
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||||
if(print_log) print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||||
#endif | #endif | ||||
!TOPDRIVE-CODE=3 | !TOPDRIVE-CODE=3 | ||||
if (Get_TdsStemIn() .and.& | if (Get_TdsStemIn() .and.& | ||||
@@ -472,7 +472,7 @@ subroutine Evaluate_TdsConnectionModes() | |||||
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then | ||||
#ifdef OST | #ifdef OST | ||||
print*, 'Evaluate_TdsConnectionModes=Kelly' | |||||
if(print_log) print*, 'Evaluate_TdsConnectionModes=Kelly' | |||||
#endif | #endif | ||||
endif | endif | ||||
@@ -2,9 +2,20 @@ module UnitySignalVariables | |||||
! use CVoidEventHandlerCollection | ! use CVoidEventHandlerCollection | ||||
! use CIntegerEventHandlerCollection | ! 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 | type:: UnitySignalsType | ||||
! used only in set and get (unitysignals.f90) | |||||
integer :: MudBucket = 0 | integer :: MudBucket = 0 | ||||
! used only in set and get (unitysignals.f90) and indirectly in Evaluate... | |||||
integer :: Elevator = 0 | integer :: Elevator = 0 | ||||
! used only in set and get (unitysignals.f90) and indirectly in Evaluate... | |||||
integer :: FillupHead = 0 | integer :: FillupHead = 0 | ||||
integer :: Ibop = 0 | integer :: Ibop = 0 | ||||
integer :: Kelly = 0 | integer :: Kelly = 0 | ||||
@@ -12,7 +23,8 @@ module UnitySignalVariables | |||||
integer :: OperationCondition = 0 | integer :: OperationCondition = 0 | ||||
integer :: SafetyValve = 0 | integer :: SafetyValve = 0 | ||||
integer :: operation = 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 :: Slips_S = 0 | ||||
integer :: Swing = 0 | integer :: Swing = 0 | ||||
integer :: Swing_S = 0 | integer :: Swing_S = 0 | ||||
@@ -24,7 +36,6 @@ module UnitySignalVariables | |||||
integer :: Tong_S = 0 | integer :: Tong_S = 0 | ||||
integer :: TdsConnectionModes = 0 | integer :: TdsConnectionModes = 0 | ||||
integer :: TdsElevatorModes = 0 | integer :: TdsElevatorModes = 0 | ||||
end type UnitySignalsType | end type UnitySignalsType | ||||
enum, bind(c) | enum, bind(c) | ||||
@@ -80,13 +91,7 @@ module UnitySignalVariables | |||||
enumerator OPERATION_DRILL | enumerator OPERATION_DRILL | ||||
enumerator OPERATION_TRIP | enumerator OPERATION_TRIP | ||||
end enum | 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_NEUTRAL | ||||
enumerator MOUSE_HOLE_FILL | enumerator MOUSE_HOLE_FILL | ||||
enumerator MOUSE_HOLE_EMPTY | enumerator MOUSE_HOLE_EMPTY | ||||
@@ -149,8 +149,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(AnnularWashPtr)) call AnnularWashPtr(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 | endsubroutine | ||||
subroutine ChangeAnnularFail(status) | subroutine ChangeAnnularFail(status) | ||||
@@ -177,8 +177,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(UpperRamWashPtr)) call UpperRamWashPtr(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 | endsubroutine | ||||
subroutine ChangeUpperRamFail(status) | subroutine ChangeUpperRamFail(status) | ||||
@@ -204,8 +204,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(MiddleRamWashPtr)) call MiddleRamWashPtr(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 | endsubroutine | ||||
subroutine ChangeMiddleRamFail(status) | subroutine ChangeMiddleRamFail(status) | ||||
@@ -232,8 +232,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(LowerRamWashPtr)) call LowerRamWashPtr(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 | endsubroutine | ||||
subroutine ChangeLowerRamFail(status) | subroutine ChangeLowerRamFail(status) | ||||
@@ -267,24 +267,24 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(AccumulatorPumpLeakPtr)) call AccumulatorPumpLeakPtr(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 | endsubroutine | ||||
subroutine ChangeAccumulatorSystemFail(status) | subroutine ChangeAccumulatorSystemFail(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(AccumulatorSystemFailPtr)) call AccumulatorSystemFailPtr(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 | endsubroutine | ||||
subroutine ChangeAccumulatorSystemLeak(status) | subroutine ChangeAccumulatorSystemLeak(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(AccumulatorSystemLeakPtr)) call AccumulatorSystemLeakPtr(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 | endsubroutine | ||||
end module CBopProblems | end module CBopProblems |
@@ -150,8 +150,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(AnnularWashPtr)) call AnnularWashPtr(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 | endsubroutine | ||||
subroutine ChangeAnnularFail(status) | subroutine ChangeAnnularFail(status) | ||||
@@ -178,8 +178,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(UpperRamWashPtr)) call UpperRamWashPtr(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 | endsubroutine | ||||
subroutine ChangeUpperRamFail(status) | subroutine ChangeUpperRamFail(status) | ||||
@@ -205,8 +205,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(MiddleRamWashPtr)) call MiddleRamWashPtr(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 | endsubroutine | ||||
subroutine ChangeMiddleRamFail(status) | subroutine ChangeMiddleRamFail(status) | ||||
@@ -233,8 +233,8 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! ! if(associated(LowerRamWashPtr)) call LowerRamWashPtr(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 | endsubroutine | ||||
subroutine ChangeLowerRamFail(status) | subroutine ChangeLowerRamFail(status) | ||||
@@ -268,24 +268,24 @@ module CBopProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(AccumulatorPumpLeakPtr)) call AccumulatorPumpLeakPtr(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 | endsubroutine | ||||
subroutine ChangeAccumulatorSystemFail(status) | subroutine ChangeAccumulatorSystemFail(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(AccumulatorSystemFailPtr)) call AccumulatorSystemFailPtr(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 | endsubroutine | ||||
subroutine ChangeAccumulatorSystemLeak(status) | subroutine ChangeAccumulatorSystemLeak(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(AccumulatorSystemLeakPtr)) call AccumulatorSystemLeakPtr(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 | endsubroutine | ||||
end module CBopProblems | end module CBopProblems |
@@ -225,8 +225,8 @@ use SimulationVariables !@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(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 | endsubroutine | ||||
subroutine ChangeManualChoke1Washout(status) | subroutine ChangeManualChoke1Washout(status) | ||||
@@ -256,8 +256,8 @@ use SimulationVariables !@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(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 | endsubroutine | ||||
subroutine ChangeManualChoke2Washout(status) | subroutine ChangeManualChoke2Washout(status) | ||||
@@ -226,8 +226,8 @@ use SimulationVariables !@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(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 | endsubroutine | ||||
subroutine ChangeManualChoke1Washout(status) | subroutine ChangeManualChoke1Washout(status) | ||||
@@ -257,8 +257,8 @@ use SimulationVariables !@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(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 | endsubroutine | ||||
subroutine ChangeManualChoke2Washout(status) | subroutine ChangeManualChoke2Washout(status) | ||||
@@ -75,24 +75,24 @@ module CDrillStemProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(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 | endsubroutine | ||||
subroutine ChangeStringTorqueIncrease(status) | subroutine ChangeStringTorqueIncrease(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(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 | endsubroutine | ||||
subroutine ChangeStringTorqueFluctuation(status) | subroutine ChangeStringTorqueFluctuation(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(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 | endsubroutine | ||||
end module CDrillStemProblems | end module CDrillStemProblems |
@@ -76,24 +76,24 @@ module CDrillStemProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(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 | endsubroutine | ||||
subroutine ChangeStringTorqueIncrease(status) | subroutine ChangeStringTorqueIncrease(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(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 | endsubroutine | ||||
subroutine ChangeStringTorqueFluctuation(status) | subroutine ChangeStringTorqueFluctuation(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(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 | endsubroutine | ||||
end module CDrillStemProblems | end module CDrillStemProblems |
@@ -262,8 +262,8 @@ use SimulationVariables !@@@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(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 | endsubroutine | ||||
subroutine ChangeTripTank(status) | subroutine ChangeTripTank(status) | ||||
@@ -290,16 +290,16 @@ use SimulationVariables !@@@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(MudTankVolumePtr)) call MudTankVolumePtr(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 | endsubroutine | ||||
subroutine ChangeReturnMudFlow(status) | subroutine ChangeReturnMudFlow(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(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 | endsubroutine | ||||
subroutine ChangeTorqueLimit(status) | subroutine ChangeTorqueLimit(status) | ||||
@@ -315,8 +315,8 @@ use SimulationVariables !@@@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(PowerLimitPtr)) call PowerLimitPtr(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 | endsubroutine | ||||
subroutine ChangeAccumulatorPressure(status) | subroutine ChangeAccumulatorPressure(status) | ||||
@@ -263,8 +263,8 @@ use SimulationVariables !@@@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(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 | endsubroutine | ||||
subroutine ChangeTripTank(status) | subroutine ChangeTripTank(status) | ||||
@@ -291,16 +291,16 @@ use SimulationVariables !@@@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(MudTankVolumePtr)) call MudTankVolumePtr(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 | endsubroutine | ||||
subroutine ChangeReturnMudFlow(status) | subroutine ChangeReturnMudFlow(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(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 | endsubroutine | ||||
subroutine ChangeTorqueLimit(status) | subroutine ChangeTorqueLimit(status) | ||||
@@ -316,8 +316,8 @@ use SimulationVariables !@@@ | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(PowerLimitPtr)) call PowerLimitPtr(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 | endsubroutine | ||||
subroutine ChangeAccumulatorPressure(status) | subroutine ChangeAccumulatorPressure(status) | ||||
@@ -84,8 +84,8 @@ module CKickProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(data%problems%KickProblems%KickPtr)) call data%problems%KickProblems%KickPtr(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 | endsubroutine | ||||
@@ -85,8 +85,8 @@ module CKickProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(data%problems%KickProblems%KickPtr)) call data%problems%KickProblems%KickPtr(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 | endsubroutine | ||||
@@ -68,8 +68,8 @@ module CLostProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(LostCirculationPtr)) call LostCirculationPtr(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 | endsubroutine | ||||
@@ -69,8 +69,8 @@ module CLostProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
! if(associated(LostCirculationPtr)) call LostCirculationPtr(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 | endsubroutine | ||||
@@ -89,32 +89,32 @@ module CMudTreatmentProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(DegasserPtr)) call DegasserPtr(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 | endsubroutine | ||||
subroutine ChangeShaleShaker(status) | subroutine ChangeShaleShaker(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(ShaleShakerPtr)) call ShaleShakerPtr(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 | endsubroutine | ||||
subroutine ChangeDesander(status) | subroutine ChangeDesander(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(DesanderPtr)) call DesanderPtr(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 | endsubroutine | ||||
subroutine ChangeDesilter(status) | subroutine ChangeDesilter(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(DesilterPtr)) call DesilterPtr(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 | endsubroutine | ||||
end module CMudTreatmentProblems | end module CMudTreatmentProblems |
@@ -90,32 +90,32 @@ module CMudTreatmentProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(DegasserPtr)) call DegasserPtr(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 | endsubroutine | ||||
subroutine ChangeShaleShaker(status) | subroutine ChangeShaleShaker(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(ShaleShakerPtr)) call ShaleShakerPtr(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 | endsubroutine | ||||
subroutine ChangeDesander(status) | subroutine ChangeDesander(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(DesanderPtr)) call DesanderPtr(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 | endsubroutine | ||||
subroutine ChangeDesilter(status) | subroutine ChangeDesilter(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(DesilterPtr)) call DesilterPtr(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 | endsubroutine | ||||
end module CMudTreatmentProblems | end module CMudTreatmentProblems |
@@ -125,16 +125,16 @@ module COtherProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(RigAlarmPtr)) call RigAlarmPtr(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 | endsubroutine | ||||
subroutine ChangeRigWaterSupply(status) | subroutine ChangeRigWaterSupply(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(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 | endsubroutine | ||||
subroutine ChangeRigAir(status) | subroutine ChangeRigAir(status) | ||||
@@ -150,64 +150,64 @@ module COtherProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen1Ptr)) call Gen1Ptr(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 | endsubroutine | ||||
subroutine ChangeGen2(status) | subroutine ChangeGen2(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen2Ptr)) call Gen2Ptr(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 | endsubroutine | ||||
subroutine ChangeGen3(status) | subroutine ChangeGen3(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen3Ptr)) call Gen3Ptr(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 | endsubroutine | ||||
subroutine ChangeGen4(status) | subroutine ChangeGen4(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen4Ptr)) call Gen4Ptr(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 | endsubroutine | ||||
subroutine ChangeScr1(status) | subroutine ChangeScr1(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr1Ptr)) call Scr1Ptr(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 | endsubroutine | ||||
subroutine ChangeScr2(status) | subroutine ChangeScr2(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr2Ptr)) call Scr2Ptr(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 | endsubroutine | ||||
subroutine ChangeScr3(status) | subroutine ChangeScr3(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr3Ptr)) call Scr3Ptr(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 | endsubroutine | ||||
subroutine ChangeScr4(status) | subroutine ChangeScr4(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr4Ptr)) call Scr4Ptr(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 | endsubroutine | ||||
@@ -126,16 +126,16 @@ module COtherProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(RigAlarmPtr)) call RigAlarmPtr(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 | endsubroutine | ||||
subroutine ChangeRigWaterSupply(status) | subroutine ChangeRigWaterSupply(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(RigWaterSupplyPtr)) call RigWaterSupplyPtr(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 | endsubroutine | ||||
subroutine ChangeRigAir(status) | subroutine ChangeRigAir(status) | ||||
@@ -151,64 +151,64 @@ module COtherProblems | |||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen1Ptr)) call Gen1Ptr(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 | endsubroutine | ||||
subroutine ChangeGen2(status) | subroutine ChangeGen2(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen2Ptr)) call Gen2Ptr(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 | endsubroutine | ||||
subroutine ChangeGen3(status) | subroutine ChangeGen3(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen3Ptr)) call Gen3Ptr(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 | endsubroutine | ||||
subroutine ChangeGen4(status) | subroutine ChangeGen4(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Gen4Ptr)) call Gen4Ptr(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 | endsubroutine | ||||
subroutine ChangeScr1(status) | subroutine ChangeScr1(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr1Ptr)) call Scr1Ptr(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 | endsubroutine | ||||
subroutine ChangeScr2(status) | subroutine ChangeScr2(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr2Ptr)) call Scr2Ptr(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 | endsubroutine | ||||
subroutine ChangeScr3(status) | subroutine ChangeScr3(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr3Ptr)) call Scr3Ptr(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 | endsubroutine | ||||
subroutine ChangeScr4(status) | subroutine ChangeScr4(status) | ||||
implicit none | implicit none | ||||
integer, intent (in) :: status | integer, intent (in) :: status | ||||
!if(associated(Scr4Ptr)) call Scr4Ptr(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 | endsubroutine | ||||
@@ -17,7 +17,7 @@ module BOP | |||||
data%State%BopStackInput%BOP_timeCounter= data%State%BopStackInput%BOP_timeCounter + 1 | 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 | data%Equipments%BopControlPanel%AirSupplyPressureGauge= (1 - data%State%BopStackAcc%AirSupplyPressureGaugeMalf)* (1 - data%State%BopStackAcc%RigAirMalf) *120. !psi | ||||
@@ -24,7 +24,7 @@ use SimulationVariables !@ | |||||
implicit none | implicit none | ||||
INTEGER CHNUMBER | INTEGER CHNUMBER | ||||
IF(data%Equipments%ChokeControlPanel%ChokeSelectorSwitch== 1) THEN | |||||
IF(data%Equipments%ChokeControlPanel%ChokeSelectorSwitch) THEN | |||||
data%Equipments%ChokeControlPanel%Choke1LED=1 | data%Equipments%ChokeControlPanel%Choke1LED=1 | ||||
data%Equipments%ChokeControlPanel%Choke2LED=0 | data%Equipments%ChokeControlPanel%Choke2LED=0 | ||||
CHNUMBER=1 | CHNUMBER=1 | ||||
@@ -9,21 +9,41 @@ subroutine Drawworks_Direction | |||||
IMPLICIT NONE | 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%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_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%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] | 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%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_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%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] | 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 | end if | ||||
@@ -39,8 +59,6 @@ subroutine Drawworks_Direction | |||||
!if (data%State%Drawworks%Conv_Ratio==1.d0) then | !if (data%State%Drawworks%Conv_Ratio==1.d0) then | ||||
! | ! | ||||
! | ! | ||||
@@ -8,7 +8,7 @@ subroutine Drawworks_MainSolver | |||||
Call Drawworks_Inputs | 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 | data%State%Drawworks%K_Throttle = 1 | ||||
end if | end if | ||||
@@ -22,7 +22,7 @@ subroutine Drawworks_Solver | |||||
!>>>>>>>>>>>>>>>>>>>> Speed <<<<<<<<<<<<<<<<<<<<<<<< | !>>>>>>>>>>>>>>>>>>>> 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] | !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 | !IF (data%State%Drawworks%N_Throtle>data%State%Drawworks%N_Accelarator) THEN | ||||
@@ -247,14 +247,6 @@ subroutine Drawworks_Solver | |||||
end if | end if | ||||
return | return | ||||
end if | end if | ||||
!=====> BottomHole ROP Condition | !=====> 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 | 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(Pump2_Lasts%Length() <= 0) cycle | ||||
if(any(Pump2_Lasts%Array == Pump1_Lasts%Array(i))) then | if(any(Pump2_Lasts%Array == Pump1_Lasts%Array(i))) then | ||||
State2 = .true. ! Pumps 1 & 2 have same destination | State2 = .true. ! Pumps 1 & 2 have same destination | ||||
!print*, 'State2 = .true.' | |||||
!if(print_log) print*, 'State2 = .true.' | |||||
endif | endif | ||||
if(Pump3_Lasts%Length() <= 0) cycle | if(Pump3_Lasts%Length() <= 0) cycle | ||||
if(any(Pump3_Lasts%Array == Pump1_Lasts%Array(i))) then | if(any(Pump3_Lasts%Array == Pump1_Lasts%Array(i))) then | ||||
State3 = .true. ! Pumps 1 & 3 have same destination | State3 = .true. ! Pumps 1 & 3 have same destination | ||||
!print*, 'State3 = .true.' | |||||
!if(print_log) print*, 'State3 = .true.' | |||||
endif | endif | ||||
enddo | enddo | ||||
@@ -2569,12 +2569,12 @@ use SimulationVariables !@ | |||||
if(Pump3_Lasts%Length() <= 0) cycle | if(Pump3_Lasts%Length() <= 0) cycle | ||||
if(any(Pump3_Lasts%Array == Pump2_Lasts%Array(i))) then | if(any(Pump3_Lasts%Array == Pump2_Lasts%Array(i))) then | ||||
State4 = .true. ! Pumps 2 & 3 have same destination | State4 = .true. ! Pumps 2 & 3 have same destination | ||||
!print*, 'State4 = .true.' | |||||
!if(print_log) print*, 'State4 = .true.' | |||||
endif | endif | ||||
enddo | enddo | ||||
State1 = State2 .and. State3 ! Pumps 1 & 2 & 3 have same destination | 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 | end subroutine | ||||
@@ -2650,18 +2650,18 @@ use SimulationVariables !@ | |||||
!ThereIsPathFrom82 = .false. | !ThereIsPathFrom82 = .false. | ||||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!ThereIsPathFrom83 = .false. | !ThereIsPathFrom83 = .false. | ||||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!ThereIsPathFrom84 = .false. | !ThereIsPathFrom84 = .false. | ||||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
ThereIsPathFrom_71_72_73_To_82 = .false. | 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. | 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. | 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. | DumpFromKelly_Pump1 = .false. | ||||
DumpFromFillupHead_Pump1 = .false. | DumpFromFillupHead_Pump1 = .false. | ||||
@@ -2728,55 +2728,55 @@ use SimulationVariables !@ | |||||
if(valves(first) == 83) call Pump2_Lasts%Add(valves(last)) | if(valves(first) == 83) call Pump2_Lasts%Add(valves(last)) | ||||
if(valves(first) == 84) call Pump3_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() | !do i = 1, Pump1_Lasts%Length() | ||||
! print*, 'mp1=', Pump1_Lasts%Array(i) | |||||
! if(print_log) print*, 'mp1=', Pump1_Lasts%Array(i) | |||||
!enddo | !enddo | ||||
! | ! | ||||
!print*, '-------------------------------' | |||||
!if(print_log) print*, '-------------------------------' | |||||
! | ! | ||||
!do i = 1, Pump2_Lasts%Length() | !do i = 1, Pump2_Lasts%Length() | ||||
! print*, 'mp2=', Pump2_Lasts%Array(i) | |||||
! if(print_log) print*, 'mp2=', Pump2_Lasts%Array(i) | |||||
!enddo | !enddo | ||||
! | ! | ||||
!print*, '-------------------------------' | |||||
!if(print_log) print*, '-------------------------------' | |||||
! | ! | ||||
! | ! | ||||
!do i = 1, Pump3_Lasts%Length() | !do i = 1, Pump3_Lasts%Length() | ||||
! print*, 'mp3=', Pump3_Lasts%Array(i) | |||||
! if(print_log) print*, 'mp3=', Pump3_Lasts%Array(i) | |||||
!enddo | !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 | !if(valves(first)==82 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | ||||
! ThereIsPathFrom82 = .true. | ! ThereIsPathFrom82 = .true. | ||||
! !print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
! !if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!endif | !endif | ||||
! | ! | ||||
!if(valves(first)==83 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | !if(valves(first)==83 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | ||||
! ThereIsPathFrom83 = .true. | ! ThereIsPathFrom83 = .true. | ||||
! !print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||||
! !if(print_log) print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||||
!endif | !endif | ||||
! | ! | ||||
!if(valves(first)==84 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | !if(valves(first)==84 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | ||||
! ThereIsPathFrom84 = .true. | ! ThereIsPathFrom84 = .true. | ||||
! !print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||||
! !if(print_log) print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||||
!endif | !endif | ||||
if(valves(last)==82 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | if(valves(last)==82 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | ||||
ThereIsPathFrom_71_72_73_To_82 = .true. | 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 | endif | ||||
if(valves(last)==83 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | if(valves(last)==83 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | ||||
ThereIsPathFrom_71_72_73_To_83 = .true. | 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 | endif | ||||
if(valves(last)==84 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | if(valves(last)==84 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | ||||
ThereIsPathFrom_71_72_73_To_84 = .true. | 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 | endif | ||||
!if (.not.allocated(OpenPaths)) exit | !if (.not.allocated(OpenPaths)) exit | ||||
@@ -3031,7 +3031,7 @@ use SimulationVariables !@ | |||||
if(valves(first)==83) then | if(valves(first)==83) then | ||||
!DumpPump2=1 | !DumpPump2=1 | ||||
print*, "THERE IS DUMP" | |||||
if(print_log) print*, "THERE IS DUMP" | |||||
condition27 = .true. | condition27 = .true. | ||||
IF(any(valves == 56)) DumpFromKelly_Pump2 = .true. | IF(any(valves == 56)) DumpFromKelly_Pump2 = .true. | ||||
IF(any(valves == 14)) DumpFromFillupHead_Pump2 = .true. | IF(any(valves == 14)) DumpFromFillupHead_Pump2 = .true. | ||||
@@ -2556,12 +2556,12 @@ use SimulationVariables !@ | |||||
if(Pump2_Lasts%Length() <= 0) cycle | if(Pump2_Lasts%Length() <= 0) cycle | ||||
if(any(Pump2_Lasts%Array == Pump1_Lasts%Array(i))) then | if(any(Pump2_Lasts%Array == Pump1_Lasts%Array(i))) then | ||||
State2 = .true. ! Pumps 1 & 2 have same destination | State2 = .true. ! Pumps 1 & 2 have same destination | ||||
!print*, 'State2 = .true.' | |||||
!if(print_log) print*, 'State2 = .true.' | |||||
endif | endif | ||||
if(Pump3_Lasts%Length() <= 0) cycle | if(Pump3_Lasts%Length() <= 0) cycle | ||||
if(any(Pump3_Lasts%Array == Pump1_Lasts%Array(i))) then | if(any(Pump3_Lasts%Array == Pump1_Lasts%Array(i))) then | ||||
State3 = .true. ! Pumps 1 & 3 have same destination | State3 = .true. ! Pumps 1 & 3 have same destination | ||||
!print*, 'State3 = .true.' | |||||
!if(print_log) print*, 'State3 = .true.' | |||||
endif | endif | ||||
enddo | enddo | ||||
@@ -2570,12 +2570,12 @@ use SimulationVariables !@ | |||||
if(Pump3_Lasts%Length() <= 0) cycle | if(Pump3_Lasts%Length() <= 0) cycle | ||||
if(any(Pump3_Lasts%Array == Pump2_Lasts%Array(i))) then | if(any(Pump3_Lasts%Array == Pump2_Lasts%Array(i))) then | ||||
State4 = .true. ! Pumps 2 & 3 have same destination | State4 = .true. ! Pumps 2 & 3 have same destination | ||||
!print*, 'State4 = .true.' | |||||
!if(print_log) print*, 'State4 = .true.' | |||||
endif | endif | ||||
enddo | enddo | ||||
State1 = State2 .and. State3 ! Pumps 1 & 2 & 3 have same destination | 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 | end subroutine | ||||
@@ -2651,18 +2651,18 @@ use SimulationVariables !@ | |||||
!ThereIsPathFrom82 = .false. | !ThereIsPathFrom82 = .false. | ||||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!ThereIsPathFrom83 = .false. | !ThereIsPathFrom83 = .false. | ||||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!ThereIsPathFrom84 = .false. | !ThereIsPathFrom84 = .false. | ||||
!!print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!!if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
ThereIsPathFrom_71_72_73_To_82 = .false. | 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. | 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. | 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. | DumpFromKelly_Pump1 = .false. | ||||
DumpFromFillupHead_Pump1 = .false. | DumpFromFillupHead_Pump1 = .false. | ||||
@@ -2729,55 +2729,55 @@ use SimulationVariables !@ | |||||
if(valves(first) == 83) call Pump2_Lasts%Add(valves(last)) | if(valves(first) == 83) call Pump2_Lasts%Add(valves(last)) | ||||
if(valves(first) == 84) call Pump3_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() | !do i = 1, Pump1_Lasts%Length() | ||||
! print*, 'mp1=', Pump1_Lasts%Array(i) | |||||
! if(print_log) print*, 'mp1=', Pump1_Lasts%Array(i) | |||||
!enddo | !enddo | ||||
! | ! | ||||
!print*, '-------------------------------' | |||||
!if(print_log) print*, '-------------------------------' | |||||
! | ! | ||||
!do i = 1, Pump2_Lasts%Length() | !do i = 1, Pump2_Lasts%Length() | ||||
! print*, 'mp2=', Pump2_Lasts%Array(i) | |||||
! if(print_log) print*, 'mp2=', Pump2_Lasts%Array(i) | |||||
!enddo | !enddo | ||||
! | ! | ||||
!print*, '-------------------------------' | |||||
!if(print_log) print*, '-------------------------------' | |||||
! | ! | ||||
! | ! | ||||
!do i = 1, Pump3_Lasts%Length() | !do i = 1, Pump3_Lasts%Length() | ||||
! print*, 'mp3=', Pump3_Lasts%Array(i) | |||||
! if(print_log) print*, 'mp3=', Pump3_Lasts%Array(i) | |||||
!enddo | !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 | !if(valves(first)==82 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | ||||
! ThereIsPathFrom82 = .true. | ! ThereIsPathFrom82 = .true. | ||||
! !print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
! !if(print_log) print*, "ThereIsPathFrom82=",ThereIsPathFrom82 | |||||
!endif | !endif | ||||
! | ! | ||||
!if(valves(first)==83 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | !if(valves(first)==83 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | ||||
! ThereIsPathFrom83 = .true. | ! ThereIsPathFrom83 = .true. | ||||
! !print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||||
! !if(print_log) print*, "ThereIsPathFrom83=",ThereIsPathFrom83 | |||||
!endif | !endif | ||||
! | ! | ||||
!if(valves(first)==84 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | !if(valves(first)==84 .and. (valves(last)==79 .or. valves(last)==78 .or. valves(last)==77 .or. valves(last)==71)) then | ||||
! ThereIsPathFrom84 = .true. | ! ThereIsPathFrom84 = .true. | ||||
! !print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||||
! !if(print_log) print*, "ThereIsPathFrom84=",ThereIsPathFrom84 | |||||
!endif | !endif | ||||
if(valves(last)==82 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | if(valves(last)==82 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | ||||
ThereIsPathFrom_71_72_73_To_82 = .true. | 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 | endif | ||||
if(valves(last)==83 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | if(valves(last)==83 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | ||||
ThereIsPathFrom_71_72_73_To_83 = .true. | 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 | endif | ||||
if(valves(last)==84 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | if(valves(last)==84 .and. (valves(first)==71 .or. valves(first)==72 .or. valves(first)==73)) then | ||||
ThereIsPathFrom_71_72_73_To_84 = .true. | 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 | endif | ||||
!if (.not.allocated(OpenPaths)) exit | !if (.not.allocated(OpenPaths)) exit | ||||
@@ -3032,7 +3032,7 @@ use SimulationVariables !@ | |||||
if(valves(first)==83) then | if(valves(first)==83) then | ||||
!DumpPump2=1 | !DumpPump2=1 | ||||
print*, "THERE IS DUMP" | |||||
if(print_log) print*, "THERE IS DUMP" | |||||
condition27 = .true. | condition27 = .true. | ||||
IF(any(valves == 56)) DumpFromKelly_Pump2 = .true. | IF(any(valves == 56)) DumpFromKelly_Pump2 = .true. | ||||
IF(any(valves == 14)) DumpFromFillupHead_Pump2 = .true. | IF(any(valves == 14)) DumpFromFillupHead_Pump2 = .true. | ||||
@@ -16,13 +16,13 @@ module MudSystemMain | |||||
subroutine MudSystem_Stop | subroutine MudSystem_Stop | ||||
implicit none | implicit none | ||||
!print* , 'MudSystem_Stop' | |||||
!if(print_log) print* , 'MudSystem_Stop' | |||||
CALL DEALLOCATE_ARRAYS_MudSystem() | CALL DEALLOCATE_ARRAYS_MudSystem() | ||||
end subroutine MudSystem_Stop | end subroutine MudSystem_Stop | ||||
subroutine MudSystem_Init | subroutine MudSystem_Init | ||||
implicit none | implicit none | ||||
!print* , 'MudSystem_Start' | |||||
!if(print_log) print* , 'MudSystem_Start' | |||||
CALL MudSystem_StartUp() | CALL MudSystem_StartUp() | ||||
end subroutine MudSystem_Init | end subroutine MudSystem_Init | ||||
@@ -30,7 +30,7 @@ module MudSystemMain | |||||
use MudSystemModule | use MudSystemModule | ||||
use CManifolds | use CManifolds | ||||
implicit none | implicit none | ||||
!print* , 'MudSystem_Step' | |||||
!if(print_log) print* , 'MudSystem_Step' | |||||
!CALL main | !CALL main | ||||
if(Manifold%IsTraverse) then | if(Manifold%IsTraverse) then | ||||
call LineupAndPath() | call LineupAndPath() | ||||
@@ -1628,14 +1628,14 @@ use SimulationVariables !@@@ | |||||
!WellToChokeManifoldWasOpen | !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.)) | 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 (*,*) 'WellToChokeManifoldWasOpen-Sound', WellToChokeManifoldWasOpen | ||||
WRITE (*,*) 'WellToChokeManifoldOpen', data%State%MudSystem%WellToChokeManifoldOpen | WRITE (*,*) 'WellToChokeManifoldOpen', data%State%MudSystem%WellToChokeManifoldOpen | ||||
else | else | ||||
data%State%MudSystem%SoundGasThroughChoke = 0 | data%State%MudSystem%SoundGasThroughChoke = 0 | ||||
print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||||
if(print_log) print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||||
endif | endif | ||||
!print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||||
!if(print_log) print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||||
@@ -1629,14 +1629,14 @@ use SimulationVariables !@@@ | |||||
!WellToChokeManifoldWasOpen | !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.)) | 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 (*,*) 'WellToChokeManifoldWasOpen-Sound', WellToChokeManifoldWasOpen | ||||
WRITE (*,*) 'WellToChokeManifoldOpen', data%State%MudSystem%WellToChokeManifoldOpen | WRITE (*,*) 'WellToChokeManifoldOpen', data%State%MudSystem%WellToChokeManifoldOpen | ||||
else | else | ||||
data%State%MudSystem%SoundGasThroughChoke = 0 | data%State%MudSystem%SoundGasThroughChoke = 0 | ||||
print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||||
if(print_log) print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke | |||||
endif | endif | ||||
!print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||||
!if(print_log) print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke | |||||
@@ -191,7 +191,7 @@ module PumpsMain | |||||
! !! | ! !! | ||||
! !! Call DATE_AND_TIME(values=MP_END_TIME) | ! !! 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)) | ! !! 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 | ! !! if(MP_SolDuration > 0.0) then | ||||
! !! Call sleepqq(MP_SolDuration) | ! !! Call sleepqq(MP_SolDuration) | ||||
! !! end if | ! !! end if | ||||
@@ -192,7 +192,7 @@ module PumpsMain | |||||
! !! | ! !! | ||||
! !! Call DATE_AND_TIME(values=MP_END_TIME) | ! !! 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)) | ! !! 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 | ! !! if(MP_SolDuration > 0.0) then | ||||
! !! Call sleepqq(MP_SolDuration) | ! !! Call sleepqq(MP_SolDuration) | ||||
! !! end if | ! !! end if | ||||