各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下: 9 e( k2 K* p" c1 W! Z8 ?(action : string) " N" [5 D* ^( R r6 mis: d* c! k# ~1 e
do 5 g+ C, V! t P3 C1 a6 x inspect action ! `. C" C( t8 z" z; c" |7 Y when "Open" then ! }$ `5 Y+ P$ F. f2 O& J! e -- TODO: add code for the "Open" action here ! s- g- f2 B# o1 i when "Apply" then/ y& d! H0 n1 ]3 v6 m2 ]
-- TODO: add code for the "Apply" action here$ t) M, f% c) y/ D( w
when "Close" then 5 a6 [' ]- @5 J D8 | -- TODO: add code for the "Close" action here. Q. Y8 N+ B1 B% `. I
when "start" then .Trainning_Model1.plant5.EventController.start; C D$ N- p. x& {* V* G+ w5 t when "stop" then .Trainning_Model1.plant5.EventController.stop;& f5 e/ Z! ^2 A9 u9 Z5 K9 q
when "reset" then .Trainning_Model1.plant5.EventController.reset;: F4 f6 ]! g7 t4 X
when "Init" then .Trainning_Model1.plant5.EventController.init;# P$ r/ u, J) ]4 j
end; 6 c3 I7 T: z Iend;' c+ N Z5 k$ E5 {0 }4 i- b
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢!