各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:, \$ a N3 v3 @2 r! p/ A/ V
(action : string) 5 }) T/ Z4 P* p. ~" o+ xis. E$ v2 I; n9 C4 q$ d
do& ?4 v& G q2 I) v
inspect action * P! T A3 C: s& C1 t$ G when "Open" then" A2 x; v2 |% u8 ^
-- TODO: add code for the "Open" action here 9 I% r9 ?: M2 n" s6 d when "Apply" then+ d. v+ v2 p. I: p4 F
-- TODO: add code for the "Apply" action here$ y; U6 P- `5 ?: w* S; v- @' h
when "Close" then0 c# b4 t y" c. a6 l
-- TODO: add code for the "Close" action here + X( b% w4 U4 S2 Q$ l# j; a when "start" then .Trainning_Model1.plant5.EventController.start;( J. K+ ^( Q. ^! E: O$ a* ^
when "stop" then .Trainning_Model1.plant5.EventController.stop; 7 @( t' N4 t5 F0 e- z: j when "reset" then .Trainning_Model1.plant5.EventController.reset;7 C; T5 z; ?4 q* t7 \7 n) f# ?
when "Init" then .Trainning_Model1.plant5.EventController.init;" F0 P0 x2 h% s
end; 3 u7 k# h* k. qend;# J! o3 n& o- H/ t) i+ l
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢!