Matlab Befehle und s- function

Seite 1 von 1 - Forum: Coding Stuff auf overclockers.at

URL: https://www.overclockers.at/coding-stuff/matlab_befehle_und_s-function_134382/page_1 - zur Vollversion wechseln!


weasel6667 schrieb am 13.01.2005 um 13:33

Ich habe ein paar Befehle die ich in die Matlab Kommandozeile eingebe in ein m – file eingefügt. Funktioniert ganz gut, nur muss ich das jetzt in einer Simulink Simulation einfügen. Ich weiß das man Matlab Scripts mit einer s- function in eine Simulink Simulation implementieren kann. Hab mich da reingelesen, nur hab ich keinen Ahnung wie man spezielle Befehle in der s- function umsetzt.
kleiner Programmausschnitt: (handelt sich um den OPC Client von Matlab)

da = opcda('localhost','Matrikon.OPC.Simulation.1');
connect(da);
grp = addgroup(da,'CallbackTest');
itm1 = additem(grp,'Triangle Waves.Real8');
itm2 = additem(grp,'Saw-Toothed Waves.Boolean');
set(grp,'UpdateRate',0.01);
set(grp,'RecordsToAcquire',5);
grp


Kann mir wer da bitte ein paar Ratschläge/ kleine Anleitung geben wie ich das implementiere?
(gegoogelt hab ich schon ein paar Stunden)

danke




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025