Code covered by the BSD License  

Highlights from
Logiciels temps réel

Logiciels temps réel

by

 

Real-time software concerning the domains of the signal processing, feedback and regulation

DEF=val_init_bb(DEFi)
function DEF=val_init_bb(DEFi)

DEF=DEFi;
carte='National_Instruments/PCI-6221_37-pin';     
modele='identification_bruit_blanc';
%modele='identification_bruit_blanc_essai';
open_system([modele,'.mdl'])
bloc3=[modele,'/compil'];
set_param(bloc3,'foregroundcolor','white')
set_param(gcs,'solver','FixedStepDiscrete')
set_param(gcs,'StartTime','0') 
set_param(gcs,'StopTime','Inf') 
set_param(gcs,'SystemTargetFile','rtwin.tlc') 
s=get_param(gcs,'Name');
sbai=[s,'/Analog Input'];
set_param(sbai,'drvname',carte);
sbao=[s,'/Analog Output'];
set_param(sbao,'drvname',carte);
set_param(gcs,'SimulationMode','external');
set_param(gcs,'ExtMode','on');
duration=500000;
set_param(gcs,'ExtModeTrigDuration',duration);
bloc=[modele,'/Constant'];
set_param(bloc,'value',num2str(DEF(8)));
bloc=[modele,'/To Workspace'];
set_param(bloc,'maxdatapoints',num2str(DEF(8)))
bloc=[modele,'/generateur'];
if DEF(6)==1
    set_param(bloc,'variablename','M_bruit_blanc');
else
    set_param(bloc,'variablename','M_SBPA');
end;
bloc1=[modele,'/Manual Switch'];
set_param(bloc1,'maskvaluestring','0|0|off')
 bloc2=[modele,'/declenchement'];
set_param(bloc2,'foregroundcolor','white')

if faut_il_recompiler
                 set_param(bloc3,'foregroundcolor','red')
                 pause(1)
                rtwbuild(gcs);
                pause(1)
                 set_param(bloc3,'foregroundcolor','white')
end;
bloc4=[modele,'/VI'];
bloc5=[modele,'/Manual Switch1'];
set_param(bloc4,'foregroundcolor','red')
D=max(DEF(5)/4,1);
Nb_Pt=round(D/DEF(4));
bloc=[modele,'/Constant'];
set_param(bloc,'value',num2str(Nb_Pt));
set_param(bloc1,'maskvaluestring','1|0|off')
set_param(bloc5,'maskvaluestring','0|0|off')
bloc6=[modele,'/To Workspace'];
set_param(bloc6,'StopFcn','DEF=evaluation_valeur_initiale(DEF,x);');
pause(1)
set_param(gcs,'SimulationCommand','connect'); 
pause(1)
set_param(gcs,'SimulationCommand','start')




         
          

Contact us