各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:/ L' `; s8 g" n4 i7 P
(action : string)
. S; }8 `- Q" m4 ris
' `! r, |1 W8 U' T- Ndo
' A& X( R1 o D: g inspect action. A. I2 \5 c1 t: }6 K
when "Open" then
3 C0 t, \, ^0 t+ K; k* z" A( F -- TODO: add code for the "Open" action here
6 o! F9 c! R6 X! K, j6 q when "Apply" then
2 o3 m4 E+ F) x3 O( E* ?) v -- TODO: add code for the "Apply" action here7 G0 ~0 p. L- Z5 T0 L
when "Close" then
& n" r- S5 E$ ?4 H _) R! I5 v& c9 e -- TODO: add code for the "Close" action here
8 U" F/ d( Y) e when "start" then .Trainning_Model1.plant5.EventController.start;
7 a5 _3 w" X6 c$ v# d when "stop" then .Trainning_Model1.plant5.EventController.stop;
1 m4 U! S& h5 D0 e# W+ V when "reset" then .Trainning_Model1.plant5.EventController.reset;5 @) r' ], q, \' O; ^, e
when "Init" then .Trainning_Model1.plant5.EventController.init;7 L! C% j" L. C0 {9 I. M' c
end;$ w# F/ N, B) W8 O
end;7 M0 h" X! [; @0 H! G' X
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |