各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下:0 I/ r6 |: k0 Z7 \4 }
(action : string)
0 D7 u: R; {( B$ vis
- o! s) }' N( Q2 Sdo
! ^2 ]- v. ?. w3 M inspect action- N' k7 q4 q% m' O
when "Open" then
* ^; v0 Y2 Y0 D; z+ d, Q1 d, \ -- TODO: add code for the "Open" action here
3 f- |1 F i) p! [$ r when "Apply" then
: ^6 q! p! M- ^6 V/ z2 k8 A -- TODO: add code for the "Apply" action here3 e, @2 Z* A& _+ x+ Z* Y2 }0 _2 J5 }5 |
when "Close" then
! Z9 d# `- N6 J4 G* s4 B -- TODO: add code for the "Close" action here
! K/ t7 w/ |/ @+ q2 ~+ T9 w2 E when "start" then .Trainning_Model1.plant5.EventController.start;
# z! R. A8 C( R! Z7 g2 {' s% ` when "stop" then .Trainning_Model1.plant5.EventController.stop;
% n4 F: ]9 Y3 \$ k! f* K when "reset" then .Trainning_Model1.plant5.EventController.reset;! G4 s' s7 t, }6 T
when "Init" then .Trainning_Model1.plant5.EventController.init;
3 j4 j0 p0 V/ X/ o. e' o end;+ e+ |) F' j F, y, [/ H2 ~
end;
* g# P/ E; d0 c( ]2 r* [当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢! |