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

affich_enregistrement_sa.m
k=[];
bloc_pat=[get_param(gcs,'name'),'/patience'];
DEF(10)=get_param(gcs,'simulationtime');
while(length(k)<DEF(3)-1) && strcmp(get_param(bloc_pat,'foregroundcolor'),'red')
    %pause(DEF(2)/20)
    set_param(gcs,'SimulationCommand','WriteDataLogs') 
    valide=y2.signals.values;
    t=v.time;
    k=find((valide==1)&(t>DEF(10)));
    pause(DEF(2)/10)
end;
if strcmp(get_param(bloc_pat,'foregroundcolor'),'red')
    pause(5*DEF(1))
    set_param(gcs,'SimulationCommand','WriteDataLogs') 
    x=v.signals.values;
    numero=y1.signals.values;
    valide=y2.signals.values;
    t=v.time;
    k=find((valide==1)&(t>DEF(10)));
    figure(2)
    hold on
    coul='krgb';
    c=DEF(7);
    test1=(c==1)|(c==3)|(c==5)|(c==7)|(c==9)|(c==11)|(c==13)|(c==15);
    test2=(c==2)|(c==3)|(c==6)|(c==7)|(c==10)|(c==11)|(c==14)|(c==15);
    test3=(c==4)|(c==5)|(c==6)|(c==7)|(c==12)|(c==13)|(c==14)|(c==15);
    test4=(c==8)|(c==9)|(c==10)|(c==11)|(c==12)|(c==13)|(c==14)|(c==15);
    M=[];
    if test1
        plot(numero(k)*DEF(1),x(k,1),coul(1))
        M=[M;'V_E'];
    end;
    if test2
        plot(numero(k)*DEF(1),x(k,2),coul(2))
       M=[M;'V_S'];
    end;
    if test3
        plot(numero(k)*DEF(1),x(k,3),coul(3))
        M=[M;'E  '];
            
    end;
    if test4
        plot(numero(k)*DEF(1),x(k,4),coul(4))
       M=[M;'E_C'];
    end;
    legend(M)
    xlabel(['t  (s)'])    
    ylabel('(V)')
end;
DEF(10)=max(t);
if strcmp(get_param(gcs,'name'),'boucle_fermee_anal_2_boucles')
        NOM=[get_param(gcs,'name'),'/Correcteurs'];
else
        NOM=[get_param(gcs,'name'),'/Correcteur'];
end;
BLOC=[NOM,'/Bloc_synchro/Constant6'];
set_param(BLOC,'value','1')
pause(1)
set_param(BLOC,'value','0')

Contact us