Adding TIME variables

Join Date
Jul 2015
Location
Qatar
Posts
2
Hello,

I am using about 16 IEC timers (TON) and want to add the remaining Time (ET) from these when a certain event occurs to a DB containing TIME variables. I read that TIME data type is 32 Bit, so I decided to use ADD_DI block to do this task.. However, I'm getting rubbish values in the data block (sometimes even negative values). Am I doing some thing wrong?o_O

[A few more Details about the task:] The timers are for checking how long each equipment has been active. So, I'm setting the addition of ET to the existing record every time the equipment is stopped. Also, the timers aren't being run for very long- just a few seconds, so I doubt if it is crossing the range...

Thanks in advance for helping!
Vamsi Vegamoor
 
Solved

Problem Solved (Turns out I was just stupid)
I was TEMP variables instead of STAT and so it wasn't adding properly to the existing record in the net cycle..

Thanks Anyway!
 
Glad you've solved it. IEC time is mS as a long int so what you desribed sounded OK.

Temp variable can catch you out. Yesterday I found a Temp in use for detecting a rising edge, the machine has been running for 9 years but I suspect no-one noticed the error before.

Nick
 

Similar Topics

Hi! I need to add 2 different variables together at Siemens. Variables are with type: time/ t#__s On FBD-editor I can't find direct block for...
Replies
5
Views
4,827
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
92
Hi Everyone, Currently we have three plants running with Controllogix PLCs (L72, L73, L74). In each of these plants we have 2 FTView SE...
Replies
0
Views
80
Hello, Im building project with 1756-L82ES controller and 1756-IB16S card but i cant find it when trying to add the card to IO configuration...
Replies
3
Views
151
Hello, I have a pair of redundant 1756-L71 controllers rev 24. These controllers currently have produced and consumed tag interfaces to 3 other...
Replies
2
Views
178
Back
Top Bottom