PDA

View Full Version : Pause Value



Michael 2727
27-01-2006, 00:01
Can you make Pause a "byte" value, or anything other than 0 - 65535.

Thank you,
Michael

Fowkc
27-01-2006, 00:20
Well the Pause command will accept byte values, so you don't have to use a word. As for longer delays than 65536 milliseconds, you can use a For...Next loop like this:

For b1 = 1 to 5
Pause 60000
Next b1

Straight off the basic commands PDF. This would create a delay of 5 minutes (5 x 60 seconds).

hippy
27-01-2006, 00:26
If you mean ...

- LET b0 = 100
- PAUSE b0

... Yes, and word variables can also be used.

Michael 2727
27-01-2006, 00:38
At the top of the code is a b3 value

I tried -

b3 = b3 * 330 'to make it do what I needed.

pause b3 ' was hoping to get a pause value,
' pause = to b3 x 330.
pause 40
b3 = b3 / 330 ' to set b3 back to where it was.
But it did not seem to work,?

hippy
27-01-2006, 00:58
"b3 = b3 * 330" will gve a result higher than 255, thus get truncated, and your delay will end up shorter than required. You'll need to use a word variable for temporary storage ...

- w0 = b3 * 330
- PAUSE w0

Replace w0 as appropriate for your code. If b3 is greater than 198 you'll also get overflow problems and will need to deal with that, the easiest way would be ...

- w0 = b3 * 165
- PAUSE w0
- PAUSE w0

Michael 2727
30-01-2006, 08:49
Thanks, I realised the W B error after I had posted it, ~ ;o(
It worked by itself.
But unfortunately not in my program where I
wanted it to go.
I ended up doing it another way.