Load LinkageDesigner package
Load the example crank slider linkage
Define a force on the slider link (link3) at point {0,0,0}. The force vector is defined w.r.t. LLRF of link3 and the vector is {-1,0,0}
Define a torque on link1 that act along the joint's axis
Display the linkage and the forces
Show the LinkageData database
Calculate the mechanical advantage between F1 force and T1 torque
The mechanical advantage is depending on the posture of the mechanism, therefor the most complete view of the result can be obtained by plotting the mechanical advantage factor w.r.t joint variable of the mechanism.
Plot the mechanical advantage function w.r.t the q1 joint variable, which is the joint variable
Display the mechanism in the position (q1 → 68.4 °), where the mechanical advantages is the maximum