
adccommunitymod (AutomationDirect) asked a question.
directsoft 5 timer
Created Date: August 29,2008
Created By: david222
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I am using direct soft 5. I am a novice at programming but trying to learn. I have a timer (tmra) in my program. I am trying to use it for a 15 minute timer so I have programed 15000. I watch the timer count and when it gets to 10000 it just resets everytime and starts coounting again. I believe i am under the maximum time. I tried changing the 15000 to 400 and everything works ok. Any ideas? Thanks DT
Created Date: August 29,2008
Created by: KPrice
david222, If you 're only timing to 15 min, you also could use the standard timer (TMR) instruction. Anyway, back to your question. The TMRA is a double V-memory timer, times to 99999999 tenths-of-a-second. So for 15 min, the preset would be 9000 tenths-of-a-second. Also to view the timing (past 9999 tenths-of-a-second), you have to view a double word, 8-digit BCD. A preset of 15000 would time to 15000 tenth-of-a-second, or 25 minutes. And to view the timing to 15000, you would need to view a double word, or two V-memory locations. Does this help?
Created Date: August 29,2008
Created by: david222
I understand some of what you said, some way over my head. But I guess the conclusion is I calculated wrong. Number to big? I also have a 100hr maintenance timer in my program and I have now changed the time to 36000.
How can I tell if these numbers are not to high for the timer. I am using the tmra because I need a reset circuit.
Thanks for your help
Created Date: August 29,2008
Created by: bcarlton
TMR and TMRA have a time base of 1/10th second. Therefor to time to one minute the preset is 600.
TMR expects its preset to be 9999 or less. If supplied by a 'V ' register it is only one register. The format is BCD.
The accumulator (total timed amount) of a TMR exists in one 'V ' register. Timer X has its accumulator in 'V ' X (eg TMR5 has its accumulator in V5)
TMRA expects its preset to be 99999999 or less. If supplied from 'V ' registers it must be a number supplied in two consecutive V registers. For example, if you are using V2000 as the preset for a TMRA then the actual preset constist of the COMBINED VALUE of V2000 (which holds the least significant 4 digits) and V2001 (which holds the most significant 4 digits). If you are using V registers for the preset your 9000 for 15 minutes only needs to exist in the least significant register - but be sure that the next register contains zero. Mark the comments to show that the second register belongs with the first. Your 100hr timer must have a preset of 3600000. Therefor if stored in V registers zero would be in the lower numbered register and 360 would be in the next higher register.
Like the preset, the accumulator of your TMRA will reside in 2 adjacent V registers. So you think to yourself - wouldn't that overwrite the accumulator area of the next timer? YES, YOU ARE RIGHT. Any TMRA uses up the next available TMR number also. Mark that carefully. This has been the root of many mysterious problems.
Hope this helps.
Created Date: August 29,2008
Created by: KPrice
Sorry if I was not clear. Yes, you calculated wrong in that the preset value of "15000 " equals 15000 tenths-of-a-secong, which equals 25 minutes, not 15 minutes. No, you 're preset value of "15000 " was not too big, only that you were probably viewing only the first 4 digits (single-word), and it only appeared that it was resetting, but really the fifth digit continued to count, but you could not see it. In the data view, you can select wether you are viewing a single word (4 BCD digits), or a double word (8 BCD digits). The default is single word. (The timer presets use the BCD format.)
"How can I tell if these numbers are not to high for the timer? "
The TMRA can time up to 99999999 tenths-of-a-second, or 9999999.9 seconds, or 2777 hours. (Did I calculate that right?)
(The TMR timer resets when the TMR rung goes false.)
Hope this helps.
Created Date: February 26,2018
Created by: Mike Conwell
On this same topic, I have a program that is not working. We have a timer in the program that is set by a CMore interface. We actually have 3 different timed cycles and they all work except when we set a time of over 15 minutes. Then the timer gets screwed up and starts timing out right away instead of continuing. In other words. If I have a time of 45 minutes set in this timer, it works fine up to the 15 minute mark and then it times out very quickly after that, It will not go the full 45 min. I think it is related to these posts, can someone advise me???
Created Date: February 26,2018
Created by: franji1
On this same topic, I have a program that is not working. We have a timer in the program that is set by a CMore interface. We actually have 3 different timed cycles and they all work except when we set a time of over 15 minutes. Then the timer gets screwed up and starts timing out right away instead of continuing. In other words. If I have a time of 45 minutes set in this timer, it works fine up to the 15 minute mark and then it times out very quickly after that, It will not go the full 45 min. I think it is related to these posts, can someone advise me???
I am assuming you are using DirectSOFT.
Are you using TMRA that uses 2 Timer resources? How large is your preset value - it needs to be a DWORD and occupy 2 V locations (make sure nothing is accessing the second T or the second V location). Also, if your HMI is providing the actual time in "tenths of a second ", make sure it is writing to the PLC correctly. Use DirectSOFT to look at the preset value as a DOUBLE BCD in Data View. It should read 27000 (45 minutes * 60 seconds/minute * 10 tenths/second).
Created Date: August 29,2008
Created by: david222
I am using direct soft 5. I am a novice at programming but trying to learn.
I have a timer (tmra) in my program. I am trying to use it for a 15 minute timer so I have programed 15000. I watch the timer count and when it gets to 10000 it just resets everytime and starts coounting again. I believe i am under the maximum time. I tried changing the 15000 to 400 and everything works ok. Any ideas?
Thanks
DT