Incrementing Words

hgtwn

Member
Join Date
Mar 2005
Posts
4
i'm using RSlogix 500 and have a bunch of floats that i'm trying to store data in. For example, every incrementing 100 pounds of pressure i am measuring the weight on some material caused by that amount of pressure. after taking and storing the first data value in my first float, i want to go to 200 psi and measure and store that value in float 2. Is there a way in ladder logic to do this looping method while changing the storage float (F8:1, F8:2, F8:3...)
 
hgtwn,

I suggest that you use the method called "Indirect Addressing". This is pretty simple to use, and you can get all the information you need from the RSLogix Help files. Click "Help", "SLC Instruction Help", then from the command list, click on any command that can implement indirect addressing, for example the "MOV" command. You will see directions on how to use that command with indirect addressing.

Basically, indirect addressing tells the command: do not get your number from this location, but instead go to this memory location and use the number found there as a pointer and then go to the memory loaction indicated by the pointer. You can see then that it is just a matter to increment the pointer each iteration through your loop.

Another method that could be used, but is less flexible, is to use the FFL and FFU commands. These work best if the number of data points is fixed, always the same number of 100 pound increments to read in, which in your case it might be. FFL, when triggered, loads data from a memory location into a series of words. FFU is used to "Unload" the data, with the order being "first in, first out".
 
Last edited:
i've been looking all over the help for examples and i just don't really understand this, especially the use of # before my address. Is there a possibility that i could get an example here? say, i have an input I:2.1 and which reads my weight. the pressure is changing so the weight is changing also, so every 20 seconds i want to take the value in I:2.1 and put it into a floating word. The first reading goes in F8:1 all the way to the last reading which goes in F8:45.
 
hgtwn said:
i've been looking all over the help for examples and i just don't really understand this, especially the use of # before my address. .
The # sign is used with indexed addressing, I agree with Lancie 1, indirect addressing would be best for your application, and I find it is easier for the less experienced to follow.

If I read it right, you're looking for 900 seconds of history at 20 second intervals, is this correct?
 
yeah thats right, 900 seconds of history time. is it even possible to use floats in SQO? How would i go about using indirect addressing? can i use floats with that?
 
thanks! i'm heading home. i'll take a look at it there and hopefully i'll be on my way! thanks again
 
Ken,
That was a very well-written example. Even I could see how it works. Good job!
 

Similar Topics

So, I get sent a heartbeat, an int that goes from 0-9 every second and then restarts, I need to detect if it stops after 3 secs. Any simple way...
Replies
11
Views
3,070
I'm sure this is an easy one for the experienced guys, how can I use an incrementing dint value to trigger a counter to count? It seems like it...
Replies
4
Views
3,157
Hello World, I am having difficulty incrementing a serial number that needs to start at 0, and go through Z. (After 9, comes A). The serial...
Replies
11
Views
1,844
Hi guys, Im about to add a new flowmeter which pulse every 0.1 cubic meter to my Micrologix 1400. I would like to increment of 0.1 everytime i...
Replies
13
Views
1,986
Good Morning, I have a sort of easy problem that is driving me nuts. I have an application where I'd like to take a set point, lets say it...
Replies
4
Views
2,257
Back
Top Bottom