20x4 Jumbo LCD erroneous display with arduino mega.

Dear friends,

We have automated an industrial surface grinder with the help of Arduino mega, stepper drives and motors.

The logic of the program works fine except on rare occasions, it suddenly changes the motor direction. Apart from that, the display is not stable. I am attaching few videos to get an idea of it.

Erroneous LCD display :

Working of the surface grinder :

Also i am attaching an image of the wiring between the arduino and lcd screen.

Any help will be highly appreciated.
Thank you.