Post Reply 
Programming Help
03-07-2019, 08:25 AM
Post: #1
Programming Help
I'm trying to write a program to help with some Kinematics equations. However I'm new to HP PPL and could use some advice and help on where to get started.

I would like to have it look something like the triangle solver app but when I tried to modify that app I can't get at the code and it just comes off as a clone of the triangle app.

I have some basic code that allows for input of the variables but I'm not sure how to set up a button to start solving for the missing information. Also it would be helpful if I could have the variables set to null so I can tell which ones the user has set and not have them all default to 0.

The very limited code I have is below...
Code:

// Starter Program to help solve Kinematics problems

EXPORT Kinematics()
BEGIN
    INPUT(
    {
    {Vi, [0], {15, 30, 0}},
    {Vf, [0], {65, 30, 0}},
    {Ti, [0], {15, 30, 1}},
    {Tf, [0], {65, 30, 1}},
    {Si, [0], {15, 30, 2}},
    {Sf, [0], {65, 30, 2}},
    {A,  [0], {15, 30, 3}}
    },
    "Kinematics Solver",
    {
    "Vi=", "Vf=",
    "Ti=", "Tf=",
    "Si=", "Sf=",
    " A="
    },
    {
    "Velocity Initial",
    "Velocity Final",
    "Time Initial",
    "Time Final",
    "Position Initial",
    "Position Final",
    "Acceleration"
    },
    {10,20,30,40,50,60,70}
  );
END;
Find all posts by this user
Quote this message in a reply
03-07-2019, 07:29 PM (This post was last modified: 03-07-2019 07:30 PM by Han.)
Post: #2
RE: Programming Help
I believe it is not possible to make an interactive INPUT form at the moment. What you can do, however, is allow the user to enter an "S" (you will need to add another allowed type into your INPUT command). Then once the user presses OK or the ENTER key, you can search for which variables has an "S" and solve for those variables.

If you are trying to set up an equation solver, perhaps the solve app might be a better place to start. Clone the solve app, set up your variables and equations, and use the STARTVIEW command to enable the app.

Lastly, if you just want a solver (as opposed to trying out some programming for yourself) that will save your equations, try SolveSys (link in my signature below).

(Don't forget there is a built-in documentation on the calculator itself!)

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-08-2019, 06:47 AM
Post: #3
RE: Programming Help
where can I find the documentation on the calculator? And I would love to modify an app but I haven't seen any way to modify the look of the apps.

Are there any tutorials that talk about that somewhere?
Find all posts by this user
Quote this message in a reply
03-08-2019, 01:16 PM
Post: #4
RE: Programming Help
To modify the program associated with the app, press [Shift], [ 1 ]. At the top of the list of programs listed is the app program. That is the one to modify.


The links posted below is a tutorial for custom apps, and built-apps can be customized in a similar way.

Some information of Custom Apps and App Variables:

http://edspi31415.blogspot.com/2018/02/h...-apps.html

Examples of Custom Apps:

http://edspi31415.blogspot.com/2018/02/h...mcalc.html

http://edspi31415.blogspot.com/2018/02/h...ustom.html

Good luck,

Eddie
Visit this user's website Find all posts by this user
Quote this message in a reply
03-08-2019, 02:13 PM
Post: #5
RE: Programming Help
(03-08-2019 06:47 AM)ArmoredCow Wrote:  where can I find the documentation on the calculator?

Press Help.

The built-in Help files are quite extensive.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
03-09-2019, 12:59 AM
Post: #6
RE: Programming Help
(03-08-2019 02:13 PM)rprosperi Wrote:  
(03-08-2019 06:47 AM)ArmoredCow Wrote:  where can I find the documentation on the calculator?

Press Help.

The built-in Help files are quite extensive.

Just to add some information for those who do not already know: type in a command name, place the cursor at the end of the name (probably works with the cursor anywhere on the command name) and then press Help. This works whether on the command line or inside a program.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 




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