Synchronisation with Twin Linear Emcodes

below are the available tools:

Arduino Mega 2560 Rev.3

I have 2 linear encoders.

2 hydraulic cylinders

2 selenoid proportional valves.

my question :

can these two hydraulic cylinders move the same and always synchronous?

if there is a special tool that can move two hydraulics always synchronous, tell me the name of the tool?

if the code must use PID, please teach me how?

Is there a sample code in Arduino to move the hydraulic cylinder synchronously?

I beg for your help, I really appreciate your suggestions and your work.

i love arduino

For Hydraulics it is usually just a "Y" adaptor in the feed and return to tank hydraulic lines to a matched pair of cylinders.

Usually as close to centre of the feed as possible.

If you want to also pressure the return use a CO shuttle valve with a return to tank port from the pressure lines.

Part of that answer also depends on the cylinder type double acting / single acting etc.

WestJava:
below are the available tools:

Arduino Mega 2560 Rev.3

I have 2 linear encoders.

2 hydraulic cylinders

2 selenoid proportional valves.

No links to datasheets? That's the first thing we need to understand any hardware question.