To control the MR Damper, I need to measure the movement between the spring mass and the unsprung mass in the motorcycle. It does use srf04 Module and Arduino.but when the motorcycle is off, measure OK and when the ON measurement is stopped. Why? And what is the solution to the problem?

Electrical interference from the ignition circuit?

Don't know, insufficient detail.

(And don't bother looking for your other post on this subject; I deleted it)

Post a complete wiring diagram of your setup!

While the motor is off you have a clean voltage from the battery. While the motor is running the lighting dynamo and some consumers (p.e. ignition system) will provide a lot of noise on that voltage. Without precautions your measurements may go wild.