App designer model update error
古いコメントを表示
Hi,
i have a problem with one error, that MATLAB is reporting to me. Error message:
"Warning: In rapid accelerator mode, when the simulation is started from the command line, visualization blocks are not updated. If the simulation is started from the toolstrip, visualization blocks are updated.
I am working on app, that can run simulation and plot response of control system, but I am stuck on this error message.
This is part of my code in AppDesigner:
mdl = 'time_delay_filter';
in = Simulink.SimulationInput(mdl);
in = in.setModelParameter('StopTime','30');
in.ExternalInput = app.externalInput();
k=app.kEditField.Value;
T=app.TEditField.Value;
L=app.LEditField.Value;
s4 = -(3/L)-(1/(2*T))+sqrt((3/(L.^2))+(1/(4*(T.^2))));
Kp = (1/k)*((L.^2)*T*(s4.^3) + L*(3*T+L)*(s4.^2) + L*s4 - 1)*exp(L*s4);
Ti = -2*(((L.^2)*T*(s4.^3) + L*(3*T+L)*(s4.^2) + L*s4-1)/((s4.^3)*L*(L*T*s4 + 2*T + L)));
Td = (-1/2)*(((L.^2)*T*(s4.^2) + L*(4*T+L)*s4 + 2*L + 2*T)/((L.^2)*T*(s4.^3) + L*(3*T+L)*(s4.^2) + L*s4 - 1));
b=min(2/(Ti*abs(s4)),1);
c=min(1/(Ti*(s4^2)*Td),1);
Kd= Kp*Td;
Ki=Kp/Ti;
in = in.setVariable('b',b);
in = in.setVariable('c',c);
in = in.setVariable('s4',s4);
in = in.setVariable('Kp',Kp);
in = in.setVariable('Ki',Ki);
in = in.setVariable('Kd',Kd);
in = in.setVariable('L',L);
in = in.setVariable('k',k);
in = in.setVariable('T',T);
in = simulink.compiler.configureForDeployment(in);
simOut=sim(in);
plot(app.UIAxes,simOut.ScopeData.time,simOut.ScopeData.signals.values);
Can please somebody help me ?
Thank you.
2 件のコメント
Mario Malic
2020 年 11 月 14 日
Hello,
It's warning, not an error message, your simulations should work.
I briefly checked what Rapid Accelerator, and I don't think your are able to process simulations in parallel easily. Did you want to do it with Rapid Accelerator (maybe it's on by default)? You might have to do something similar to this.
It's best to ask customer service.
Samuel Synak
2020 年 11 月 14 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Multicore Processor Targets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!