各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:4 s5 }' U" g1 J+ C. z
(action : string)
I, s' C. Q- ]/ u0 n+ `is$ ?/ a& \4 G: J3 Z( _/ w& {6 J
do$ ~( S3 A; K8 b' v, ^) x; b
inspect action
7 i1 k: g, b7 m. v7 U when "Open" then0 P1 i# a2 {3 o# A& x
-- TODO: add code for the "Open" action here
! o' E2 b8 x2 U, V- o C when "Apply" then
8 V" @2 V4 [ q% h -- TODO: add code for the "Apply" action here
# S4 x8 L5 S3 R* P when "Close" then
# R& o& a! ]9 U+ t- z6 E$ F9 X -- TODO: add code for the "Close" action here- p2 P; s) L+ ]! ?& t' V
when "start" then .Trainning_Model1.plant5.EventController.start;
# S- m/ v! h& N n u' e, W2 C when "stop" then .Trainning_Model1.plant5.EventController.stop;2 A2 `* Z3 S6 U% N
when "reset" then .Trainning_Model1.plant5.EventController.reset;
: ^) B, a! K/ V" _# ~% y when "Init" then .Trainning_Model1.plant5.EventController.init;) S7 b7 H x* r; G1 n
end;
$ z4 \0 w, m5 @) ^# fend;+ f& g, f/ G! i4 ]2 a3 i
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |