各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:! \, t' i8 s8 E- ]
(action : string)0 w* O; E% I; l1 y
is& I! _/ b% T- J3 m, g$ F% x
do
4 V, L$ d. e- J* n K& I+ b inspect action
/ ~" z" u' Q, u7 e when "Open" then
; i$ ^1 X' h0 ~! z# m X+ _ -- TODO: add code for the "Open" action here9 J' t- f, p) Y, m$ \
when "Apply" then
. n8 u& h8 @8 q9 ]" r7 O -- TODO: add code for the "Apply" action here
7 N6 o8 l2 r% H2 M5 q when "Close" then! a) s8 s' Q- ]7 \2 L$ I& s
-- TODO: add code for the "Close" action here
& R2 j4 _# k6 j! M# s- @ when "start" then .Trainning_Model1.plant5.EventController.start;* Z O4 a, X4 o* D3 z
when "stop" then .Trainning_Model1.plant5.EventController.stop;
3 r/ N- Z5 f4 ? when "reset" then .Trainning_Model1.plant5.EventController.reset;3 Q }5 Z/ `3 S8 Y; {$ i. |
when "Init" then .Trainning_Model1.plant5.EventController.init;! g3 g6 f: a$ d; P! q1 X% g1 I( ~
end;; ]' z3 j* G; K, m x( p
end;
' L7 P8 S* K; [4 t/ ^当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |