各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:( x7 a W8 {, T' l6 `. i
(action : string)
& v2 d' q% |* c1 x' ` `4 Zis% _4 a+ r( _$ X2 U. i) Y4 ?! Z
do" C4 C+ _+ |' c7 F" \/ M
inspect action
# w: j- O" ^4 U# ^ when "Open" then
* C) n5 A. j7 s* }3 g7 m e$ I" P -- TODO: add code for the "Open" action here* L8 q' K, w+ q) ]( ]% ` r
when "Apply" then
4 u. B [! A% D, j' P3 k$ t! Q -- TODO: add code for the "Apply" action here
* G# B P$ B8 ^9 q7 A8 z when "Close" then, P; ~9 }/ Y/ g0 W2 r
-- TODO: add code for the "Close" action here
( k4 i2 u% P9 o2 r# p when "start" then .Trainning_Model1.plant5.EventController.start;; o$ B. p* a+ j E; C
when "stop" then .Trainning_Model1.plant5.EventController.stop;% ^) s# _8 O2 m" _/ _, k
when "reset" then .Trainning_Model1.plant5.EventController.reset;( m& N1 `- _9 q" G4 Q7 c8 G
when "Init" then .Trainning_Model1.plant5.EventController.init;3 j6 [; a- T2 h% s0 h5 I
end;! o7 [8 f& B" N+ _! H) C, f
end;
9 S! _- k/ u x' u5 H4 Q, e( r' g+ {当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |