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

flux.m
clear all
te=5e-4;
duree=10;
tmax=0;
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);
modele='estimflux_reel';
open_system([modele,'.mdl'])
set_param(gcs,'location',ecran,'zoomfactor','fitsystem')
sbao=[modele,'/Analog Output'];
set_param(sbao,'drvname',carte_sortie);
set_param(sbao,'voltrange',plage_sortie);
for k=0:1:6
    if k==0
        sbai=[modele,'/Analog Input'];
    else
        sbai=[modele,'/Analog Input',num2str(k)];
    end;
    set_param(sbai,'drvname',carte_entree);
    set_param(sbai,'voltrange',plage_entree);
end;
set_param(gcs,'solver','FixedStepDiscrete')
set_param(gcs,'StartTime','0') 
set_param(gcs,'StopTime','Inf') 
set_param(gcs,'SystemTargetFile','rtwin.tlc') 
 set_param(gcs,'SimulationMode','external');
set_param(gcs,'ExtMode','on');
D=round(1.5*duree/te);
set_param(gcs,'ExtModeTrigDuration',D);
bloc=[modele,'/Scope'];
set_param(bloc,'maxdatapoints',num2str(D));
bloc=[modele,'/To Workspace'];
set_param(bloc,'maxdatapoints',num2str(D));
rtwbuild(gcs);
 pause(1)
 set_param(gcs,'SimulationCommand','connect');          
set_param(gcs,'SimulationCommand','start') 
%rtwho

Contact us