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,808
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
102
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
140
I'm adding an IAI Gateway with 2 axes connected to it. To an ethernet network on my PLC. So, I think the math is correct on the Input and Output...
Replies
0
Views
126
Hi Folks. I am gearing up to add a 2nd identical HMI to a project. This 2nd HMI will basically be an exact clone of the 1st one. The equipment...
Replies
3
Views
249
Back
Top Bottom