各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:2 _; r( v3 [) L0 G# i' }) e7 z
(action : string)0 p0 t( m, K" u0 u, z
is
6 _) G' r. P: u% F& N1 jdo& ~' m5 T, r& ^3 N: ^! c
inspect action
+ T. V' _* i; M$ } when "Open" then0 j) ?# e' c8 V- {
-- TODO: add code for the "Open" action here @& N! {1 f* }9 ]
when "Apply" then
' y6 ] M- H1 e# D" r: ~- G -- TODO: add code for the "Apply" action here
* }5 [* F5 i" `7 u( O when "Close" then: W9 l# ?* ?, a' u8 |; h' @2 j
-- TODO: add code for the "Close" action here
" b1 ^% q+ k% ^ \# [0 ^8 |% X when "start" then .Trainning_Model1.plant5.EventController.start;1 M: q" `: F5 Q% J4 m
when "stop" then .Trainning_Model1.plant5.EventController.stop;1 |. N1 t! X; [; Q( @# K& w' n
when "reset" then .Trainning_Model1.plant5.EventController.reset;, `& t( m0 f$ t4 S
when "Init" then .Trainning_Model1.plant5.EventController.init;2 M2 K% u. v) \6 @* j, K7 }9 w7 I
end;
( n7 m2 @8 r% G! Eend;5 \: i; K0 p0 i3 D9 I3 v: p& I! I; {
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |