技术部,做电气系统设计,
威纶的脚本功能很强大,什么都可以做,基本上
给你看一个脚本
脚本0程序如下
macro_command main()
float source1,result1,source2,result2,result3,result4
int a,b,c,d
GetData(source1,"Local HMI",rw,0,1)
GetData(source2,"Local HMI",rw,2,1)
SIN(source1,result1)
COS(source1,result2)
SIN(source2,result3)
COS(source2,result4)
a=result1*1000
b=result2*1000
c=result3*1000
d=result4*1000
SetData(a,"Mitsubishi FX0s/FX0n/FX1s/FX1n/FX2",d,173,1)//移丝速度三角函数值1
SetData(b,"Mitsubishi FX0s/FX0n/FX1s/FX1n/FX2",d,174,1)//卷绕速度三角函数值1
SetData(c,"Mitsubishi FX0s/FX0n/FX1s/FX1n/FX2",d,175,1)//移丝速度三角函数值2
SetData(d,"Mitsubishi FX0s/FX0n/FX1s/FX1n/FX2",d,176,1)//卷绕速度三角函数值2
SetData(result1,"Local HMI",rw,6,1)
end macro_command
楼主可以帮个忙,回复一下这个帖子
http://bbs.gkong.com/archive.aspx?id=395016,谢谢
[此贴子已经被作者于2014/11/12 20:54:52编辑过]