With the specifications for the mechanism given here,
plot the coupler curve of the point x versus point y traced by the
coupler point and display
an animation of the mechanism in action.
the links have the following lengths:
r1 = 4 ft, r2 = 12 ft, r3= 7 ft, r4 = 10 ft, rp = 5 ft
The ground link, r1, will be at 0°. The angle beta would be 20°.
To solve the problem we'll use the
CFourbar class that was developed to analyze
this type of mechanism. It has member functions to enter the mechanism specifications
and others that present the output to the user.
The code shown below uses this class.
Below we describe how the code interacts with the member functions in the class. The first line of the program
includes the header file
fourbar.h which defines the CFourbar class, macros,
and prototypes of member functions. Like all C/C++ programs, the program is started
main() function. The next three lines
define the link lengths, ground and input link angles (in rad), of the fourbar linkage mechanism. The lines
construct an object of the
CFourbar class for the calculations and the
to display the output. The following three lines
set the dimensions of each link, phase angle for link 1, and the length of coupler rod and the angle it make with link3. A single line
is needed to set the number of points to be used for plotting. The line
plots the coupler curve, the movement of coupler point . The figure below shows the coupler curve generated by the above program. The last line
creates an animation shown below. Fewer points are used because the animation doesn't need as many as a plot to create decent output.
The results of running the above program are displayed below. The first is the coupler curve and the adjacent figure is the animation generated.
To try out this analysis using Excel and Ch, create an Excel as shown in figure below.
The script files used in this example are shown below. The following code is from "fb_plot_initialization.ch".
The following code is from "fb_curve.ch".
The following code is from "fb_animation.ch".
On executing the above Excel spreadsheet with Ch scripts embedded in it, the user can get the required results like the coupler curve and animation generated by Ch from Excel.