Electrocardiography is commonly referred to as EKG or ECG. A doctor may order an EKG to diagnose heart rhythm or heart structure problems, or a heart attack. The ECG procedure lasts 30 to 60 seconds and is accomplished by attaching 12 to 15 electrodes to the skin on your arms, legs, chest and/or back. A treadmill EKG lasts approximately 30 minutes and includes monitoring blood pressure and assessment of exercise capacity. This test is important to perform when someone wishes to start a vigorous exercise program.