各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:% r9 A3 X" ~& w! q
(action : string) % u8 g- K( U2 A8 j( @! Pis * A! M/ Y3 t& r( H$ y; Odo 9 b) o! F( q5 B) a# B inspect action & m% J) t: \8 y: v8 F when "Open" then . n6 k1 ]! Y6 o -- TODO: add code for the "Open" action here ) D/ R1 S$ k1 m5 f8 k9 a when "Apply" then % s2 U" C/ G# f* O7 n m* } I D -- TODO: add code for the "Apply" action here . p) |) [3 x% P# b$ c/ E when "Close" then & a! l. I7 V8 P+ @1 w- n -- TODO: add code for the "Close" action here9 }) ~* a8 ?5 T% \/ M
when "start" then .Trainning_Model1.plant5.EventController.start; 4 \: S* v P+ b when "stop" then .Trainning_Model1.plant5.EventController.stop; 3 g; @9 t' q. l( Z+ l' g when "reset" then .Trainning_Model1.plant5.EventController.reset;+ b9 k6 r) S [3 x6 v1 |/ C. j
when "Init" then .Trainning_Model1.plant5.EventController.init;; A: v2 K* r7 F
end;/ E2 C- Z2 {; p1 R" E
end; s* y# b. X! C) E- K: X! Z n+ q当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢!