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_acquisition_strejc(DEF)
function lance_acquisition_strejc(DEF)



modele='acquisition_strejc';
open_system([modele,'.mdl'])
repertoire=pwd;
cd ..
A=load('parametres_carte.mat');
cd(repertoire)
carte_entree=A.S.entree.carte;
plage_entree=num2str(A.S.entree.pop);
bloc3=[modele,'/compil'];
bloc4=[modele,'/Permanent'];
bloc5=[modele,'/Constant5'];
bloc=[modele,'/Constant'];
set_param(bloc3,'foregroundcolor','white')
set_param(bloc4,'foregroundcolor','white')
set_param(bloc5,'value','1');
set_param(bloc,'value',num2str(DEF(8)));
blocStop=[modele,'/Stop Simulation'];
set_param(blocStop,'stopfcn','[e,ei,s,si,t]=affichage_courbe_strejc(DEF,x);')
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);
sbai1=[s,'/Analog Input1'];
set_param(sbai1,'drvname',carte_entree);
set_param(sbai1,'voltrange',plage_entree);
set_param(gcs,'SimulationMode','external');
set_param(gcs,'ExtMode','on');
duration=100000;
set_param(gcs,'ExtModeTrigDuration',duration);
bloc=[modele,'/Bloc_synchro/Unit Delay'];
if DEF(7)>0
    set_param(bloc,'X0',num2str(A.S.entree.val_max));
else
     set_param(bloc,'X0',num2str(A.S.entree.val_min));
end;
bloc=[modele,'/Constant'];
set_param(bloc,'value',num2str(DEF(8)));
bloc=[modele,'/Constant3'];
set_param(bloc,'value',num2str(DEF(7)));
bloc=[modele,'/Constant4'];
set_param(bloc,'value',num2str(DEF(6)));

if faut_il_recompiler
                 set_param(bloc3,'foregroundcolor','red')
                 pause(1)
                rtwbuild(gcs);
                pause(1)
                 set_param(bloc3,'foregroundcolor','white')
end;

set_param(gcs,'SimulationCommand','connect');          
set_param(gcs,'SimulationCommand','start')
         
          

Contact us