HP Forums
Sub second time delay RPL HP48GX/HP50g - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Sub second time delay RPL HP48GX/HP50g (/thread-5676.html)



Sub second time delay RPL HP48GX/HP50g - Graan - 02-13-2016 08:46 AM

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


RE: Sub second time delay RPL HP48GX/HP50g - roadrunner - 02-13-2016 10:02 AM

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.


RE: Sub second time delay RPL HP48GX/HP50g - Graan - 02-13-2016 11:10 AM

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.


RE: Sub second time delay RPL HP48GX/HP50g - roadrunner - 02-13-2016 06:17 PM

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