各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:5 }- j6 K* F3 ~7 v: s, h! X5 ]- x
(action : string) ' h) p4 ^6 @ C$ U& Z& R7 uis- g1 |4 m! ^% f% Y1 N5 \$ O
do 4 R9 S0 {6 B+ n) |# N; t inspect action ) B7 W; H8 Z v when "Open" then 6 _* T9 r) C: X% p: K -- TODO: add code for the "Open" action here) S Q% Y% l( r: T& T
when "Apply" then1 |: j1 K. D: a
-- TODO: add code for the "Apply" action here* F, Q9 @1 G7 G8 D6 y- E
when "Close" then- M. \# X7 p6 L# _) }5 u
-- TODO: add code for the "Close" action here / ^5 x6 F w% y5 h0 ~ when "start" then .Trainning_Model1.plant5.EventController.start;- y8 C( x4 E7 \4 A6 T8 ?; s
when "stop" then .Trainning_Model1.plant5.EventController.stop; n5 R. X _4 n# x. g
when "reset" then .Trainning_Model1.plant5.EventController.reset; 9 g5 c- K' Y1 N" J8 e5 }) H when "Init" then .Trainning_Model1.plant5.EventController.init;0 z9 H# Q) f0 R ~( H
end; ' f( |0 N) j$ I0 e4 Jend;& W0 T0 m p6 e5 R
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢!