The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

custom menu use in HP48GX
Message #1 Posted by Don Davis on 11 Jan 2006, 4:08 p.m.

I have some programs in a subdirectory which I would like to be able to run from a custom menu in the Home directory. I have no problem maiking the cst variable list in the subdirectory iteself and getting this to work from there. However, I have forgotten how to put the path in the cst for the home directory so that the subdirectory programs will run from home.

I am pretty sure I have done this successfully in the past, but I am not at a place where I can reach my notes or even a HP48 user's guide. Any responses are appreciated.

Thanks, Don

      
Re: custom menu use in HP48GX
Message #2 Posted by Ron Allen on 11 Jan 2006, 5:56 p.m.,
in response to message #1 by Don Davis

I am relying on memory myself since I have the 49. If this doesn't work right come back. By that time I might locate my 48 and will have tried it out.

I think that all you need to do is to create your cst list while you are inside the subdirectory it applies to. You may have as many CST menus as you have subdirectories.

Ron

            
Re: custom menu use in HP48GX
Message #3 Posted by Don Davis on 11 Jan 2006, 6:28 p.m.,
in response to message #2 by Ron Allen

Ron,

The custom menu does work if I create it and use it while in the subdirectory where the programs it calls are located. I would like a custom menu to reside in the Home directory, but which calls programs in a sub-directory. I know I did this before, but I can't recall how exactly...

Thanks, Don

                  
Re: custom menu use in HP48GX
Message #4 Posted by Ron Allen on 11 Jan 2006, 7:13 p.m.,
in response to message #3 by Don Davis

Don,

my quick response is to consider the fact that any object you put into the CST variable (or other name of an object), even icluding a spare list of variables inside a variable on the CST list, at HOME will iniate the same activity as it would otherwise. Therefore you could have any number of program objects taking you to any subdirectory and back. You would then have the choice of going to another custom menu directly and working with it, or automate that trip as well.

In case you forgot how to create subdirectories a trip to "memory" then "new" should get you to familiar ground.

      
Re: custom menu use in HP48GX
Message #5 Posted by Ron Allen on 11 Jan 2006, 6:32 p.m.,
in response to message #1 by Don Davis

Don,

I only remembered a little of the CST use in the 48, but I was right about just storing a list representing the variables in your CST. Or you can go to a helper by pressing left shift then the CST button. Press menu twice to get into the control subdirectory and create your custom menu. The simpler way for a bare menu is still to store a list {of the variables} representing your menu into 'CST'

The custom menu can be enhanced in several ways, mostly by using the shift left and right method. This is all detailed in chapter 30 in the user's guide, part number 00048-90126.

Don't know if you can access a download of the manual, but you might can buy one through this forum. In the meantime, detail any additional enhancements for your subdirectories and I might be able to answer them.

Ron

      
Re: custom menu use in HP48GX
Message #6 Posted by Jonathan Purvis (New Zealand) on 11 Jan 2006, 9:43 p.m.,
in response to message #1 by Don Davis

To change to a directory and run a program, use its full path, eg:

{ HOME dir1 subdir1 program } EVAL

To restore the current directory after running, use this:

\<< PATH { HOME dir1 subdir1 program } EVAL EVAL \>>
      
Re: custom menu use in HP48GX
Message #7 Posted by Don Davis on 12 Jan 2006, 7:35 a.m.,
in response to message #1 by Don Davis

Thanks for the helpful replies - with your help (and finding a manual), here is what I settled on:

I three programs in a subdirectory (path is Home->Optics->Cnvrt) which I want to appear in a custom menu in the home directory. When I run them from this custom menu, I want to remain in (or return to) the home directory. The three programs are labeled "->dBm", "->mW", and "l<->f".

My CST variable in the home directory looks like this:

{ { "-dBm" {<< OPTICS CNVRT -dBm HOME>>}} { "-mW" {<< OPTICS CNVRT -mW HOME>>}} { "l-f" {<< OPTICS CNVRT l-f HOME>>}}}

This works fine. It seems inelegant in that it actually switches directories, runs the program, and then switches back. I would prefer to just run the program via a called path from home, but they are really small short conversions, so it is no matter.

Thanks for the advice ..

Best regards, Don

            
Re: custom menu use in HP48GX
Message #8 Posted by Ron Allen on 12 Jan 2006, 7:27 p.m.,
in response to message #7 by Don Davis

Looks just like the model code in the manual, glad you found what you need.

I'm curios. The program labels look like you might be into fiber optics? My son-in-law has qualified in optic networks as an employee of QWEST. I understand that to be a not-so-frequent certification.

I have set aside space in my 49G+ for solving multiple equations to verify depth of field and other optics questions to use in my hobby of photography. The 49g+ is 3-4 times as fast as the 48gx in solving the full set of equations for hyperfocal, depth of field, etc. Had not thought before of accessing programs and functions directly from the HOME Menu to make the frequent use of them more efficient. Thanks for the idea,

Ron

                  
Re: custom menu use in HP48GX
Message #9 Posted by Don Davis on 14 Jan 2006, 10:18 a.m.,
in response to message #8 by Ron Allen

Ron,

Thanks for the help. Yes, I worked in fiber for a long time - from 1986 until 2002. The market for fiber is sort of down right now, so I am in RF for the moment. I keep a few fiber related quick routines in case something comes up. For a while I did work on optical power induced damage in fibers (hence the quick mW to dBm keys) and later in DWDM (hence the wavelength to frequency key for C and L band work). Very simple calculations, but nice to have them on a menu key. Good luck to your son-in-law. Tell him to put in lots of fiber so the market for products picks back up!!

regards, Don

Quote:
Looks just like the model code in the manual, glad you found what you need.

I'm curios. The program labels look like you might be into fiber optics? My son-in-law has qualified in optic networks as an employee of QWEST. I understand that to be a not-so-frequent certification.

Ron


            
Re: custom menu use in HP48GX
Message #10 Posted by James M. Prange (Michigan) on 18 Jan 2006, 4:35 a.m.,
in response to message #7 by Don Davis

Quote:
Thanks for the helpful replies - with your help (and finding a manual), here is what I settled on:

I three programs in a subdirectory (path is Home->Optics->Cnvrt) which I want to appear in a custom menu in the home directory. When I run them from this custom menu, I want to remain in (or return to) the home directory. The three programs are labeled "->dBm", "->mW", and "l<->f".

My CST variable in the home directory looks like this:

{ { "-dBm" {<< OPTICS CNVRT -dBm HOME>>}} { "-mW" {<< OPTICS CNVRT -mW HOME>>}} { "l-f" {<< OPTICS CNVRT l-f HOME>>}}}

This works fine. It seems inelegant in that it actually switches directories, runs the program, and then switches back. I would prefer to just run the program via a called path from home, but they are really small short conversions, so it is no matter.


Maybe try using "path names" in the programs, such as:
\<< { OPTICS CNVRT dBm } RCL EVAL \>>
where "\<<" and "\>>" represent the program delimiters. Substitute your actual directory and variable names.

Effectively, the above is equivalent to saving the current directory (in this case, HOME), switching to the CNVRT directory, recalling the contents of variable dBm, switching back to the original directory, and finally evaluating the contents of the variable.

If you want to be able to use this from somewhere other than the home directory, then make the program:

\<< { HOME OPTICS CNVRT dBm } RCL EVAL \>>

Your CST variable could be something like:

{
  { "\->dBm" \<< { HOME OPTICS CNVRT dBm } RCL EVAL \>> }
  { "\->mW" \<< { HOME OPTICS CNVRT mW } RCL EVAL \>> }
  { "l<->f" \<< { HOME OPTICS CNVRT lf ) RCL EVAL \>> }
}
("\->" represents the "right arrow" character.)

Regards,
James


[ Return to Index | Top of Index ]

Go back to the main exhibit hall