Hi El genn,
The idea behind the loop is to periodically check to see if the time elapsed is 60 seconds. This is achieved through the timestamps. An initial time stamp is loaded into the shift register, and then the loop runs a number of times, taking another time stamp and comparing the two each time. If the time between the two stamps is 60 seconds (thus the "60" constant, since time stamps have units of seconds) the code for your SMS is run and the current time stamp becomes the comparison stamp (since this stamp is now looked at as the beginning of another 60 second wait) by shifting it into the shift register and replacing the initial stamp. The process is then repeated until the loop is stopped. When the time between the two stamps is not 60 seconds (which happens around 6 times in a row,) the initial time stamp outside the loop (or the time stamp from the last run of the SMS code,) is retained in the shift register for the next loop comparison. The 10 second time delay ensures that the processor is freed up to run other threads.
I hope this clarifies what is happening in the above code. There are a number of ways to achieve what you want, so you are welcome to explore other solutions.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!