各位大哥,小弟我刚学习EM-PLANT不久,我是一直照着eM-Plant+7.0系统模拟(培训教程)这个教程来学的,现在学到最后阶段也就是在Dialog这里出了问题。我按照要求编写了对话框。对话框里设置了四个按钮。他们分别是《启动模拟》、《停止模拟》、《重置》、《初始化》。名称分别是:Start、Stop、Reset、Init。我修改的Callback Method 如下: o" b+ l+ w4 o0 \1 }
(action : string)2 b6 M1 e2 x$ R$ d w5 ~
is( x# d; X' O# C
do+ k6 K+ @; t. ^9 y: ]% D# B0 U2 C
inspect action 3 t" m! A, _0 ^! A) @9 } when "Open" then ! D, P, F c- F2 u3 N6 d& r5 a. I& b -- TODO: add code for the "Open" action here V& T9 f3 i+ ^# C( v
when "Apply" then & Z$ F* C' A4 _- ` -- TODO: add code for the "Apply" action here # \0 L T9 s. a6 w: R" {# w6 K6 ] when "Close" then / T$ y8 H6 w- u -- TODO: add code for the "Close" action here! O: F: T) r3 Z/ `
when "start" then .Trainning_Model1.plant5.EventController.start; 1 P5 G# o6 ^" y2 t- z5 A when "stop" then .Trainning_Model1.plant5.EventController.stop;$ u+ _ T: U* [. v4 G* @
when "reset" then .Trainning_Model1.plant5.EventController.reset;& K! x% O8 J! F% P' P3 @5 P' Z* m
when "Init" then .Trainning_Model1.plant5.EventController.init;" j$ l' W& ^& M" g7 _0 `. D7 {* o
end;' |! N: d. n) g0 L% `
end; ) L% ?& Q( l8 [9 g# A当我从对话框点击《启动模拟》,模型确怎么也不会动。我找了好久原因都没有找着。也尝试着在本模型中设置Dialog .结果还是一样,特请各位大哥帮忙。谢谢!