Add Multiple Values with ControlLogix Compute

MNJ96

Lifetime Supporting Member
Join Date
May 2005
Location
Salem, Oregon
Posts
50
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 symbol in between each one and sending the result to another DINT tag.

Any idea what I am doing wrong?
 
The syntax is correct. PLVIce wrote - what is the actual error.
I could think of three possible one:
1. You spelled a tag wrong, so it does not exist
2. You forgot to create your destination as a tag (done this myself)
3. It is possible if you tag names are too long that nine tags may exceed a text limit for the CPT function.

It could be wrong on all three counts but here is my guess with what was given.
Let us know what the issue was when you figure it out.
 
I always put spaces in between tags and operators. They are not required, but I find they help visually.

Tag1 + Tag2 + Tag3...etc.

I've done what you are trying to do many times. The errors will tell us where it is going wrong. Otherwise we are just guessing.

OG
 
This probably isn't your particular problem, but it may help someone else in the future: I got syntax errors when cutting and pasting formulas from LibreOffice writer into the CPT formula field. The tags were fine, but the software was replacing the minus operator with a different dash character.

If you are cutting and pasting (and why not), you might check that the plus operator and any space characters are recognized by Logix.
 
The syntax is correct. PLVIce wrote - what is the actual error.
I could think of three possible one:
1. You spelled a tag wrong, so it does not exist
2. You forgot to create your destination as a tag (done this myself)
3. It is possible if you tag names are too long that nine tags may exceed a text limit for the CPT function.


My first thought OG beat me to - add spaces. I have had times where adding spaces got rid of an error, when it supposedly doesn't matter.


My second thought is Keystone forgot about #4:
4. One of the tags is actually BOOL, not a DINT.
 
My best answer is to just try a few, see if that works, then add the others one at a time till it fails, then you either have a variable that does not exist or a typo or the total length is above the allowed, simple solutions depending on the actual error, if too many chars in tags then either reduce the length of them or do two computes i.e. first with an interim tag as the result & the rest + the interim tag to your required tag.
 

Similar Topics

Good Morning Friends, I am using RS Logix 5000 Version 20.01 with controllogix L72 controller. I have created on ADD ON Instruction for...
Replies
6
Views
2,497
I'm faced with a real time-consuming issue. I have 100+ devices that uses 5 or so different AOI blocks. In our AOI blocks, we have parameters NAME...
Replies
1
Views
4,376
Hi, I have questions. I have Analog Input that need to put into Ignition Designer. But I don't know how to put?
Replies
1
Views
119
I have just installed Studio 5000 V30.11 on my Windows 11 Pro machine. First I had an "Invalid Pointer" error that required me to update Factory...
Replies
2
Views
119
Im trying to create a level indicator for water Tank i have used the ADD function while the pump is on and level increasing everything works...
Replies
33
Views
1,027
Back
Top Bottom