Controllogix ADD or CTU not operating properly

bradal

Member
Join Date
May 2006
Location
edmonton
Posts
156
Hey Guys,

I have an installation that has been running for about 3 years and recently some totalizer issues have started creeping up.

I have a 1756-L55 version 15.5 performing simple totalizing of multiple flowmeters. The flow total comes in the form of a pulse, very slowly every 30 seconds or so depending upon the flow meter. I did have the total routine programmed with the pulse contact, pulse OSR, and ADD function with DINT variables, adding one each pulse. Then after would divide by 10 if the pulse in the flow meter was only 0.1m3/hr. I have tried replacing the ADD function with a CTU and the same result. I can put a 100ms timer in parallel with the flow pulse and watch it count up, going something like the following:
337843,337844,337845,336233,336234,337846,337847,337848 etc.

Could this for any reason be due to the fact the TAG.TOTALSTORE (DINT) and subsequent TAG.TOTAL (REAL) is part of a User Defined Data Type?

Any other thoughts, perhaps on DINT data type ADD limitations, CTU?????
 
A float cannot be incremented by 1 after it reaches 16,777,215 due to IEEE-754 float resolution issues. At that point you loose resolution in the ones digit and adding just one won't work. As the float gets even larger you loose resolution in the ten's digit, then the hundred's digit, etc. This can present a challenge in totalizing.

Even when using a DINT you can run into resolution problems if a floating point number is involved in a calculation because the DINT has to be converted to a float by the processor before the calculation can be performed.

You haven't given us enough info about how you are using the DINTs and REALs to say for sure if this is whats happening, but its one possibility. If you can post the program or part of the program that would help us help you.
 
Last edited:
Let's set aside the hypothesis that ADD and CTU are not working correctly and look for a change in the program, in the HMI or network, or in the electrical devices connected to the controller.

I agree that I would have to see your program code to venture an opinion.

From your description of the sequence of values, it appears as though the TAG.TOTALSTORE tag is decreasing by 1612, then increasing by 1612 a little later.

1612 is a funny number; if it was 1024 or 2048 or 4096 then I'd assume a binary sub-element was being changed via some other mechanism (HMI, message, other logic, etc). But 1612, that's a little weird. That's 064C hex. It's 0000 0110 0100 1100 binary.

The test that I would do is to replace the UDT sub-element Tag.Totalstore with a new tag, called PLCTalk_Tag_Totalstore. If this tag's value has the same behavior, then you have a logic issue that goes right to the ADD or CTU logic. If it doesn't, then the problem is probably related to operations on the UDT or on the HMI.
 
Just as a quick response to the replies.

A float cannot be incremented by 1 after it reaches 16,777,215 due to IEEE-754 float resolution issues.

"I did have the total routine programmed with the pulse contact, pulse OSR, and ADD function with DINT variables, adding one each pulse."

You don't actually say what the issues are. Did your system stop totalizing? Is it totalizing incorrectly?

"I can put a 100ms timer in parallel with the flow pulse and watch it count up, going something like the following:
337843,337844,337845,336233,336234,337846,337847,3 37848 etc."

Sorry if the issue was not clear, I thought I explained it quite well, I will get a screenshot of the program, but really guys, discrete contact to CTU function....that is all and it still does not totalize. Ken thank you for some other stuff to try, I will try a tag outside of the the UDDT.
 
Does the video show the 'pulse' turning on and off. And I wonder where the 'System_100_ms_timer' comes from?


Yes it does. You can watch the counter increment and see the timer pulse sometimes ( of course the video capture is not fast enough the see all the timers pulses) Probably can't see all the pulses in RSLogix either.
 
That's correct guys, it is too fast to see in logix. The 100ms timer is just to test the counter and will be removed when I figure out what is wrong. That screen capture is a great example of what is happening. The fourth digit is switching between 6 and 2 as it is in the screen capture. If you watch the video again you will see this around the 600 mark.
 
Watching the counter increment to right around 340700 the accum value goes back down to about 340200. Very consistent.

I would look for something else writing to the accum value.
 
Mickey the example shown in the video is with a new tag created from scratch, not using User-defined and not referenced anywhere else, PLC or HMI.
 
Very change behavior. I am not a controllogix user so not much help there.
I am just reporting what I see for those that can't view the video.
 

Similar Topics

I am trying to add 9 DINT values with the CPT instruction in ControlLogix and I keep getting errors. I am just choosing each tag with an add...
Replies
13
Views
2,306
Good Morning , I am getting ready to install a Banner IVU Plus BCR in a ControlLogix . It seems like it is easier to install the IVU Plus...
Replies
0
Views
1,409
I am new to AOIs, and do not have a processor handy to test my program. I have a couple of simple questions, which I have not been able to find an...
Replies
10
Views
10,136
I have been using RS5000 for sometime now, since ver 11. Ver 16, now has the neat "add on" function. I have just started playing with this, and...
Replies
3
Views
6,201
Why does the controllogix redundancy modules use a single mode fiber vs multimode fiber?
Replies
1
Views
58
Back
Top Bottom