The usual cause is a bad adapter plug (replace the adapter) or a bad DC jack (inside the system). If the system is under warranty, call Dell and they'll likely replace in that order.  If not, start with a new OEM Dell adapter.  If that too is unrecognized, replace the DC jack.  
The Charger is connected, battery status is plugged in but not charging. The problem is not regularly some time working and some time not working properly. I have many times contact technical team, but they have give temporary solution only.  I have attached some images.   [IMAGE]   [IMAGE]  
Dell G5 15 500 charging not properly work