Post Reply 
A shorter Pause (PSE) in a program
01-31-2018, 08:00 AM (This post was last modified: 01-31-2018 01:33 PM by Dieter.)
Post: #8
RE: A shorter Pause (PSE) in a program
(01-31-2018 01:32 AM)4ster Wrote:  I would like to insert an operation between lines 31 & 32 which functions as a half pause.
...
Is there such a beast?

As already noted, VIEW X plus a command that takes a fraction of a second is the solution. If you want to display X, that is. Maybe the PSE in your program is only supposed to cause a delay and the X-display is not required. Then the VIEW X can be omitted. Also keep in mind that the VIEW display stays on even when the program continues, so a CLD afterwards may clear the display again, if desired.

As far as "delay commands" are concerned I like to do this with 0 SIN or 0 TAN (tan is faster than sin), or several consecutive SIN/TAN in series. Other transcendental functions may work as well (cf. the proposed PI LN), but be sure to provide a defined X-value as the execution time can vary with X. Since 0 SIN or 0 TAN return zero, a final "+" may drop the stack. This preserves three out of four stack registers. Do you need more?

(01-31-2018 01:32 AM)4ster Wrote:  As it is written the program runs the ATC-0010 at the following speeds:
32 cycles a minute with no flags
30 cycles a minute with flag 1 set
18 cycles a minute with flag 2 set
14 cycles a minute with flag 3 set

Let's see. Without any delay commands (and a subroutine call) the program requires 2 seconds per loop. With a PSE it's 3,3 seconds. Which matches the 1,3 seconds that a PSE is supposed to delay. You now want 24 cycles per minute, i.e. 2,5 seconds per loop. So compared to the non-delaying LBL 01 routine you need to add a 0,5 second delay. Or if you want "half a PSE" it's more like 0,6 s. I'd suggest you try 0 SIN + here. You can fine-tune the delay with TAN which is roughly half a SIN delay.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
A shorter Pause (PSE) in a program - 4ster - 01-31-2018, 01:32 AM
RE: A shorter Pause (PSE) in a program - Dieter - 01-31-2018 08:00 AM



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