Question: programming with radio button

I have a problem with radiobutton

i have 3 types of fricction, and each radio button has one type of it.

I have a problem when i select one type of friction don´t plot it

that is the code  RBFEstatica is a radiobutton of type static fricction

if GetProperty(RBFEstatica,value) = true then

DocumentTools[SetProperty](Label0,caption,estatica);

p1 := 0;
p2 := 0.1;
deltav1 := piecewise((abs(x2q1(t)) > 0 and abs(x2q1(t)) < 0), p1, p2);
deltav2 := piecewise((abs(x2q2(t)) > 0 and abs(x2q2(t)) < 0), p1, p2);
deltav3 := piecewise((abs(x2q3(t)) > 0 and abs(x2q3(t)) < 0), p1, p2);
###############################
# ESTRUCTURA*DE*CONTROL;
#################################
auxfr13 := b1*abs(x2q1(t))^deltav1*sign(x2q1(t));
auxfr23 := b2*abs(x2q2(t))^deltav2*sign(x2q2(t));
auxfr33 := b3*abs(x2q3(t))^deltav3*sign(x2q3(t));

elif GetProperty(RBFLugre,value) = true then # that is radiobutton with dynamic friction

DocumentTools[SetProperty](Label0,caption,dinamica);

fc11 := piecewise(x2q1(t) < 0, -3, 3);
fc22 := piecewise(x2q2(t) < 0, -5, 5);
fc33 := piecewise(x2q3(t) < 0, -5, 5);

fs11 := piecewise(x2q1(t) < 0, -1, 1);
fs22 := piecewise(x2q2(t) < 0, -4, 4);
fs33 := piecewise(x2q1(t) < 0, 0, 0);

sigmaceroa := 1;
sigmacerob := 1;
sigmaceroc := 1;
sigmunoa := 7;
sigmunob := 1;
sigmunoc := 1;
vs := .5;
vd := 4.55;
sigmaunoa := sigmunoa*(exp(-x2q1(t)/vd))^2;
sigmaunob := sigmunob*(exp(-x2q2(t)/vd))^2;
sigmaunoc := sigmunoc*(exp(-(1/7)*x2q3(t)))^2;

gg1 := fc11+fs11*(exp(-x2q1(t)/vs))^2;
gg2 := fc22+fs22*(exp(-x2q2(t)/vs))^2;
gg3 := fc33+fs33*(exp(-x2q3(t)/vs))^2;

auxfr13 := 0.100e-2*sigmaceroa+sigmaunoa*z1(t)+b1*x2q1(t);
auxfr23 := 0.100e-2*sigmacerob+sigmaunob*z2(t)+b2*x2q2(t);
auxfr33 := 0.100e-2*sigmaceroc+sigmaunoc*z3(t)+b3*x2q3(t);

z1(t):=x2q1(t)-sigmaceroa*((abs(x2q1(t)))/(gg1))*.001;
z2(t):=x2q2(t)-sigmacerob*((abs(x2q2(t)))/(gg2))*.001;
z3(t):=x2q3(t)-sigmaceroc*((abs(x2q3(t)))/(gg3))*.001;
end if;
 
Please, help me
that is the program:
13-06-2011-modelo_di.mw

 

Please Wait...