Sign in to follow this  
Followers 0
Shamus

Timers

7 posts in this topic

Hello All I am using the TON function in IEC developer 7.31 in the following manner: - Instance - 'Header' Variable Timer1 IN - various run conditions in Ladder Q - TimerDone1 (bool variable) PT - T#10S ET - TimeElapsed1 (e.g D700) Timer2 follows on TimerDone2 T#10s TimeElapsed2 (D701) and so on The problem I'm having is that when timer1 runs its fine but then timer2 runs which is fine but D700 from timer1 starts going erratic showing 2d34h3m or similar but changing all the while that Timer2 is running. This stops after Timer2 has finished but then Timer2 ET does the same thing while timer3 is running. This carrys on through the timers. Please note that when Timer2 is running Timer1 IN input is false so Timer1 does not run and so on. I'm now assuming that using 1 Data variable like D700 is not big enough to hold the value of a timer. Can someone point me to the relevant manual showing details on this or could someone just tell me how many D's i need to leave in between. regards Shamus

Share this post


Link to post
Share on other sites
Wow... we're only at IEC 7.01 in the US. And unfortunately I have not had time to learn it... too busy working with GX Developer.

Share this post


Link to post
Share on other sites
Been on here so much I keep get my EDesigner & IEC Developer versions mixed up!

Share this post


Link to post
Share on other sites
Can't you just increase the D slot with 1 word until the overlapping stops ? I am guessing it needs a double word.

Share this post


Link to post
Share on other sites
>>but D700 from timer1 starts going erratic showing 2d34h3m or similar<< I've never seen a data register showing values like that. At first I thought it was Hex, but there are no h or m values in Hex, so presumably it means something 2 days 34 hours 3 minutes, which again seems meaningless. I've never used the TON instruction, which the help files say is a timer with an IN delay, but it also says that: If IN =1 the timer runs If IN = 0 the timer stops If current value = preset value then the timer output is on. That sounds identical to a normal timer, apart from the fact that the timer will reset in a normal timer when the input conditions are untrue. Tend to use the standard Mitsubishi TIMER_M functions all the time. TC* is the timer coil, TS* is the timer digital output and TN* is the elapsed value of the timer, which I normally move to a data register (D*) if I want to display it on the MAC screen ,as the older E-Designer doesn't really understand the TN* side of things.

Share this post


Link to post
Share on other sites
Hi, could it be that you have for all TON function blocks the same instance? That might be a reason too. greeting Roger

Share this post


Link to post
Share on other sites
Hello! The datatype TIME is using 32-bits = 1 doubleword. So if you dedicate D700(16 bits) then D701(16 bits) also will be dedicated. You have to start on D702 at Timer_2. Or else the values will overwritten...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0