各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:+ L4 s2 ?+ v; ^) O9 \2 C2 I
(action : string)& o# N9 P+ j+ Q: t3 n
is 4 _$ q3 v f$ |2 b. gdo c2 H+ s! i0 e1 a! p) l inspect action9 C$ y7 R6 z y* ` R' N; _7 A
when "Open" then, H# s P/ }% G/ r1 _5 n2 v
-- TODO: add code for the "Open" action here2 l) z& j: A- H1 C) H) U
when "Apply" then t8 o9 y. o0 B4 p2 r, f% u. ` w -- TODO: add code for the "Apply" action here ' x) M% ?2 H* F% d0 p1 Z8 H/ v$ N when "Close" then" @& u3 P" E0 X% `$ g; h
-- TODO: add code for the "Close" action here ; s i8 i+ T- z7 m( f. c& v: L \! u when "start" then .Trainning_Model1.plant5.EventController.start; ( K: H, g5 r7 J4 @$ d, X when "stop" then .Trainning_Model1.plant5.EventController.stop;1 r4 h/ Y5 r/ [
when "reset" then .Trainning_Model1.plant5.EventController.reset;' L2 A/ u9 \* n/ f j
when "Init" then .Trainning_Model1.plant5.EventController.init; * p8 ]+ I+ q7 j. r end;/ }( o* I" L& `( L8 d
end; 8 a/ m3 T4 L2 y* B当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢!