Rs logix5000 addressing issue

anstee33

Member
Join Date
Oct 2010
Location
wales
Posts
10
Hello Everyone

I am new to RSLogix 5000 and am doing a conversion from RSLogix 500 to 5000. i am unsure how to adrress a calculation that is part of the software.

I take a Analog value and store it every x minutes later on an average is taken from this array of samples. I do not know how to achieve this in RS Logix 5000 can anyone give me an example of how to achieve this please. Thank you.

In the attachment is the sample from RS Logix 500

sample.jpg
 
Okay, so when your sample timer gets done, you copy 48 reals:
F202:0 through F202:47 get copied to F202:50 through F202:97

Then you are copying 47 of them back from F202:50 to F202:01.

Then you put the newest sample in F202:0.

The purpose of this is to move the newest sample into the first spot in the file and shift all the other samples up. The addresses from F202:50 through F202:97 are just temporary storage. if you were to try to just copy 48 reals from F202:0 to F202:1, you would get the same effect as filling the file with the value in F202:0.

You could eliminate the extra step and storage of those extra reals (floats) by putting your newest sample at the end of the file and copying downward.

Basically, this is a FIFO (first in first out file) but without using the FFL/FFU instructions.

Unless you must have the newest data at the first spot for some external reason (HMI, SCADA showing these numbers and you can't/don't want to change it) I would write it like this and save all that extra space:

COP_FIFO.png
 
Now to do that in RSLogix5000, you can do basically the same thing, except you will use an array of Reals.

In RSLogix5000, you can use the AVE (average) command to average the samples. This portion of your code isn't shown above, so we might need another screenshot of that part to help you code it.
 
Last edited:
see if this helps get you started with the addressing ... this isn't necessarily the "best" way - but it closely mirrors the addressing format that you're most familiar with ...

TIP: once you get it working, it's easy to change the names of the tags to something more meaningful ... right-click the tag and "change its properties" ...

RIPPLE_ARRAY.JPG
 
Last edited:
EDIT: Ron already answered while I was making a picture which is very similar except that you can do it right from the ladder window by right clicking on the tagname after you have entered it.

Once all the logic on the rung is valid and the tags are created, the power rail on the left will change, and the little "e"s will go away.

COP_FIFO2.jpg
 
Last edited:
you're welcome ... but now that you've got the addressing down, you still want to take a look at the excellent suggestions by my distinguished colleague OkiePC ...

good luck with your project ...
 
that was neck-and-neck, Okie ... score this one as a tie? ...

which brings up (coincidentally I assure you) the subject of neckties ...

Goody - and now you - seem to be taking on a more formal flair ... maybe I need to dress up a little bit too ...

(man, things sure seem slow around here lately ... must be the economy thing) ...

ties.JPG
 
Last edited:
:)

I changed my avatar on the weekend of the red river rivalry (being a lifetime sooner fan), and after the weekend, I went to change it back, but couldn't find the old one so I found the only decent picture I had. It was taken at my oldest son's freshmen commencement at OSU, the last time I wore a tie.

Things do seem a little slow on the forum, but it's always been fits and spurts...
 
that was neck-and-neck, Okie ... score this one as a tie? ...

which brings up (coincidentally I assure you) the subject of neckties ...

Goody - and now you - seem to be taking on a more formal flair ... maybe I need to dress up a little bit too ...

(man, things sure seem slow around here lately ... must be the economy thing) ...

Ron: You really should get out more ! :p
 

Similar Topics

Hi all I need to read the values of many variables from a stl cycle. For example, suppose I have 3 variables: tag1,tag2,tag3. Is it possible to...
Replies
1
Views
1,310
I am a new user on this forum (but fairly experienced in RSlogix navigation and editing) and have tried to search this topic so if it is here...
Replies
9
Views
8,202
I know you can do indirect addressing using 5000, but is it possible to do partial indirect addressing? Meaning... I pass any number, say, 1000...
Replies
11
Views
4,067
Does anybody know of a manual or website that breaks down Indirect addressing. I have seen it used and find it hard to follow without any...
Replies
14
Views
20,109
Good day all. I think I've got it but please put me right if not. (More than likely). If I set up an integer (call it "array") with a non-zero...
Replies
15
Views
6,495
Back
Top Bottom