You are on page 1of 2

program

alias SUM PROJ_TOT_OIL.CPV


alias HOUR PROJ_TOT_OIL.P01
alias MIN PROJ_TOT_OIL.P02
alias hours PROJ_TOT_OIL.P03
alias ProjYield PROJ_TOT_OIL.CPV1

!*********************************************************************
**********************************************************
!Program Modification to fix FCS One Hour Offset
! When FCS GMT offset is fixed disable the logic in this box and
enable the logic out side the box

alias CURR_HOUR PROJ_TOT_OIL.P04


!CURR_HOUR = SYS_TIME1.CURHR

!if (CURR_HOUR < 23) then


! HOUR = SYS_TIME1.CURHR + 1 !get the current hour of day
+1 is added to compensate 1 hour offset due to FCS GMT Settings.
!else if (CURR_HOUR == 23) then
! HOUR = 0
!end if

!*********************************************************************
************************************************************

HOUR = SYS_TIME1.CURHR

MIN = SYS_TIME1.CURMIN !get the current minutes


of running hour of day
hours = (MIN / 60) + HOUR !total hours elapsed of
current day
SUM = FIT8405A_TOT.SUM + FIT8405B_TOT.SUM !get today's total
uptill current time
if (hours==0) then
SUM = (SUM*24) !this is the projected total of the day
else if (hours > 0) then
SUM = (SUM*24)/hours !this is the projected total of the day
end if

if (RV == 0) then
ProjYield = Sum/(RV + 1)
else if (RV > 0) then
ProjYield = Sum/RV
end if

!ProjYield = Sum/RV !Project Oil Yield =


Projected Total Oil/Projected Gas Processed

End
%%XL8405DI
%%XS8405DO
%%XI8405DI

You might also like