HP Forums

Full Version: Sub second time delay RPL HP48GX/HP50g
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Since I did not find any sub second time delay command (or maybe there is?) Im figuring out whats the best/easiest/most exact way to do a delay (HP48GX or HP50g):

1) Using TICKS in a loop adding a number and checking when TICKS = TICKS + value
2) Using TIME in a loop adding a number and checking when TIME = TIME + value
3) A FOR NEXT loop just counting.

Or other ways?

/Andreas
This from the 50g AUR manual, page 3-272 might be what you are looking for:

WAIT
Type: Command
Description: Wait Command: Suspends program execution for specified time, or until a key is pressed.
The function of WAIT depends on the argument, as follows:
• Argument x interrupts program execution for x seconds.
• Argument 0 suspends program execution until a valid key is pressed (see below). WAIT then
returns xkey, which defines where the pressed key is on the keyboard, and resumes program
execution.
xkey is a three-digit number that identifies a key’s location on the keyboard. See the entry for
ASN for a description of the format of xkey.
• Argument –1 works as with argument 0, except that the currently specified menu is also
displayed.
Thank you.
I saw the WAIT command but I somehow thought it was only whole seconds. If it will work with decimals it will be fine.
I believe it does, try this program:

<<
TICKS SWAP WAIT
TICKS SWAP - B->R 8192 /
>>

enter 1.5
run the program
enter 1.0
run the program
press -

you get a number close to 0.5
Reference URL's