Calculating Loop Time

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
bsammour
Posts: 7
Joined: Mon Feb 16, 2015 8:53 am
Contact:

Calculating Loop Time

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Calculating Loop Time

Post 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.

bsammour
Posts: 7
Joined: Mon Feb 16, 2015 8:53 am
Contact:

Re: Calculating Loop Time

Post 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

Post Reply