Page 1 of 1

Calculating Loop Time

Posted: Sun Feb 22, 2015 12:28 pm
by bsammour
Hi,
i was wandering if there is a command or function, to calculate how long does cycle or loop take to finish, when executing MIAC program

thanks for any help or tip

Re: Calculating Loop Time

Posted: Mon Feb 23, 2015 2:40 pm
by LeighM
There is nothing like that built into the API
Maybe you could output a high on A,B,C or D at the start of the loop, then output a low at the end.
Then either measure the time period with an oscilloscope, or repeat the loop a defined number of times to do it visually, depending on what exactly your cycle does.

Re: Calculating Loop Time

Posted: Tue Feb 24, 2015 6:06 am
by bsammour
thanks but what i wanted to do is to calculate the time each cycle in my progam take, and using this time define a counter for event, how much that event occur on each hour, day and month.
now i already did estimate a time, and it worked perfectly. however my main problem is that i also added a menu, now how much the user spent inside the menu is my problem he could spent 3 min, 1 min, a few second, or even forget it for an hour. so the estimation of the time for that phase (decision) will be hard.

well i will try to check the RTC inside the advanced module since most likely i will need to add this module to MIAC system for storage

i wanted to check if flowcode have this function implemented.

thanks a lot