Your resting electrocardiogram, or ECG, offers a record of your cardiac electrical function while you're at stillness. Basically , it detects the waves that initiate your heart to contract. Doctors use this test to assess for existing cardiac problems , such as arrhythmias , signs of a previous heart event, or electrolyte imbalances . While it may