机械社区

 找回密码
 注册会员

QQ登录

只需一步,快速开始

搜索
查看: 1940|回复: 5

弧面分度凸轮

[复制链接]
发表于 2019-5-5 22:53:26 | 显示全部楼层 |阅读模式
想要找一个会做弧面分度凸轮的大神帮一忙,我自己写的程序有点问题,是用matlab编制的程序,想找一个人帮忙看看哪里出错了,需要多少费用可以商量
回复

使用道具 举报

 楼主| 发表于 2019-5-5 22:55:00 | 显示全部楼层
求大神帮忙
回复 支持 反对

使用道具 举报

发表于 2019-5-6 11:18:16 | 显示全部楼层
You said a JB without pictures。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-5-6 14:27:32 | 显示全部楼层
miss苍天有泪 发表于 2019-5-6 11:18
You said a JB without pictures。

%左旋p=1,从动盘节圆半径r=45,c=180,分度盘转角a,凸轮转角b,凸轮停歇期转角bd,凸轮分度期转角bf,分度盘分度期转角af
%滚子1 第一停歇期
for t=0:1/8:1
b=pi*t*2/45;a=-pi/6;c=180;r=65;
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第一分度期
for t=0:1/52:1
c=180;
m=t/8;r=65;
b=pi*2/45+13*pi*m/45;
a=-pi/6+(pi/2)*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
m=1/8+6*t/8;r=65;c=180;
b=2*pi/45+13*pi*m/45;
a=-pi/6+(pi/2)/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
c=180;m=7/8+t/8;r=65;
b=2*pi/45+13*pi*m/45;
a=-pi/6+(pi/2)/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第二停歇期
for t=0:1/60:1
b=12*pi/36+12*pi*t/36;a=-pi/6+pi/2;c=180;r=65;
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第二分度期
for t=0:1/120:1
c=180;
m=t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=5*pi/6+pi*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
m=1/8+6*t/8;r=65;c=180;
b=24*pi/36+24*pi*m/36;
a=5*pi/6+pi/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
c=180;m=7/8+t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=5*pi/6+pi/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%滚子2 第一分度期
for t=0:1/52:1
c=180;
m=t/8;r=65;
b=pi*2/45+13*pi*m/45;
a=-pi/2+(pi/2)*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
m=1/8+6*t/8;r=65;c=180;
b=2*pi/45+13*pi*m/45;
a=-pi/2+(pi/2)/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
c=180;m=7/8+t/8;r=65;
b=2*pi/45+13*pi*m/45;
a=-pi/2+(pi/2)/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第二停歇期
for t=0:1/60:1
b=12*pi/36+12*pi*t/36;a=-pi/2+pi/2;c=180;r=65;
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第二分度期
for t=0:1/120:1
c=180;
m=t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=pi/2+pi*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
m=1/8+6*t/8;r=65;c=180;
b=24*pi/36+24*pi*m/36;
a=pi/2+pi/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
c=180;m=7/8+t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=pi/2+pi/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%滚子3 第二分度期
for t=0:1/120:1
c=180;
m=t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=pi/6+pi*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
m=1/8+6*t/8;r=65;c=180;
b=24*pi/36+24*pi*m/36;
a=pi/6+pi/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
c=180;m=7/8+t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=pi/6+pi/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第三分度期
for t=0:1/52:1
c=180;
m=t/8;r=65;
b=pi*60/36+13*pi*m/45;
a=4*pi/6+(-pi/2)*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
m=1/8+6*t/8;r=65;c=180;
b=pi*60/36+13*pi*m/45;
a=4*pi/6+(-pi/2)/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
c=180;m=7/8+t/8;r=65;
b=pi*60/36+13*pi*m/45;
a=4*pi/6+(-pi/2)/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第四停歇期
for t=0:1/8:1
b=pi*88/45+2*pi*t/45;a=pi/6;c=180;r=65;
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%滚子4 第二分度期
for t=0:1/120:1
c=180;
m=t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=11*pi/6+pi*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
m=1/8+6*t/8;r=65;c=180;
b=24*pi/36+24*pi*m/36;
a=11*pi/6+pi/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
c=180;m=7/8+t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=11*pi/6+pi/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第三停歇期
for t=0:1/60:1
b=48*pi/36+12*pi*t/36;a=7*pi/3;c=180;r=65;
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第三分度期
for t=0:1/52:1
c=180;
m=t/8;r=65;
b=pi*60/36+13*pi*m/45;
a=7*pi/3+(-pi/2)*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
m=1/8+6*t/8;r=65;c=180;
b=pi*60/36+13*pi*m/45;
a=7*pi/3+(-pi/2)/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
c=180;m=7/8+t/8;r=65;
b=pi*60/36+13*pi*m/45;
a=7*pi/3+(-pi/2)/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第四停歇期
for t=0:1/8:1
b=pi*88/45+2*pi*t/45;a=pi*11/6;c=180;r=65;
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%滚子5 第二分度期
for t=0:1/120:1
c=180;
m=t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=6*pi/6+pi*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
m=1/8+6*t/8;r=65;c=180;
b=24*pi/36+24*pi*m/36;
a=8*pi/6+pi/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/120:1
c=180;m=7/8+t/8;r=65;
b=24*pi/36+24*pi*m/36;
a=8*pi/6+pi/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第三停歇期
for t=0:1/60:1
b=48*pi/36+12*pi*t/36;a=5*pi/6;c=180;r=65;
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第三分度期
for t=0:1/52:1
c=180;
m=t/8;r=65;
b=pi*60/36+13*pi*m/45;
a=5*pi/6+(-pi/2)*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
m=1/8+6*t/8;r=65;c=180;
b=pi*60/36+13*pi*m/45;
a=5*pi/6+(-pi/2)/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
c=180;m=7/8+t/8;r=65;
b=pi*60/36+13*pi*m/45;
a=5*pi/6+(-pi/2)/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r*cos(a)*cos(b)-c*cos(b);
y=-r*cos(a)*sin(b)+c*sin(b);
z=r*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%滚子6 第一停歇期
for t=0:1/8:1
b=pi*t*2/45;a=pi/6;c=180;r1=45;
x=r1*cos(a)*cos(b)-c*cos(b);
y=-r1*cos(a)*sin(b)+c*sin(b);
z=r1*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
%第一分度期
for t=0:1/52:1
c=180;
m=t/8;r1=45;
b=pi*2/45+13*pi*m/45;
a=pi/6+(pi/2)*(pi*m-(sin(4*pi*m)/4))/(4+pi);
x=r1*cos(a)*cos(b)-c*cos(b);
y=-r1*cos(a)*sin(b)+c*sin(b);
z=r1*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
m=1/8+6*t/8;r1=45;c=180;
b=2*pi/45+13*pi*m/45;
a=pi/6+(pi/2)/(4+pi)*(2+pi*m-9/4*sin((pi+4*pi*m)/3));
x=r1*cos(a)*cos(b)-c*cos(b);
y=-r1*cos(a)*sin(b)+c*sin(b);
z=r1*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
for t=0:1/52:1
c=180;m=7/8+t/8;r1=45;
b=2*pi/45+13*pi*m/45;
a=pi/6+(pi/2)/(4+pi)*(4+pi*m-1/4*sin(4*pi*m));
x=r1*cos(a)*cos(b)-c*cos(b);
y=-r1*cos(a)*sin(b)+c*sin(b);
z=r1*sin(a);
fprintf('%12.8f %12.8f %12.8f',x,y,z);
fprintf('\n');
end
这是我的程序
file:///D:/Users/wudi/Documents/Tencent%20Files/2509386462/Image/C2C/L6%604%251VS(~OP681~0%7B9VWWP.png
自动换刀机械手上的弧面分度凸轮
要求先转90度抓刀,伸出100mm拔刀,转动180度换刀,缩回100mm插到,转动90度复位
现在是转动部位的弧面分度凸轮程序有问题
得出的点在solidworks上不能用,说是相邻点太近或重复,而且程序也有问题,每段程序生成的曲线不连续

点评

厉害啊 我都看不懂  发表于 2019-5-6 16:42
回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-5-6 23:09:16 | 显示全部楼层
机械11小白 发表于 2019-5-6 14:27
%左旋p=1,从动盘节圆半径r=45,c=180,分度盘转角a,凸轮转角b,凸轮停歇期转角bd,凸轮分度期转角bf,分度盘分 ...

大哥,能帮帮忙吗?小弟实在找不到问题了


回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

小黑屋|手机版|Archiver|机械社区 ( 京ICP备10217105号-1,京ICP证050210号,浙公网安备33038202004372号 )

GMT+8, 2024-11-20 15:34 , Processed in 0.054947 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表