各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:0 \* p, p; j# W+ v4 \3 P& @ z
(action : string)9 x0 F( k9 _+ k* k4 W9 K" `7 _ k, A
is
1 y' T' d6 `: I7 Kdo
! k. g3 @' i& r9 M5 S inspect action" ]8 R: Y' R: l" H% Q
when "Open" then
! Y* E; S: a* \ -- TODO: add code for the "Open" action here# s" x9 `$ o5 }: Z# K
when "Apply" then, y( [" C( }- |: ]+ r3 K# @6 s' K
-- TODO: add code for the "Apply" action here7 ^$ h/ U+ o# h- [, {2 ~
when "Close" then9 j( T, `9 Z5 B+ M/ h" l% U+ ~
-- TODO: add code for the "Close" action here. Y, p' {* e1 x) Z7 x8 h/ l4 \) B+ B2 u
when "start" then .Trainning_Model1.plant5.EventController.start;: X% |: v1 J3 S3 A; j3 C8 A( O# j
when "stop" then .Trainning_Model1.plant5.EventController.stop;5 M# q8 s4 \& j
when "reset" then .Trainning_Model1.plant5.EventController.reset;: j R* V8 Z0 h5 y- c8 B
when "Init" then .Trainning_Model1.plant5.EventController.init;
8 H" _+ x0 z2 t' n2 h, v3 I end;& s) k/ U7 S2 t7 M' s+ i( S8 h6 O- P
end;
7 R9 C8 B+ o1 S6 K当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |