does WAIT command in userRPL do a busy wait?



#5

First: hi to all, i'm new here. I have an account on the hp official forum but seems that this forum is more technical (maybe i'm wrong) and moreover it allows questions about userRpl and the hp49g+/50g series. I tried to search an answer to the following question but i found nothing, sorry.

The question: i have an hp 50g and i know that the userRpl is not so energy efficient (unfortunately) due to emulation. Now if i use the command:

0 wait 

The calculator just wait for a keypress and go even in standby mode.I guess that this behaviour doesn't need a lot of energy or computations.
While if i use

5 wait 
The calculator seems to be busy. Can you confirm that? Does "5 wait" do a busy wait, using the CPU?

Thanks in advance for the reply.

Edited: 14 May 2013, 7:35 a.m.


#6

Hello,



> 0 wait

Runs the WaitForKey Loop which is a Parameterized Outer Loop.



> 5 wait

Runs a Saturn ML-Loop waiting the given ticks calculated from the
given seconds.



So without looking further into the code of the two different loops
the first loop most likely uses less energy, as in a POL only a
low level loop is running that scans for a key press.



HTH,

Andreas

http://www.software49g.gmxhome.de


#7

Thanks andreas! (and hi! We lose the contact years ago!)


#8

> We lose the contact years ago!

Well, I wouldn't go that far ;-)

But there is next to nothing activty in Italy for the 50g.



Regards,

Andreas

http://www.software49g.gmxhome.de

#9

Anyway, do you know others commands to achive a delay with no busy wait with user/syRpl?


#10

> with no busy wait with user/syRpl?

What do you mean with busy wait?

If you mean the busy annunciator you can simply turn it off with SYS-RPL or Saturn-ML.



HTH,

Andreas

http://www.software49g.gmxhome.de


#11

No, i meant: http://en.wikipedia.org/wiki/Busy_waiting

In other words, a delay cycle that doesn't use a lot the CPU but simply wait X milliseconds/seconds.


#12

Thats what the POL is designed for.

So you probaly have to write your own POL with the wanted

condition(s).



You can also use the words that are used to construct a POL

according to your needs.



HTH,

Andreas

http://www.software49g.gmxhome.de


#13

I'll try :)

#14

Quote:
Anyway, do you know other commands to achieve a delay with no busy wait with user/syRpl?

Hi,

A few years ago, we get a new software to drive the mass spectrometer and treat mass spectra. I was not confident in this new piece of cake. So, I have used my HP-28S quite often to check mass attribution, spectra de-convolutions and statistics I obtained from this new (fully integrated and sophisticated) software.

Unfortunately, my poor Advance Calculator was a bit slow (I have not spend a lot of time in optimization or using adapted algorithm – I had prefered ‘brute force’ computations or systematic/algorithmic seeks – my priority was to be sure I don’t miss anything obvious).

The computations on my HP-28S was split in three logic blocks; input of survey data, deconvolution and factor analysis, list of main facts/mass peaks and individual mass-peak ions attribution with filters for coherent attribution with chemical formula coherence, mono- or poly- isotopic patterns, natural relative abundance of elements, etc…

Each block of computation was carried on a separate bunch of dedicated userRPL commands. Each long run command was ended with a BEEP and activate a custom MENU which give me the opportunity to continue to the next(s) step(s) of the process.

No WAIT or INKEY or INPUT was used. There were no ‘busy waiting’. The calculator simply turns off after a few minutes unattended.
This appended often, I was busy, my attention was mainly on driving the spectrometers and survey analysis was mainly performed as a background task. And the verification by the HP28S, when needed was the background of the background! (But, still an important task, especially because the new software has bugs and the user often miss to correctly activated the numerous and obscure options on it!


Conclusion:

The other commands to achieve a delay with no busy wait until the user response I know is to split each part of the computation into a dedicated RPL command.
Eventually using the custom MENU facility to prepare the interface for the next(s) step(s) and, in case of long run, attract attention of the user by a short BEEP.
If no response arises in the moment, the calculator will simply turn off.

The late user will have to turn it back on. Fortunately RPL calculators keeps stack, menu, etc through ON/OFF power cycles.

Results and soft menus will then clearly indicate at which step of the total process the calculator has stop. Continuation or adjustments may be easily available, by specific soft-menu key assignation.


#15

Quote:
The other commands to achieve a delay with no busy wait until the user response

But what i want to achive is: wait without the user response.

A little explanation of my program in ultra pseudocode

number = 0
repeat
number +=5
show the number
wait for 5 seconds
until the number is higher than 1000

but the WAIT coomand, as Andreas stated, seems to do a busy wait (1). I thought that there is a way to achieve a sort of "sleep" without computations and user interaction. Even the Parameterized outer loop (following the 2nd sysrpl guide of Kalinowski, Dominik ) needs an event by pressing a key to work.

(1): Andreas i tried the "dowait" command in a small sysrpl program but it seems to achive the same effect of xWAIT (i mean the userRPL command mapped in SysRPL), can you confirm?


Edited: 15 May 2013, 8:12 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 717 12-07-2013, 07:15 PM
Last Post: CompSystems
  HP Prime - most favorite command bluesun08 2 597 11-12-2013, 11:29 AM
Last Post: bluesun08
  hp prime - command syntax bluesun08 6 913 11-10-2013, 11:57 AM
Last Post: bluesun08
  HP PRIME: command to read the SERIAL ? Joseph Ec 9 2,003 11-01-2013, 12:43 AM
Last Post: Joe Horn
  Connectivty Kit for HP Prime needs an "Import Program" Command Eddie W. Shore 3 685 10-23-2013, 03:37 PM
Last Post: Eddie W. Shore
  HP Prime MOUSE command SanS 3 585 10-15-2013, 12:15 PM
Last Post: Han
  [HP-Prime] randPoly command CompSystems 0 339 09-26-2013, 08:49 AM
Last Post: CompSystems
  [HP-Prime xCAS] BUG: string command =( CompSystems 6 726 09-10-2013, 06:38 PM
Last Post: CompSystems
  [HP_Prime] definition of functions, APPLY command and BUGs CompSystems 1 442 09-05-2013, 03:59 PM
Last Post: CompSystems
  [HP-Prime] Request: New command for CAS (EvalStep) CompSystems 4 611 09-04-2013, 09:33 AM
Last Post: Eddie W. Shore

Forum Jump: