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

lance_bb(DEF)
function lance_bb(DEF)


modele='identification_bruit_blanc';
open_system([modele,'.mdl'])
repertoire=pwd;
cd ..
A=load('parametres_carte.mat');
cd(repertoire)
carte_entree=A.S.entree.carte;
carte_sortie=A.S.sortie.carte;
plage_entree=num2str(A.S.entree.pop);
plage_sortie=num2str(A.S.sortie.pop);
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_entree);
set_param(sbai,'voltrange',plage_entree);
sbao=[s,'/Analog Output'];
set_param(sbao,'drvname',carte_sortie);
set_param(sbao,'voltrange',plage_sortie);
bloc_sat=[s,'/Saturation'];
set_param(bloc_sat,'upperlimit',num2str(A.S.sortie.val_max));
set_param(bloc_sat,'lowerlimit',num2str(A.S.sortie.val_min));
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;
bloc=[modele,'/Constant'];
set_param(bloc,'value',num2str(DEF(8)));
set_param(gcs,'SimulationCommand','connect');   
set_param(gcs,'SimulationCommand','start')
pause(1)
set_param(bloc1,'foregroundcolor','red')
set_param(bloc2,'foregroundcolor','red')



         
          

Contact us