Code covered by the BSD License

### Highlights from Cam Simulator

5.0
5.0 | 7 ratings Rate this file 44 Downloads (last 30 days) File Size: 14 KB File ID: #22571

# Cam Simulator

### Husam Aldahiyat (view profile)

02 Jan 2009 (Updated )

Given a set of motion programs this interface plots the cam profile and rotates it.

File Information
Description

User friendly edit boxes allow for the complete input of motion types and their properties, along with the characteristics of the cam and its follower. What follows are diagrams for displacement, velocity and acceleration, as well as an animated simulation of the cam profile and the follower.

I put my code here because it helped me personally understand more about cams and their governing equations. So I filled the code with comments in hopes of providing help for both mechanics students and new programmers.

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 7.4 (R2007a)
23 May 2014 Bishoy Ezzat

### Bishoy Ezzat (view profile)

22 Sep 2013 Cemil

### Cemil (view profile)

22 Sep 2013 Cemil

### Cemil (view profile)

04 May 2013 Andres Alonso

### Andres Alonso (view profile)

13 Jul 2012 Husam Aldahiyat

### Husam Aldahiyat (view profile)

You need the symbolic math toolbox, as noted in the requirements section.

Comment only
12 Jul 2012 Josef Kortan

### Josef Kortan (view profile)

??? Undefined function or method 'sym' for input arguments of type 'char'.

Error in ==> cams>SHM at 357
s=si+h/2*(1-cos(pi/a*(sym('x')-ti)));

Error in ==> cams>go at 443
[s,si,ti]=SHM(si,ti,Disps(lp1),Durations(lp1));

??? Error while evaluating uicontrol Callback

Thanks

Comment only
30 May 2012 emre

### emre (view profile)

rfh

Comment only
31 Oct 2011 Brato CHAKRABARTI

### Brato CHAKRABARTI (view profile)

16 May 2011 Husam Aldahiyat

### Husam Aldahiyat (view profile)

You need to check the numbers in the axes limit boxes on the lower left corner of the GUI. Look at the example picture and try to follow it.

If you're still having trouble send me an e-mail.

Comment only
16 May 2011 zarak khan

### zarak khan (view profile)

i am getting this error againg and agian tell me its solution please as soon as possible. thanks
??? Error using ==> axis>LocSetLimits at 234
Vector must have 4, 6, or 8 elements.

Error in ==> axis at 94
LocSetLimits(ax(j),cur_arg);

Error in ==> cams>go at 470
axis([0 ti min(JJ)-(max(JJ)-min(JJ))/10-1e-9
max(JJ)+(max(JJ)-min(JJ))/10+1e-9]);

??? Error while evaluating uicontrol Callback

Comment only
22 Apr 2010 Bianca

### Bianca (view profile)

07 Jan 2009 Husam Aldahiyat

### Husam Aldahiyat (view profile)

Thanks for the comment.

>I need to ask you a few question:
>How to obtain profile coordinates?
The equations are in the code itself.

>Does it computes the profile for roller follower?
The roller follower is a circle. given its radius and offset from the centre of the base circle it can be easily plotted.

>At the end a few possible improvement:
>rocker roller follower instead of translating.
I considered that before but I think I'll put it in now.

>You can also includes the detachement problem which is very useffull for high frequency cams.
I don't know what that is.

>Please insert a better documentation on how to use use this beatiful utilitie. I took 20 minutes to understand how to start!!!!
Duly noted.

Thanks again for giving your opinion.

Comment only
05 Jan 2009 Luigi Giaccari

### Luigi Giaccari (view profile)

Wonderful Congratulations,

It is a very usefull routine, with nice graphical plots.

I need to ask you a few question:

How to obtain profile coordinates?

Does it computes the profile for roller follower?

At the end a few possible improvement:

-rocker roller follower instead of translating.
-You can also includes the detachement problem which is very useffull for high frequency cams.

-Please insert a better documentation on how to use use this beatiful utilitie. I took 20 minutes to understand how to start!!!!

Thank you again