Above is a display for a timer program that I made using ROBO pro. The display is only showing the minutes and seconds because the program ends once it hits an hour. To the right is what the main program looks like. Time is the subprogram I made for the program. Below is what the subprogram time looks like:
To explain it briefly, what Time does is that it updates a seconds timer after a set amount of time, repeatedly, and once it hits 60, it adds 1 to the Minutes variable, and resets the Seconds variable. It does the same thing for Minutes and Hours, and once it gets to 1 our the subprogram ends, consequently ending the main program. In this case I made it so that each second was really 0.1 of a second so that the whole thing would go faster.
Conclusion: Subprograms are incredibly useful for organization, as shown by my really simple main program. Telling the main program to run a subprogram on another page is a good way of keeping track of what your program is doing, and makes it easier to follow when you have an elaborate program broken down into easier to see subprograms.
Great job going "above and beyond" on this one. I was impressed by this program.
ReplyDeleteMake sure you get caught up on 3.1.1, 3.1.2 and 3.1.4 before wednesday's grades are turned in.