Problem with debug HP prime program, somebody help me?



#6

Hi to all user's. I'm new in the forum, I'm from Mexico and I need your help.

Recent I buy my hp prime...I did a problem with the DEBUG in a program...

when i check in the process... in a line exclusively the DEBUG reset my prime...

I'm a new programmer, i have no much experience...

EXPORT VSR()
BEGIN


"CONTENT OF MY PROGRAM BLA BLA BLA"
...
...
...
A:=0.9*b*d^2*fbpc;
Dp:=A^2 - 2*A*FCG*ABS(Mp*1E5);
<The last formula is the ultimate calculus done and the machine reset my prime every time in the same line...)

Why?

>>>
CONTINUE MY PROGRAM...


Thanks so much!


#7

The problem is located at "BLA BLA" :)


Please list your program, so someone can try to reproduce the problem.


#8

EXPORT VSR()
BEGIN
LOCAL b:=15, d:=37, fc:=200, fy:=4200, Mp:=1, Mn:=1, V:=1, FCG:=1.4;
LOCAL fac,fbpc,romin,robal,romax,A;
LOCAL Dp,Dn,wp,wn,rop,ron,ro,Asp;
LOCAL Asn,lambda,alfa,beta,Vcr;
LOCAL Vc1,Vc2,s1,s,Av,fyv;

INPUT ({b,d,Mp,Mn,V,fc, fy,FCG}, "VIGAS NTC RDF 04", {"b =", "d =", "M(+) =", "M(-) =", "V =", "f'c =", "fy =", "FC ="},
{"en cm", "en cm", "en Ton*m", "en Ton*m", "en Ton", "en kg/cm^2", "en kg/cm^2", "Factor de carga adimensional" } , "" );

CHOOSE (N, "ELIJA ESTRIBOS", {"1/4 plg","3/8 plg", "1/2 plg"} );

CASE
IF N==1 THEN Av:= 0.64; fyv:=2350 END;
IF N==2 THEN Av:=1.42; fyv:=4200 END;
Av:=2.54; fyv:=4200;
END;

fac:=0.8*fc;

IF fac < 280
THEN beta:=0.85
ELSE beta:=1.05 - (fac/1400)
END;

fbpc:=beta*fac;

romin:=0.0033;
robal:= fbpc*6000/(fy*(fy+6000)) ;
romax:=0.85*robal;

A:=0.9*b*d^2*fbpc;
Dp:=A^2 - 2*A*FCG*ABS(Mp*1E5);
Dn:=A^2 - 2*A*FCG*ABS(Mn*1E5);

IF Dp > 0 AND Dn > 0
THEN
wp:=(A- vDp)/A;
wn:=(A- vDn)/A;
rop:=wp*fbpc/fy;
ron:=wn*fbpc/fy;

//Cálculo de la cuantía necesaria

IF rop < romax AND ron < romax
THEN

IF rop<romin
THEN rop:=romin
ELSE rop:=wp*fbpc/fy
END;
IF ron<romin
THEN ron:=romin
ELSE ron:=wn*fbpc/fy
END;
//Se selecciona la cuantía máxima...
ro:=MAX(rop,ron);

//Cálculo del acero necesario

Asp:=rop*b*d;
Asn:=ron*b*d;


//Diseño por cortante


lambda:= 1 - 0.004 * (10*d - 700);


IF d < 70
THEN alfa:=1.0
ELSE
IF lambda < 0.8
THEN alfa:=0.8
ELSE alfa:=1.0
END;
END;

IF ro<0.015
THEN Vcr:= alfa*0.8*b*d*(0.2 + 20*ro)* vfac
ELSE Vcr:= alfa*0.8*b*d*(0.5)* vfac
END;

Vc1:= 1.5*Vcr / (0.2 + 20*ro);
Vc2:= 2.5*Vcr / (0.2 + 20*ro);
s1:= 0.8*Av*fyv*d / ((FCG*1E3*V) - Vcr);


IF (FCG*1E3*V) < Vc2
THEN

