module CBopControlPanel
    ! use CBopControlPanel
    use SimulationVariables
    implicit none    
    public    
    contains

    ! subroutine BopControlPanelToJson(parent)
        
    ! end subroutine
    subroutine OpenAnnular()
        use CManifolds
        implicit none
        call ChangeValve(52, .true.)
    end subroutine
    
    subroutine CloseAnnular()
        use CManifolds
        implicit none
        call ChangeValve(52, .false.)
    end subroutine
    
    subroutine OpenUpperRams()
        use CManifolds
        implicit none
        call ChangeValve(51, .true.)
    end subroutine
    
    subroutine CloseUpperRams()
        use CManifolds
        implicit none
        call ChangeValve(51, .false.)
    end subroutine
    
    subroutine OpenMiddleRams()
        use CManifolds
        implicit none
        call ToggleMiddleRams(.true.)
    end subroutine
    
    subroutine CloseMiddleRams()
        use CManifolds
        implicit none
        call ToggleMiddleRams(.false.)
    end subroutine
    
    subroutine OpenKillLine()
        use CManifolds
        implicit none
        call ChangeValve(46, .true.)        
    end subroutine
    
    subroutine CloseKillLine()
        use CManifolds
        implicit none
        call ChangeValve(46, .false.)        
    end subroutine
    
    subroutine OpenChokeLine()
        use CManifolds
        implicit none
        call ChangeValve(47, .true.)
         !WRITE (*,*) ' valve 47 true '
    end subroutine
    
    subroutine CloseChokeLine()
        use CManifolds
        implicit none
        call ChangeValve(47, .false.)
         !WRITE (*,*) ' valve 47 false '
    end subroutine
    
    subroutine OpenLowerRams()
        use CManifolds
        implicit none
        call ChangeValve(49, .true.)
        !WRITE (*,*) ' valve 49 true '
    end subroutine
    
    subroutine CloseLowerRams()
        use CManifolds
        implicit none
        call ChangeValve(49, .false.)
        !WRITE (*,*) ' valve 49 false '
    end subroutine

 end module CBopControlPanel
