Page 3 of 3

Re: Not ROM but speed

Posted: Tue Jan 06, 2015 11:19 am
by stevepoole
Hi EmmBee,
Add the following lines to my code :
112 FOR i = 1 to 50
117 END FOR i
Now you get accurate timing....
Steve.

Re: Not ROM but speed

Posted: Tue Jan 06, 2015 2:32 pm
by 1024MAK
While we are talking about times to 1/50th of a second, you may find this thread interesting if you are targeting a BBQL.

Mark

Re: Not ROM but speed

Posted: Tue Jan 06, 2015 6:14 pm
by Mr_Navigator
EmmBee wrote: That's a very interesting bug you have in your seconds counting program. Both a% and b% get to be a number of seconds. At the end of the FOR loop, a% will be increased by 78, and so even if a% starts off at zero, it will get a minimum value of at least 78. On the other hand, in the TimeLoop, b% will count up to a maximum of only 59 and can never go higher. We reach a stage where b% can never be higher than a%, and as a result, the TimeLoop is never EXITed. The asterisks will stop being printed out, and nothing can be done about it.

When I first noticed this, my instinctive reaction was to jump to the conclusion that this was somehow down to QPC2. I believe having read somewhere that QPC2 only updates the DATE clock once ever minute - that's what I thought. This is not the case, however; the bug is caused by a logic error in your code. I will leave you with the arduous task of fathoming out what has to be done.

Michael
Yep sure is however I have found via other people a link back to my original issue which related to this question in the first place and have continued it there, suffice to say the link is here http://theqlforum.com/viewtopic.php?f=3& ... 9459#p9459

Many thanks for your comments and suggestions guys I am getting near to resolving a number of programming issues.