User vars

12132013, 01:52 AM
Post: #1




User vars
The new hp Prime is wonderful! I am having great fun learning and developing apps for my own particular situation.
I would like to write a program to: make the vars, changes the vars, restore the user vars on my hp Prime. Can anyone help? The type of variables are real number and the following is an example of the User vars on my Prime: {Lf, Le, Ql, Pd, Lm, Vl, Dia, BHP, Hr, Prs, Ppm, P1, P2, P3, Wp, Gst, Pst, Ax, Yx, Hx, El, Kva, Vd, Cma, Mns, Ds, Mx, CuM, Usg, Kpa, Mps, Hd, Hrs} I am using the vars in customized apps such as the following: copy of Solve app named Electric Program: Electric EXPORT Electric() BEGIN Electric.E1:='(W/E)=I'; Electric.E2:='(E/R)=I'; Electric.E3:='v((W/R)=I)'; Electric.E4:='v(W*R)=E'; Electric.E5:='(I*Lf*2*10.8/%(3,240))=Cma'; Electric.E6:='(I*Lf*2*10.8/Cma)=Vd'; Electric.E7:='(A*1.25*240/600)=I'; Electric.E8:='(I*E/1000)=Kva'; Electric.E9:='(Usg*Hd/%(80,3960))=BHP'; END; Electric Solve info: User vars: Lf, Vd, Cma, Kva E1: W/E=I Desc vars W Watts, E Volts, I Amps E2: E/R=I Desc vars E Volts, R Ohms, I Amps E3: SQRT(W/R)=I Desc vars W Watts, R Ohms, I Amps E4: SQRT(W*R)=E Desc vars W Watts, R Ohms, E Volts E5: (I*Lf*2*10.8/%(3,240))=Cma Desc Calc Cma wire size with 3% Voltage drop vars I Wire Amps, Lf feet length of wire , Cma wire size E6: (I*Lf*2*10.8)/Cma =Vd Desc Calc Voltage drop for a certain wire size vars I Wire Amps, Lf feet length of wire , K10.8, Cma wire size, Vd Voltage drop, 7.2 is 3% of 240 Refer to Notes table for Cma to AWG sizes. E7: (A*1.25*240/600)=I Desc Calc wire Amps vars A Motor Amps, I Wire Amps E8: (I*E)/1000=Kva Desc Calc transformer size. vars I Amps, E Volts, Kva kiloVoltAmps E9: (Usg*Hd/%(80,3960))=BHP Desc Calc Break horse power for a water pump motor. vars Usg US gallons per minute, Hd Feet head of water BHP Break horse power Notes American Wire Gauge AWG table: AWG, Circular Mil area Cma, Area mm^2 0000 211,592 107 000 167,800 85 00 133,072 67.4 0 105,531 53.5 1 83,690 42.4 2 66,396 33.6 3 52,633 26.7 4 41,740 21.2 5 33,101 16.8 6 26,251 13.3 7 20,818 10.5 8 16,509 8.37 9 13,092 6.63 10 10,383 5.26 11 8,234 4.17 12 6,530 3.31 13 5,178 2.62 14 4,107 2.08 Thank you 

12132013, 03:39 PM
(This post was last modified: 12132013 03:40 PM by CR Haeger.)
Post: #2




RE: User vars
Hello,
Yeah the HP Prime is "wonder"ful  as in I wonder how to use it I have also been messing around with User vars, the solver and the spreadsheet. It is tricky setting up saved equations for use in the Solver, Function or other apps. In your program, you may have problems defining solver equations like Electric.E1:='(W/E)=I'; as the variables W, E and I are predefined Home variables (with values). So if you then check, E1 in Electric solver, you may see 0=0 or undef=0 if E is zero. If you used Electric.E1:=Watts/Volts=Amps; then these are "yet" to be defined user variables (Watts, Volts, Amps). Checking E1: should show Watts/Volts=Amps properly. However, when you initially go to the Num view, it will ask if you want to create these three user variables before it performs any numerical solving. Note that you might also try creating a new "Electric" spreadsheet. In it you can define variables in cells, define equations that refer to these variables/cells and even use some cas commands, like solve() to perhaps perform numerical or symbolic solutions. You still need to be aware of what Home and User variables values (if any) are while using the spreadsheet... I too, would like to know how to save useful formulas in symbolic form, then use them over and over in Home, Cas, Apps and/or programs. Maybe some experts can guide us. Best, Carl 

12132013, 09:24 PM
Post: #3




RE: User vars
Thanks Carl Food for thought and more questions asked.
I appreciate the comments. pvrs 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)