CASE
IF (FCG*1E3*V) < Vcr THEN s:= d/2 END;
IF (FCG*1E3*V) <Vc1 THEN s:= MIN(s1, d/2) *1_cm END;
s:= MIN(s1, d/4) *1_cm
END;
//Impresión de resultados:
PRINT("RESULTADOS DEL DISEÑO:");
PRINT( "b = " + b +"cm"+ " ; " + "d = " + d +"cm");
PRINT( "M(+) = " + Mp +"Ton*m");
PRINT( "M(-) = " + Mn +"Ton*m");
PRINT( "f'c = " + fc +"kg/cm^2");
PRINT( "fy = " + fy +"kg/cm^2");
PRINT( "ro (+)= " + rop + " ; " + "As(+)=" + Asp+ "cm^2" );
PRINT( "ro (-)= " + ron + " ; " + "As(-)=" + Asn+"cm^2" );
CASE
IF N==1 THEN PRINT("E 1/4 plg @ " + s) END;
IF N==2 THEN PRINT("E 3/8 plg @ " + s) END;
PRINT("E 1/2 plg @ " + s)
END;
IF (FCG*1E3*V) < Vcr THEN PRINT(" (Acero mínimo por cortante) ") END;

ELSE
PRINT ("FALLA POR CORTANTE")
END;

ELSE
PRINT ("FALLA: CUANTÍA MAYOR A LA MÁXIMA PERMITIDA");
END;
ELSE
PRINT ("FALLA: DIMENSIONES ESCASAS");
END;
END;


#9

I think that you have forgotten to declare 3 variables:
vDp, vDn and vfac.
I don't see them with LOCAL statement.

Regards,

Damien.

#10

I see an ill construct

  CASE
IF N==1 THEN Av:= 0.64; fyv:=2350 END;
IF N==2 THEN Av:=1.42; fyv:=4200 END;
Av:=2.54; fyv:=4200;
END;
You should use "DEFAULT" keyword for last part.
  CASE
IF N==1 THEN Av:= 0.64; fyv:=2350 END;
IF N==2 THEN Av:=1.42; fyv:=4200 END;
DEFAULT Av:=2.54; fyv:=4200;
END;
and you have an other one in
        CASE
IF (FCG*1E3*V) < Vcr THEN s:= d/2 END;
IF (FCG*1E3*V) <Vc1 THEN s:= MIN(s1, d/2) *1_cm END;
s:= MIN(s1, d/4) *1_cm END;
and
        CASE IF N==1 THEN PRINT("E 1/4 plg @ " + s) END;
IF N==2 THEN PRINT("E 3/8 plg @ " + s) END;
PRINT("E 1/2 plg @ " + s) END;

and it looks like an "END" is missing somewhere
#11

Have you performed a firmware update?


#12

I did The firmware updates today and I repair the STATEMET "DEFAULT" but the problem continues...

I'll check it with patience

Thanks to all...see you in a new post


Possibly Related Threads...
Thread Author Replies Views Last Post
  Prime Emulator Connection Problem John Colvin 3 282 12-14-2013, 11:00 PM
Last Post: Han
  Sending little images to the Prime (...and Program name bug?) Erwin Ried 19 653 12-10-2013, 05:35 PM
Last Post: Erwin Ried
  HP Prime: problem with the memory of calculator during the debug process? Carlos CM (Mexico) 7 399 12-06-2013, 12:34 PM
Last Post: Carlos CM (Mexico)
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 136 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  Prime: Placing more than 1 item on the RPN stack in a single program? John Colvin 4 296 11-19-2013, 08:59 AM
Last Post: Miguel Toro
  Prime: Program size limited to 64K? Erwin Ried 4 264 11-17-2013, 11:42 PM
Last Post: Joseph Ec
  [HP-Prime] Picking elements from a List in a program Jean-Michel 3 244 11-15-2013, 04:16 AM
Last Post: dg1969
  HP Prime: Recommendation for future RPN Program Mode BruceTTT 3 242 11-13-2013, 10:03 PM
Last Post: BruceTTT
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 327 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  [HP Prime] Using n-root symbol and exponent problem uklo 7 366 11-11-2013, 01:39 AM
Last Post: Alberto Candel

Forum Jump: