How to Implement Air Cylinder Kinematics

I’m trying to apply kinematics to an air cylinder so that it operates properly, but I haven’t been able to get it working. I would really appreciate your help.

Cylinder.vcmx (580.6 KB)