Negative value in timer acc

Join Date
May 2011
Location
South Carolina
Posts
87
Hello everyone. I have a program that I found a math overflow in and the TON instruction had a negative value in the ACC. The only places that bit is being used is in the timer itself and a move instruction which moves the ACC value to another location for display on an HMI. Any ideas how or why I could get a negative value in the ACC? It is in RS Logix 5000 ladder logic, is used for a cycle timer, the preset is 36000000 and not sure what else to tell you.

Thanks,

David
 
Is there a change the HMI is able to enter data?
I did a system where I forgot to make it display only. The operator could modify the ACC and take longer breaks.
 
The HMI does not allow an entry into the field, it is display only and plus the move instruction doesn't move the data to the ACC, it moves it from the ACC to another tag (not an alias).
 
If you can post the acd file I can look at it. you have to ZIP it first, forum rules
 
Is there a reset? I think its possible to rollover and then it will go to a negative value
 
Did you do a cross reference for the timer ACC tag ?
Either your code, an HMI or some PLC in the network is writing to this tag
Also Make sure to scan the timer at least every 69 minutes while it runs. Otherwise, the ACC value won’t be correct.
 
The only way I can get a CompactLogix (L23) to go negative in a TON.acc is to force it via the acc's DINT and then I get a processor fault. You could program a routine to unlatch the done bit (the timer stops when the done bit is enabled) and then unlatch the error bit but this would require deliberate programming. What kind of processor is it and are you looking directly at the acc (not the tag it's being moved into)?
 
A bit of a shot in the dark but if you move the timer's acc into a tag that is an INT when the value of the acc goes above 32767 the value in the INT will go negative.
 
A bit of a shot in the dark but if you move the timer's acc into a tag that is an INT when the value of the acc goes above 32767 the value in the INT will go negative.

That would be my guess as well. Maybe change the red lion from Signed Int to Long/DINT/...
 
Thank you everyone! The person that wrote the program was writing the ACC value to an integer so that was the cause of the negative number. I probably would have never figured that out without your help and guidance. Thanks a million for the assistance.
 

Similar Topics

Afternoon Guru's I have a unique problem I haven't encountered before and need some advice. I've been called out to a remote plant that I've...
Replies
5
Views
1,866
Had a negative value loaded into a timer in controls logix. Can you tell me why. We are using MES and Camstar for data colection. We are using udc...
Replies
21
Views
7,779
Dear All, I’m working with WinCC v6.0. I cannot set a negative tag value. If the value is >0, everything is OK. The value is a PID-control...
Replies
3
Views
2,463
Hi, did anyone know how to read negative temperature value with a SM331 -S7F0-0ab0 TC input card?
Replies
1
Views
1,312
Hi, We want to re range a pressure transmitter to read from -250 kPa to +250 kPa. We have no problems with the instrument and SLC but cannot get...
Replies
8
Views
2,236
Back
Top Bottom