btaaa
Member
RSLogix5000
I have an application where I would like to be able to ADD the values of multiple arrays, or even "all" the arrays, in a given data type, using the simplest/shortest command.
SampleDATA DINT[100]
I know that I can do this with the CPT instruction. However, to do so seems to require the lengthy expression, (SampleDATA[0]+SampleDATA[1]+SampleDATA[2], Etc. . .)
I then tried to use the FAL instruction, and it seems to require the same lengthy expression.
Is there not a simpler method of telling an instruction to go ahead and add the values of "all" arrays in a given data type?
FYI, I'm not worried about math overflow. There will only be a value in one or two arrays at any given time. Long story. Thanks.
I have an application where I would like to be able to ADD the values of multiple arrays, or even "all" the arrays, in a given data type, using the simplest/shortest command.
SampleDATA DINT[100]
I know that I can do this with the CPT instruction. However, to do so seems to require the lengthy expression, (SampleDATA[0]+SampleDATA[1]+SampleDATA[2], Etc. . .)
I then tried to use the FAL instruction, and it seems to require the same lengthy expression.
Is there not a simpler method of telling an instruction to go ahead and add the values of "all" arrays in a given data type?
FYI, I'm not worried about math overflow. There will only be a value in one or two arrays at any given time. Long story. Thanks.