组态软件实验报告(7)

时间:2025-07-14

endif

//桶向前移动

if nStep = =5 then

bottlemovevh= bottlemovevh—1 * mover/35;

endif

//如果到达终点,则信号灯2变红,容积清0

if nStep = =5&& bottlemovevh > =0 then

flag2=1;

depth=0;

number=number + 1;

//如果满5个,就进入运输阶段

If number= =5 then

nStep=6;

bottlemoveh=100;

//否则重新开始

else

nStep=1;

bottlemoveh=0;

endif

endif

//小车向前移动

if nStep = =6 then

carmoveh= carmoveh + 1 * mover/15;

endif

//重新开始

if nStep = =6&&carmovevh > =100 then

carmoverh=0;

nStep=1;

number=0;

bottlemoveh=0;

endif

(3)图形对象1的组态

双击图形对象(装制剂的空桶),出现“动画连接”对话框,选择“杂项/一般性动作”按钮,在“运行中周期执行”编辑区域输入脚本:

if bottlemoveh= =0||nStp= =1 then

Show( );

endif

if bottlemoveh= =100 then

hide( );

endif

然后单击“返回”按钮回到“动画连接”对话框;

单击“目标移动/垂直”按钮,弹出“水平/垂直移动”对话框,填写内容见图12.16;

组态软件实验报告(7).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219