module CChokeControlPanel use CChokeControlPanelVariables implicit none public contains ! Input routines subroutine SetChokePanelPumpSelectorSwitch(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetChokePanelPumpSelectorSwitch !DEC$ ATTRIBUTES ALIAS: 'SetChokePanelPumpSelectorSwitch' :: SetChokePanelPumpSelectorSwitch implicit none integer, intent(in) :: v ChokePanelPumpSelectorSwitch = v #ifdef deb print*, 'ChokePanelPumpSelectorSwitch=', ChokePanelPumpSelectorSwitch #endif end subroutine subroutine SetChokePanelStrokeResetSwitch(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetChokePanelStrokeResetSwitch !DEC$ ATTRIBUTES ALIAS: 'SetChokePanelStrokeResetSwitch' :: SetChokePanelStrokeResetSwitch implicit none logical, intent(in) :: v ChokePanelStrokeResetSwitch = v #ifdef deb print*, 'ChokePanelStrokeResetSwitch=', ChokePanelStrokeResetSwitch #endif end subroutine subroutine SetChokeSelectorSwitch(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetChokeSelectorSwitch !DEC$ ATTRIBUTES ALIAS: 'SetChokeSelectorSwitch' :: SetChokeSelectorSwitch implicit none logical, intent(in) :: v ChokeSelectorSwitch = v #ifdef deb print*, 'ChokeSelectorSwitch=', ChokeSelectorSwitch #endif end subroutine subroutine SetChokeRateControlKnob(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetChokeRateControlKnob !DEC$ ATTRIBUTES ALIAS: 'SetChokeRateControlKnob' :: SetChokeRateControlKnob implicit none real*8, intent(in) :: v !character(8) :: date !character(10) :: time !character(5) :: zone !integer,dimension(8) :: values ChokeRateControlKnob = v #ifdef deb !call date_and_time(date,time,zone,values) !!print '(a,2x,a,2x,a)', date, time, zone !print '(8i5)', values print*, 'ChokeRateControlKnob=', ChokeRateControlKnob #endif end subroutine subroutine SetChokeControlLever(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetChokeControlLever !DEC$ ATTRIBUTES ALIAS: 'SetChokeControlLever' :: SetChokeControlLever implicit none real*8, intent(in) :: v ChokeControlLever = v #ifdef deb print*, 'ChokeControlLever=', ChokeControlLever #endif end subroutine subroutine SetChokePanelRigAirSwitch(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetChokePanelRigAirSwitch !DEC$ ATTRIBUTES ALIAS: 'SetChokePanelRigAirSwitch' :: SetChokePanelRigAirSwitch implicit none logical, intent(in) :: v ChokePanelRigAirSwitch = v #ifdef deb print*, 'ChokePanelRigAirSwitch=', ChokePanelRigAirSwitch #endif end subroutine subroutine SetEnableAutoChoke(v) !DEC$ ATTRIBUTES DLLEXPORT :: SetEnableAutoChoke !DEC$ ATTRIBUTES ALIAS: 'SetEnableAutoChoke' :: SetEnableAutoChoke implicit none logical, intent(in) :: v EnableAutoChoke = v #ifdef deb print*, 'EnableAutoChoke=', EnableAutoChoke #endif end subroutine ! Output routines real(8) function GetStandPipePressure() !DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipePressure !DEC$ ATTRIBUTES ALIAS: 'GetStandPipePressure' :: GetStandPipePressure implicit none GetStandPipePressure = StandPipePressure end function real(8) function GetCasingPressure() !DEC$ ATTRIBUTES DLLEXPORT :: GetCasingPressure !DEC$ ATTRIBUTES ALIAS: 'GetCasingPressure' :: GetCasingPressure implicit none GetCasingPressure = CasingPressure end function real(8) function GetChokePosition() !DEC$ ATTRIBUTES DLLEXPORT :: GetChokePosition !DEC$ ATTRIBUTES ALIAS: 'GetChokePosition' :: GetChokePosition implicit none GetChokePosition = ChokePosition end function real(8) function GetChokePanelSPMCounter() !DEC$ ATTRIBUTES DLLEXPORT :: GetChokePanelSPMCounter !DEC$ ATTRIBUTES ALIAS: 'GetChokePanelSPMCounter' :: GetChokePanelSPMCounter implicit none !GetChokePanelSPMCounter = 0 GetChokePanelSPMCounter = ChokePanelSPMCounter end function real(8) function GetChokePanelTotalStrokeCounter() !DEC$ ATTRIBUTES DLLEXPORT :: GetChokePanelTotalStrokeCounter !DEC$ ATTRIBUTES ALIAS: 'GetChokePanelTotalStrokeCounter' :: GetChokePanelTotalStrokeCounter implicit none !GetChokePanelTotalStrokeCounter = 0 GetChokePanelTotalStrokeCounter = ChokePanelTotalStrokeCounter end function integer function GetChoke1LED() !DEC$ ATTRIBUTES DLLEXPORT :: GetChoke1LED !DEC$ ATTRIBUTES ALIAS: 'GetChoke1LED' :: GetChoke1LED implicit none GetChoke1LED = Choke1LED end function integer function GetChoke2LED() !DEC$ ATTRIBUTES DLLEXPORT :: GetChoke2LED !DEC$ ATTRIBUTES ALIAS: 'GetChoke2LED' :: GetChoke2LED implicit none GetChoke2LED = Choke2LED end function end module CChokeControlPanel