各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:) l0 |6 Y0 h! ~" A" V2 J1 T6 H5 O
(action : string)
! J2 I3 Q& s0 Qis$ j& }; Q% |: f, ~$ r' q8 z' c
do$ w# t1 N8 B: \2 X, g- Z- R
inspect action
9 a' g" \( {) G when "Open" then
r+ b/ B. j5 H/ a. w -- TODO: add code for the "Open" action here) V, p! {1 _' R# e/ q t1 i6 x D+ v# y) L
when "Apply" then
" @- V* m# ?" y) E6 F7 n -- TODO: add code for the "Apply" action here
- r ^' h. V& y! k+ q6 [4 C: E when "Close" then( q, ^5 z- K* W) D* K& p# J
-- TODO: add code for the "Close" action here- S& Z, S9 M9 r, v0 A" p- |# U
when "start" then .Trainning_Model1.plant5.EventController.start;
/ I+ U) ?6 H4 i h2 f when "stop" then .Trainning_Model1.plant5.EventController.stop;0 m3 e j/ L+ U# l: j H! u" F
when "reset" then .Trainning_Model1.plant5.EventController.reset;9 i6 G- |% D# E6 j n" j+ p- y& b9 O
when "Init" then .Trainning_Model1.plant5.EventController.init;4 q) ?8 T7 y4 U4 Y
end;2 G/ Z' K) {3 ]. z
end;% J3 D" e6 n5 R0 X+ F% z
当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |