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

[DEF,P_PID,fe]=lecture_param(MOG,DEFi,P_PIDi);
function [DEF,P_PID,fe]=lecture_param(MOG,DEFi,P_PIDi);

DEF=DEFi;
P_PID=P_PIDi;

synchro=get(MOG(1,15),'Value');
DEF(4)=synchro;
P_PID(1,1)=str2num(get(MOG(1,1),'string'));
P_PID(1,2)=str2num(get(MOG(1,2),'string'));
P_PID(2,1)=str2num(get(MOG(1,3),'string'));
P_PID(2,2)=str2num(get(MOG(1,4),'string'));
P_PID(3,1)=str2num(get(MOG(1,5),'string'));
P_PID(3,2)=str2num(get(MOG(1,6),'string'));
P_PID(4,1)=str2num(get(MOG(1,7),'string'));
P_PID(4,2)=str2num(get(MOG(1,8),'string'));
sfe=get(MOG(1,9),'string');
fe=str2num(sfe);
te=1/fe;
DEF(1)=te;
pve=get(MOG(1,10),'Value');
pvs=get(MOG(1,11),'Value');
pe=get(MOG(1,12),'Value');
pec=get(MOG(1,13),'Value');
courbes=pve+2*pvs+2^2*pe+2^3*pec;
DEF(7)=courbes;
sd=get(MOG(1,14),'string');
duree=str2num(sd);
DEF(2)=duree;
N=round(duree/te);
DEF(3)=N;
if synchro
    slevel=get(MOG(1,16),'string');
    DEF(5)=str2num(slevel);
    ssens=get(MOG(1,17),'string');
    DEF(6)=str2num(ssens);
else
    DEF(5)=0;
    DEF(6)=0;
end;
if isinf(P_PID(2,1))
    P_PID(5,1)=0;
else
    P_PID(5,1)=DEF(1)/P_PID(2,1);
end;
if isinf(P_PID(4,1))
    P_PID(4,1)=P_PID(3,1)/DEF(1);
    P_PID(6,1)=0;
else
    if P_PID(3,1)==0
        P_PID(4,1)=0;
        P_PID(6,1)=0;
    else
        tau=P_PID(3,1)/P_PID(4,1);
        P_PID(6,1)=exp(-DEF(1)/tau);
    end;
end;



Contact us