各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:" ?* }2 n0 H; d" k" F* P* d& r
(action : string)6 x* \4 l# ?, p' S, @2 j3 h
is4 Y- x, u. C- [
do
' b: A; @( y+ h; O$ _ inspect action
, d2 Z/ R' k/ W when "Open" then
f: O0 b" [0 O -- TODO: add code for the "Open" action here0 ^2 v. I9 b. k; _- ]! X
when "Apply" then' x* F$ A- n3 ?
-- TODO: add code for the "Apply" action here9 O7 I, B' Y# o
when "Close" then
. @) T+ G" ~/ t4 F -- TODO: add code for the "Close" action here8 t: ?7 n% X4 t
when "start" then .Trainning_Model1.plant5.EventController.start;( Z2 C/ W4 M6 v& W- I9 r3 h
when "stop" then .Trainning_Model1.plant5.EventController.stop;
" k: Z6 P+ U( L6 J when "reset" then .Trainning_Model1.plant5.EventController.reset;
}! B X$ l! U; ?" ~& I+ ?# M: o% K. L when "Init" then .Trainning_Model1.plant5.EventController.init;' l3 a. `2 m; C) ~; j- U- O' f
end;* [5 P$ d6 d' z3 v: d1 E2 t" I
end;" H' Q4 J$ Q* [( S, D
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |