- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a simple program that uses two timers. One of them works intermittently and the other not at all.
The first, Tilt_Dn_Timer, will work anywhere from 1 to five times in a row, and may not work the same number of times during the same single program run. I don't understand how this can be, unless, HYPOTHETICALLY, the timer module itself is flaky. I don't know what I could be doing wrong. I think it should either work or not work.
The second timer, the Tl_Saf_Timer, never seems to count down. I don't know why one timer sort of works and the other does not work at all. I believe I configured and control them the same.
Any advice is gratefully appreciated. Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You shouldn't read the timer value, this will not be zero when the timer has expired because of the reload. Instead use ReadStatus() API and check for timer running.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do the timers do when you don't have any code do they work correctly? Also I always turn on all components by having a start command. It is just good practice to do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The start() API does a bit more for some components: It energizes them, so that they use power and work as suggested.
IMHO using Component_Start() API is a must-do.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You shouldn't read the timer value, this will not be zero when the timer has expired because of the reload. Instead use ReadStatus() API and check for timer running.
Bob