油气储运网

 找回密码
 立即注册

QQ登录

QQ快速登录

一步迅速开始

pdms培训&项目数字化360网
查看: 6829|回复: 0

[经验交流] SPS模拟顺序输送中intran文件的编写

[复制链接]
发表于 2016-5-31 14:56:33 | 显示全部楼层 |阅读模式
在模拟中,intran文件为:
DEFINE BATCH_CTRL = 0
DEFINE.SEQUENCE L_GAS (_SIZE_)
{ OPEN B_GASOLINE
POKE B_GASOLINE:CF = 0
WAIT.UNTIL (B_GASOLINE:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 1
CLOSE B_GASOLINE }
DEFINE.SEQUENCE L_DIESEL (_SIZE_)
{ OPEN B_DIESEL
POKE B_DIESEL:CF = 0
WAIT.UNTIL (B_DIESEL:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 0
CLOSE B_DIESEL }
DEFINE.SEQUENCE L_WATER (_SIZE_)
{ OPEN B_WATER
POKE B_WATER:CF = 0
WAIT.UNTIL (B_WATER:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 2
CLOSE B_WATER }
DEF.SEQ LBA (_SIZE_)
{ WAIT.UNTIL(BATCH_CTRL = 0 )
SUB.SEQ L_GAS (_SIZE_ )
WAIT.UNTIL(BATCH_CTRL = 1 )
SUB.SEQ L_WATER (_SIZE_ )
WAIT.UNTIL(BATCH_CTRL = 2 )
SUB.SEQ L_DIESEL (_SIZE_ ) }
WHENEVER ((N3:NFLU = WATER & B1_WATER:ST = CLOSED ))
{OPEN B1_WATER
CLOSE B1_GASOLINE
CLOSE B1_DIESEL }
WHENEVER ((N3:NFLU = GASOLINE & B1_GASOLINE:ST = CLOSED ))
{OPEN B1_GASOLINE
CLOSE B1_WATER
CLOSE B1_DIESEL }
WHENEVER ((N3:NFLU = DIESEL & B1_DIESEL:ST = CLOSED ))
{OPEN B1_DIESEL
CLOSE B1_WATER
CLOSE B1_GASOLINE }
DEFINE BATCH_CTRL = 0
DEFINE.SEQUENCE L_GAS (_SIZE_)
{ OPEN B_GASOLINE
POKE B_GASOLINE:CF = 0
WAIT.UNTIL (B_GASOLINE:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 1
CLOSE B_GASOLINE }
DEFINE.SEQUENCE L_DIESEL (_SIZE_)
{ OPEN B_DIESEL
POKE B_DIESEL:CF = 0
WAIT.UNTIL (B_DIESEL:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 0
CLOSE B_DIESEL }
DEFINE.SEQUENCE L_WATER (_SIZE_)
{ OPEN B_WATER
POKE B_WATER:CF = 0
WAIT.UNTIL (B_WATER:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 2
CLOSE B_WATER }
DEF.SEQ LBA (_SIZE_)
{ WAIT.UNTIL(BATCH_CTRL = 0 )
SUB.SEQ L_GAS (_SIZE_ )
WAIT.UNTIL(BATCH_CTRL = 1 )
SUB.SEQ L_WATER (_SIZE_ )
WAIT.UNTIL(BATCH_CTRL = 2 )
SUB.SEQ L_DIESEL (_SIZE_ ) }
WHENEVER ((N3:NFLU = WATER & B1_WATER:ST = CLOSED ))
{OPEN B1_WATER
CLOSE B1_GASOLINE
CLOSE B1_DIESEL }
WHENEVER ((N3:NFLU = GASOLINE & B1_GASOLINE:ST = CLOSED ))
{OPEN B1_GASOLINE
CLOSE B1_WATER
CLOSE B1_DIESEL }
WHENEVER ((N3:NFLU = DIESEL & B1_DIESEL:ST = CLOSED ))
{OPEN B1_DIESEL
CLOSE B1_WATER
CLOSE B1_GASOLINE }
运行出来的结果为
360截图20160530171905892.jpg
但教程给出的运行结果为
360截图20160530171640992.jpg
自己不知道是那块设置有问题,希望给予指导
您需要登录后才可以回帖 登录 | 立即注册  

本版积分规则

扫码访问手机版

QQ|关于我们|网站地图|油气储运网 ( 鲁ICP备11007657号-3 )

GMT+8, 2024-11-21 23:00 , Processed in 0.025324 second(s), 12 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回列表