Jump forward and back a view
|
09-27-2024, 06:24 AM
Post: #1
|
|||
|
|||
Jump forward and back a view
Hello everyone, I need your help again.
I would like to scroll back and forth between the last two subprograms "Output" and "Graphics" in the listed program. In both outputs you can also jump to the beginning of the program or end the program. Both via the touch display. I just can't get from the "graphics" output back to the "output" of the calculation! Greetings Heino System();Beton();Berechnung();Ausgabe(); Tabelle();Grafik(); Md1;Nd1;h;b;cnom;∅Büg;∅Bew;d1;kd; A1;A2;A3;A4;A5;A6;A7;A8;A9;A10; KS1;AS1;XI1;ZETA1;BET1; W1;N1;I1; xh1;z1;Fsd; EXPORT Bemessung() BEGIN STARTVIEW(-1); INPUT({{Md1,[0],{30,17,0}}, {Nd1,[0],{30,17,1}}, {h,[0],{30,17,2}}, {b,[0],{30,17,3}}, {cnom,[0],{77,17,0}}, {∅Büg,[0],{77,17,1}}, {∅Bew,[0],{77,17,2}}}, "Ermittlung von kd", {"MEds [kNm]","NEd [kN]","h [cm] ","b [m] ","cnom [cm] ","∅Büg [mm]","∅Bew [mm]"}, {"Bemessungsmoment","Zugkraft","Höhe des Betonquerschnittes","breite des Betonquerschnittes [m]","Betondeckung [cm]","Bügeldurchmesser [mm]","Bewehrungsdurchmesser [mm]"}); d1:=h-cnom-∅Büg/10-∅Bew/20; kd:=d1/√((Md1/b)); Tabelle(); END; Tabelle() BEGIN A1:={"1.54","1.57","1.60","1.62","1.65","1.69","1.73","1.77","1.82","1.86","1.91","1.97","2.03","2.11","2.21","2.30","2.43","2.60","2.81","3.10","3.40","3.82","4.55","6.12","11.13"}; A2:={"1.38","1.40","1.43","1.45","1.48","1.51","1.54","1.58","1.63","1.67","1.71","1.76","1.82","1.89","1.97","2.06","2.18","2.32","2.51","2.78","3.04","3.42","4.07","5.47","9.95"}; A3:={"1.26","1.28","1.30","1.33","1.35","1.38","1.41","1.44","1.49","1.52","1.56","1.61","1.66","1.72","1.80","1.88","1.99","2.12","2.29","2.53","2.77","3.12","3.71","5.00","9.09"}; A4:={"1.17","1.19","1.21","1.25","1.28","1.30","1.34","1.38","1.41","1.44","1.49","1.54","1.54","1.59","1.67","1.74","1.84","1.96","2.12","2.35","2.57","2.89","3.44","4.63","8.41"}; A5:={"1.09","1.11","1.13","1.15","1.17","1.19","1.22","1.25","1.29","1.32","1.35","1.39","1.44","1.49","1.56","1.63","1.72","1.84","1.99","2.20","2.40","2.70","3.22","4.33","7.87"}; A6:={"1.03","1.05","1.07","1.08","1.10","1.13","1.15","1.18","1.21","1.24","1.27","1.31","1.36","1.41","1.47","1.53","1.62","1.73","1.87","2.07","2.26","2.55","3.03","4.08","7.42"}; A7:={"0.98","0.99","1.01","1.03","1.05","1.07","1.09","1.12","1.15","1.18","1.21","1.24","1.29","1.33","1.40","1.46","1.54","1.64","1.78","1.96","2.15","2.42","2.88","3.87","7.04"}; A8:={"3.09","3.04","2.99","2.95","2.91","2.87","2.83","2.79","2.75","2.72","2.69","2.66","2.63","2.60","2.57","2.54","2.51","2.48","2.45","2.42","2.40","2.38","2.36","2.34","2.32"}; A9:={"0.617","0.585","0.555","0.530","0.504","0.477","0.450","0.422","0.393","0.371","0.350","0.325","0.302","0.277","0.2507","0.227","0.201","0.174","0.147","0.120","0.104","0.087","0.069","0.048","0.025"}; A10:={"0.743","0.757","0.769","0.780","0.790","0.801","0.813","0.824","0.836","0.846","0.854","0.865","0.875","0.855","0.896","0.906","0.916","0.927","0.939","0.950","0.958","0.966","0.975","0.983","0.991"}; KS1:=A8; XI1:=A9; ZETA1:=A10; Beton(); END; //A1:={"11.13","6.12","4.55","3.82","3.40","3.10","2.81","2.60","2.43","2.30","2.21","2.11","2.03","1.97","1.91","1.86","1.82","1.77","1.73","1.69","1.65","1.62","1.60","1.57","1.54"}; //A2:={"9.95","5.47","4.07","3.42","3.04","2.78","2.51","2.32","2.18","2.06","1.97","1.89","1.82","1.76","1.71","1.67","1.63","1.58","1.54","1.51","1.48","1.45","1.43","1.40","1.38"}; //A3:={"9.09","5.00","3.71","3.12","2.77","2.53","2.29","2.12","1.99","1.88","1.80","1.72","1.66","1.61","1.56","1.52","1.49","1.44","1.41","1.38","1.35","1.33","1.30","1.28","1.26"}; //A4:={"8.41","4.63","3.44","2.89","2.57","2.35","2.12","1.96","1.84","1.74","1.67","1.59","1.54","1.49","1.44","1.41","1.38","1.34","1.30","1.28","1.25","1.23","1.21","1.19","1.17"}; //A5:={"7.87","4.33","3.22","2.70","2.40","2.20","1.99","1.84","1.72","1.63","1.56","1.49","1.44","1.39","1.35","1.32","1.29","1.25","1.22","1.19","1.17","1.15","1.13","1.11","1.09"}; //A6:={"7.42","4.08","3.03","2.55","2.26","2.07","1.87","1.73","1.62","1.53","1.47","1.41","1.36","1.31","1.27","1.24","1.21","1.18","1.15","1.13","1.10","1.08","1.07","1.05","1.03"}; //A7:={"7.04","3.87","2.88","2.42","2.15","1.96","1.78","1.64","1.54","1.46","1.40","1.33","1.29","1.24","1.21","1.18","1.15","1.12","1.09","1.07","1.05","1.03","1.01","0.99","0.98"}; //A8:={"2.32","2.34","2.36","2.38","2.40","2.42","2.45","2.48","2.51","2.54","2.57","2.60","2.63","2.66","2.69","2.72","2.75","2.79","2.83","2.87","2.91","2.95","2.99","3.04","3.09"}; Beton() BEGIN STARTVIEW(6,1); CHOOSE (N1,"Betongüte",{"C 20/25","C 25/30","C 30/37","C 35/45","C 40/50","C 45/55","C 50/60","Ende"}); IF N1==1 THEN W1:=A1; BET1:="C 20/25"; END; IF N1==2 THEN W1:=A2; BET1:="C 25/30"; END; IF N1==3 THEN W1:=A3; BET1:="C 30/37"; END; IF N1==4 THEN W1:=A4; BET1:="C 35/45"; END; IF N1==5 THEN W1:=A5; BET1:="C 40/50"; END; IF N1==6 THEN W1:=A6; BET1:="C 45/55"; END; IF N1==7 THEN W1:=A7; BET1:="C 50/60"; END; IF N1==8 THEN END; Berechnung(); END; Berechnung() BEGIN REPEAT I1:=I1+1; UNTIL (EXPR(W1(I1)))>kd or kd>(EXPR(W1(25))) or kd<(EXPR(W1(1))); RECT_P(0,0,320,220,RGB(0,255,255)); IF kd>(EXPR(W1(25))) THEN KS1:=EXPR((KS1(25))); END; IF kd<(EXPR(W1(1))) THEN KS1:=EXPR((KS1(1))); END; AS1:=(EXPR(KS1(I1-1)))*Md1/d1+Nd1/43.5; Ausgabe(); END; Ausgabe() BEGIN LOCAL m,m1,mx,my; LOCAL Ende,Weiter,Zurück; RECT_P(0,0,320,35,RGB(0,34,174));//BLAU TEXTOUT_P("erf.As nach dem kd-Verfahren",30,5,5,RGB(255,255,255)); TEXTOUT_P("Betongüte",10,40,4); TEXTOUT_P(":",85,40,4); TEXTOUT_P(BET1,93,40,4); TEXTOUT_P("cnom",180,40,4); TEXTOUT_P(":",220,40,4); TEXTOUT_P(ROUND(cnom,2)+" cm",240,40,4); TEXTOUT_P("MEd",10,70,4); TEXTOUT_P("=",50,70,4); TEXTOUT_P(ROUND(Md1,2)+" kNm",70,70,4); TEXTOUT_P("NEd",180,70,4); TEXTOUT_P("=",220,70,4); TEXTOUT_P(ROUND(Nd1,2)+" kN",240,70,4); TEXTOUT_P("h",10,95,4); TEXTOUT_P("=",50,95,4); TEXTOUT_P(ROUND(h,2)+" cm",70,95,4); TEXTOUT_P("d",180,95,4); TEXTOUT_P("=",220,95,4); TEXTOUT_P(ROUND(d1,2)+" cm",240,95,4); TEXTOUT_P("kd",10,120,4); TEXTOUT_P("=",50,120,4); TEXTOUT_P(ROUND(kd,2),70,120,4); TEXTOUT_P("ks",180,120,4); TEXTOUT_P("=",220,120,4); TEXTOUT_P(EXPR((KS1(I1-1))),240,120,4); TEXTOUT_P("ξ",10,145,4); TEXTOUT_P("=",50,145,4); TEXTOUT_P(EXPR((XI1(I1-1))),70,145,4); TEXTOUT_P("ζ",180,145,4); TEXTOUT_P("=",220,145,4); TEXTOUT_P(EXPR((ZETA1(I1-1))),240,145,4); RECT_P(0,170,320,240,RGB(0,34,174));//BLAU TEXTOUT_P("erf.as",85,180,6,RGB(255,255,255)); TEXTOUT_P("=",150,180,6,RGB(255,255,255)); TEXTOUT_P(ROUND(AS1,2)+" cm²",175,180,6,RGB(255,255,255)); DRAWMENU("ENDE","","weiter","","","zurück"); REPEAT // Get mouse data REPEAT m:=MOUSE; m1:=m(1); UNTIL SIZE(m1)>0; mx:=m1(1); my:=m1(2); Ende:=(my≥220 AND my≤319) AND (mx≥0 AND mx≤51); Weiter:=(my≥220 AND my≤319) AND (mx≥106 AND mx≤160); Zurück:=(my≥220 AND my≤319) AND (mx≥265 AND mx≤319); UNTIL (Ende or Weiter or Zurück); // wait for a soft key //UNTIL (Ende or Weiter); // exit Main loop with "ENDE" or "weiter" // weiter IF Weiter THEN Grafik; //do what you need for weiter END; // ENDE IF Ende THEN STARTVIEW(-1); //do what you need for ENDE END; //Zurück IF Zurück THEN I1:=0; Bemessung(); END; END; Grafik() BEGIN LOCAL m,m1,mx,my; LOCAL Ende,Weiter,Zurück; RECT(); LINE_P(20,20,20,120); TEXTOUT_P("h",10,60,2); LINE_P(40,20,40,107); TEXTOUT_P("d",30,60,2); LINE_P(60,20,60,55); TEXTOUT_P("x",50,30,2); LINE_P(16,20,65,20); LINE_P(56,55,65,55); LINE_P(36,107,65,107); LINE_P(16,120,65,120); LINE_P(70,142,120,142); LINE_P(70,125,70,146); LINE_P(120,125,120,146); TEXTOUT_P("b",92,130,2); RECT_P(G0,70,20,120,120,RGB(0,0,0),RGB(180,220,220)); RECT_P(G0,70,20,120,55,RGB(0,0,0),RGB(220,250,220)); RECT_P(G0,75,105,115,110,RGB(0,0,0)); TEXTOUT_P("As₁",90,90,2); //GRAFIK II LINE_P(178,20,199,20); LINE_P(178,20,178,120); LINE_P(140,120,178,120); LINE_P(199,20,140,120); TEXTOUT_P("+",159,97); TEXTOUT_P("-",181,20); //GRAFIK III LINE_P(240,20,240,120); RECT_P(G0,240,20,265,56,RGB(0,0,0),RGB(220,250,220)); TEXTOUT_P("→",215,93,7); TEXTOUT_P("Fsd",210,91,2); TEXTOUT_P("←",270,21,7); TEXTOUT_P("Fcd",270,19,2); LINE_P(305,37,305,109); LINE_P(292,37,308,37); LINE_P(250,109,308,109); TEXTOUT_P("z",294,60); xh1:=EXPR(XI1(I1-1))*d1; z1:=EXPR(ZETA1(I1-1))*d1; Fsd:=Md1/(z1/100); TEXTOUT_P("Druckzonenhöhe",5,155,3); TEXTOUT_P("x",130,155,3); TEXTOUT_P("=",155,155,3); TEXTOUT_P(ROUND(xh1,2)+" cm",175,155,3); TEXTOUT_P("Innerer Hebelarm",5,175,3); TEXTOUT_P("z",130,175,3); TEXTOUT_P("=",155,175,3); TEXTOUT_P(ROUND(z1,2)+" cm",175,175,3); TEXTOUT_P("Zugkraft",5,195,3); TEXTOUT_P("Fsd",130,195,3); TEXTOUT_P("=",155,195,3); TEXTOUT_P(ROUND(Fsd,1)+" kN",175,195,3); DRAWMENU("ENDE","","weiter","","","zurück"); REPEAT // Get mouse data REPEAT m:=MOUSE; m1:=m(1); UNTIL SIZE(m1)>0; mx:=m1(1); my:=m1(2); Ende:=(my≥220 AND my≤319) AND (mx≥0 AND mx≤51); Weiter:=(my≥220 AND my≤319) AND (mx≥106 AND mx≤160); Zurück:=(my≥220 AND my≤319) AND (mx≥265 AND mx≤319); UNTIL (Ende or Weiter or Zurück); // wait for a soft key //UNTIL (Ende or Weiter); // exit Main loop with "ENDE" or "weiter" // weiter IF Weiter THEN Grafik; //do what you need for weiter END; // ENDE IF Ende THEN STARTVIEW(-1); //do what you need for ENDE END; //Zurück IF Zurück THEN Ausgabe; END; END; |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Jump forward and back a view - Onieh - 09-27-2024 06:24 AM
|
User(s) browsing this thread: 1 Guest(s)