Renewable energy-based microgrids have become an emerging area in the power and energy sector. Due to the uncertainty of renewable generation, optimising the operation of a renewable energy-based microgrid is critical in order to maximise financial benefits. This paper proposes a development of control logic to enable optimisation of a battery energy storage system operating in conjunction with renewable generation and load within the microgrid under different tariff schemes. Each scenario associated with the proposed control logic is analysed to observe the cost variations. The control logic extends the operational hours of the energy storage system targeting a high financial gain. The results show that the different scenarios associated with the operational logic of the microgrid significantly affect the financial savings, especially for long term operation. Also, the proposed work emphasises the need to optimise operation of multiple generating resources within a renewable energy-based microgrid.