[quote author=Richard Russell
No. Have you never used a SUB event handler before - not even for a GUI event such as a button click? This is absolutely standard practice (indeed it is preferred over the branch label kind of handler in almost all circumstances). When using SUB handlers control returns to the WAIT statement - that is precisely why I think it might be helpful, because the WAIT gets executed once but never again.
Richard. [/quote]
I thought the wait was the next instruction..
Anyway Is there any way to pop the return off the stack?
Code:
After correctly adding the sleep the speed increased
greatly on LBB run , but has +/- 2ms bounce
while LB run has +/- 0.3ms bounce
The LBB.exe has close to the same as LBB run, with
occasional spikes to 28ms
ManualTx WRITTEN ok ?Delay -NOT WRITTEN TicMS -NOT WRITTEN
LBB Run program with sleep
ManualTx WRITTEN ok ?Delay -NOT WRITTEN TicMS -NOT WRITTEN
Speed INCREASED a lot, but is bumpy +/-2MS
<12:46:05> <100> <1.657sec> <16.5msTIC>
<12:46:06> <100> <1.801sec> <18msTIC>
<12:46:08> <100> <1.773sec> <17.7msTIC>
<12:46:10> <100> <1.736sec> <17.3msTIC>
<12:46:11> <100> <1.685sec> <16.8msTIC>
<12:46:13> <100> <1.816sec> <18.1msTIC>
<12:46:15> <100> <1.762sec> <17.6msTIC>
<12:46:17> <100> <1.709sec> <17msTIC>
<12:46:18> <100> <1.688sec> <16.8msTIC>
<12:46:20> <100> <1.716sec> <17.1msTIC>
<12:46:22> <100> <1.764sec> <17.6msTIC>
<12:46:24> <100> <1.8sec> <17.9msTIC>
<12:46:26> <100> <1.763sec> <17.6msTIC>
<12:46:27> <100> <1.809sec> <18msTIC>
<12:46:29> <100> <1.867sec> <18.6msTIC>
<12:46:31> <100> <1.842sec> <18.4msTIC>
<12:46:33> <100> <1.749sec> <17.4msTIC>
<12:46:35> <100> <1.73sec> <17.2msTIC>
<12:46:36> <100> <1.771sec> <17.7msTIC>
<12:46:38> <100> <1.667sec> <16.6msTIC>
---DONE-1---
***************************************************************
LB Run program with sleep
ManualTx WRITTEN ok ?Delay -WRITTEN ok TicMS -WRITTEN ok
***************************************************************
Speed stable with +/-0.3ms
<12:51:46> <100> <1.562sec> <15.6msTIC>
<12:51:47> <100> <1.562sec> <15.6msTIC>
<12:51:49> <100> <1.568sec> <15.6msTIC>
<12:51:51> <100> <1.58sec> <15.7msTIC>
<12:51:52> <100> <1.558sec> <15.5msTIC>
<12:51:54> <100> <1.559sec> <15.5msTIC>
<12:51:55> <100> <1.567sec> <15.6msTIC>
<12:51:57> <100> <1.567sec> <15.6msTIC>
<12:51:58> <100> <1.555sec> <15.5msTIC>
<12:52:00> <100> <1.562sec> <15.6msTIC>
<12:52:02> <100> <1.569sec> <15.6msTIC>
<12:52:03> <100> <1.565sec> <15.6msTIC>
<12:52:05> <100> <1.571sec> <15.7msTIC>
<12:52:06> <100> <1.562sec> <15.6msTIC>
<12:52:08> <100> <1.56sec> <15.5msTIC>
<12:52:09> <100> <1.564sec> <15.6msTIC>
<12:52:11> <100> <1.563sec> <15.6msTIC>
<12:52:13> <100> <1.564sec> <15.6msTIC>
<12:52:14> <100> <1.579sec> <15.7msTIC>
<12:52:16> <100> <1.566sec> <15.6msTIC>
---DONE-1---