An electrocardiogram machine, also known as an ECG machine, is used to measure the electrical activity of the heart. It is a non-invasive test that is used to diagnose heart conditions. The ECG machine records the electrical activity of the heart through electrodes that are placed on the chest. The machine then produces a tracing of the heart’s electrical activity.