问题具体情况:7 T& E6 Z" n4 T5 v) L4 Y C4 { x: Z
! \5 n2 S0 D, ~- V e一共有三种产品分别存放在三个货架上,三个货架均连接在一个暂存区上,模型中有一张动态生成的全局表,通过读取表中的数值,打开某一个端口;我试着建立了中间端口,然后在暂存区的进入触发器中写下了如下代码:
L! g" v0 I8 R- C' n& e
: X' C" \4 j8 b K; ]4 p# Dif(gettabelnum("全局表",getoutput(current)+1,6) == 1)
k/ E; G2 J4 @/ x2 g{
% r4 Y1 b( n7 jopeninput(centerobject(current,1));centerobject(current,1);/ e. }+ i. f5 s/ v: \, O6 [
}& l3 ^. v* A5 `3 r. A/ V
else if (gettabelnum("全局表",getoutput(current)+1,6) == 2)
5 C1 E# c% B6 b4 D( k/ `{
, T% {6 y/ b/ topeninput(centerobject(current,2));centerobject(current,2);/ H+ V8 |2 K6 k1 n% ^* p- q* M, P
}. f" C4 w6 V" n# N6 `/ y
else if (gettabelnum("全局表",getoutput(current)+1,6) == 3)! O& ^6 ^- B3 F% X' R
{- p P: F4 _- i- p. n/ p3 \: ~3 { Y0 W8 [
openinput(centerobject(current,23));centerobject(current,3);
- @, X# j0 |' W$ e9 ~}& T( h: r/ L U7 ?' h5 b% V
9 J- R3 I( t: R$ o5 g# w问题 模型在运行很短时间后就停下了,不知道问题到底出在哪里,求前辈们指点一下。 |