Dyspeptic symptoms, such as pain after eating, bloating and nausea all have major impact on quality of life and health care costs. When no structural cause is identified, patients are diagnosed with functional dyspepsia. This trial aims to identify objective abnormalities of stomach function that explain patient's symptoms and establish diagnosis. Another group are diabetic patients who can often develop similar symptoms, labelled as diabetic gastroparesis. In some cases this is associated with delayed gastric emptying but not all.