The 'Single-Acting Hydraulic Cylinder' block features 4 ports, each with a specific role:
- R: Connects the cylinder rod to the mechanical system.
- C: Connects the cylinder clamp/head to the mechanical system.
- A: Hydraulic connection to the cylinder’s inlet.
- P: The piston’s position as a physical signal.
The 'Single-Acting Cylinder with 3-Way Valve' example might be quite relevant to your use case. To access the documentation page, run this command in the MATLAB Command Window:
web(fullfile(docroot, 'physmod/hydro/examples/single-acting-cylinder-with-3-way-valve.html'))
A simplified version of the example is available in the attached file 'example_R2018b.slx'. In this model, the spring mass damper system represents the mechanical translational components of a forklift.
A step signal is used to open the valve at 5 seconds, causing the cylinder rod to extend. 
Note that single-acting cylinders transfer force and motion in only one direction. An external device, like a spring, weight, or another oppositely installed cylinder, is needed to move the rod in the opposite direction.
Alternatively, the 'Translational Hydro-Mechanical Converter' can be used. The relevant documentation can be accessed with the following command:
web(fullfile(docroot, 'physmod/simscape/ref/translationalhydromechanicalconverter.html'))