各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下: & w2 h7 n+ Z8 M6 ]# d# j% R s(action : string): \5 w8 k' k' Y! o
is : |$ I5 T: T" |; zdo v" v* c! [' \+ ] inspect action B g. {6 U( q) T5 L2 \ when "Open" then + u9 ]% Y. |4 Q, e+ z$ S3 E -- TODO: add code for the "Open" action here 1 D% O0 ^( h4 I" Y when "Apply" then$ k* a0 T0 m1 Y
-- TODO: add code for the "Apply" action here2 T6 M9 X/ }4 D: I- i$ o
when "Close" then ! e8 l& e( l: J v* n+ }/ [3 e -- TODO: add code for the "Close" action here7 A+ a5 \3 j" K+ |2 v
when "start" then .Trainning_Model1.plant5.EventController.start;+ s. l, @# M. u- \! m# p8 d; Y
when "stop" then .Trainning_Model1.plant5.EventController.stop;/ S$ k0 c& K* V( \9 m2 d
when "reset" then .Trainning_Model1.plant5.EventController.reset; & U7 Q7 b4 F6 @4 z, n when "Init" then .Trainning_Model1.plant5.EventController.init;( \4 _4 c1 [. ]3 N. |8 O% [. V
end;, ^/ C% A( J9 [6 L5 g
end;. m# ]) [5 W' p E% F
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢!