The grounding of the electromagnetic flowmeter is equipped with a grounding ring, and then the grounding ring is connected to the pipeline. If it’s lined, you need a third electrode to ground it.
Electromagnetic flowmeter grounding problem