According my testing, I found the battery only supply load when there is not grid connection, is this correct??
No, that’s not correct. In any time step in which the renewable power cannot meet the load by itself and the system must generate power from some dispatchable source (i.e. run a generator, buy grid power, or discharge the battery) HOMER will search for the cheapest possible way to meet the load. In grid-battery systems, the cheapest approach is almost always to buy grid power, so HOMER seldom discharges batteries in grid-battery systems.
If energy from the battery is the cheapest way to meet the load, HOMER will choose to discharge the battery. However, the battery must be charged to provide energy. The dispatch strategy that you select can influence whether HOMER decides to charge the battery. The dispatch strategy options can be found under the System Control Inputs.
In a system with only a battery bank, a converter, a grid connection, and electric load(s) you must use the cycle charging disptach strategy to get the grid to charge the battery. You must also apply a setpoint of charge (SOC) greater than zero.