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

trace_courbes_modele.m
MOG(7,1)=uicontrol(MOG(1,6),'style','text','unit','normalized',...
		            'position',[0.1,0.01,0.8,0.05],'backgroundcolor','w',...
	                'foregroundcolor','w','fontunits','normalized','fontsize',0.5,'fontweight','bold','string','POUR LANCER L''ENREGISTREMENT APPUYER SUR LA BARRE ESPACE');
  h_arme=uicontrol(MOG(1,6),'style','text','unit','normalized',...
		            'position',[0.9,0.01,0.1,0.05],'backgroundcolor','w',...
	                'foregroundcolor','w','fontunits','normalized','fontsize',0.5,'fontweight','bold','string','ARME');
h=get(figure(2),'child');
if isempty(h)
    position=0;
else
    position=position+1;
end;
%pause(0.1)
%set(gcf,'windowstyle','normal')
set(gcf,'position',ecran)
set(gcf,'color','w')
pause(0.1)
hold on
couleurs=['k','r','b','m','g','c','y','k'];
for k=-7.5:0.5:7.5
    plot([0 20],[k k],':k')
end;
for k=-7:1:7
    plot([0 20],[k k],'k')
end;
for k=0:0.5:20
    plot([k k],[-7.5 7.5],':k')
end;
for k=0:1:20
    plot([k k],[-7.5 7.5],'k')
end;
axis([0 20 -7.5 7.5])
bdt=[20e-3,50e-3,0.1,0.2,0.5,1,2,5,10,20];
cal_bdt=get(MOG(1,2),'value');
echelle_t=bdt(cal_bdt-1);
dim=ScopeData.signals.dimensions;
if cal_bdt-1==1
    for k=1:1:dim
            plot((ScopeData.time(1:401)-ScopeData.time(1))/echelle_t,ScopeData.signals.values(1:401,k),couleurs(k),'linewidth',2)
    end
else
    for k=1:1:dim
            plot((ScopeData.time-ScopeData.time(1))/echelle_t,ScopeData.signals.values(:,k),couleurs(k),'linewidth',2)
    end
end
s='Base de temps';
text(-2.5,7.5,s,'fontunits','normalized','fontsize',0.027,'fontweight','bold')
s=[num2str(echelle_t),' s/cm'];
text(-2,7-0.5*position,s,'fontunits','normalized','fontsize',0.027,'fontweight','bold')
s='Calibres';
text(-2,5,s,'fontunits','normalized','fontsize',0.027,'fontweight','bold')
choix_calibre_y={'','2 V/cm','1 V/cm','0,5 V/cm','0,2 V/cm','0,1 V/cm','50 mV/cm','20 mV/cm','VAR'};
for k=1:1:dim
    cal_y=get(MOG(1+k,2),'value');
    s=choix_calibre_y(cal_y);
    n=get(MOG(12,2+k),'value');
    if n==3
        nb=get(MOG(11,2+k),'string');
        s=[char(s),' (F : ',nb,' pts)'];
    end;
    text(-3,4.5-k*0.5-0.5*(dim+1)*position,s,'color',couleurs(k),...
        'fontunits','normalized','fontsize',0.027,'horizontalalignment','left')
end
 s='rglages zro :';
text(20,5,s,'fontunits','normalized','fontsize',0.027,'fontweight','bold')
n=get_param(gcs,'name');
for k=1:1:dim
    nom_bloc=[n,'/Constant',num2str(k+1)];
    z_y=get_param(nom_bloc,'value');
    s=['VOIE',num2str(k),' : ',z_y,' cm'];
    text(20,4.5-k*0.5-0.5*(dim+1)*position,s,'color',couleurs(k),...
        'fontunits','normalized','fontsize',0.027,'horizontalalignment','left')
    end
   
%set_param(gcs,'SimulationCommand','stop')
title(nom,'fontunits','normalized','fontsize',0.5,'fontweight','bold')
legende='VOIE Y1 = COMMANDE ; VOIE Y2 = Rponse du PROCESSUS ; ';
nom_mdl=get_param(gcs,'name');
if strcmp(nom_mdl,'modele_analogique')
    legende=[legende,'VOIE Y3 = Rponse modle ANALOGIQUE'];
elseif strcmp(nom_mdl,'modele_simulinkmdl')
    legende=[legende,'VOIE Y3 = Rponse modle SIMULINK'];
else
    legende=[legende,'VOIE Y3 = Rponse modle ANALOGIQUE ; VOIE Y4 = Rponse modle SIMULINK'];
end;
text(0,-8.5,legende,'fontweight','bold')


Contact us