RSlogix question

briana banks

Member
Join Date
Jul 2005
Posts
242
Hi All

I'm using RSlogix 5000 and i'm a newbie to it.
it was easy to do that when i was programming C.....

Basically I need to implement a stack and a queue using the same cyclic array.
and also create functions add item, remove item for the queue and the stack

(head,tail etc).
and a function "remove item" using the index (or a "find" function) to remove an item if it fails.

How can i do that?


Thanks
 
You're suffering from culture shock, Briana. What's the purpose of this project, by the way? School, fun, nuclear power?

RSLogix5000 doesn't support stack functions as you know them. But, there are functions that work similarly. You can do like the rest of us and improvise. I don't know the entire Logix5000 instruction set by heart, I only use the "basic" instructions that have always gotten my through life: AND, OR, XIC, XIO, OTL, ADD, SUB, SOL (he he), MUL, DIV... There are instructions to create FIFO tables and such, though. At least, there were in RSLogix500, and RSLogix5000 has pretty much the same instruction set with lots more added. The FIFO instructions should give you about 90% of what you're looking for, and I anticipate about 30 rungs of ladder or ST to get the rest working. If there really is no FIFO instruction, you could "fake" that too if you wanted.

Good luck!
AK
 
Greetings Briana,

I've "printed" the .RSS file that I mentioned on that "other" forum as a .PDF and attached it below ... you should be able to open it with Adobe Reader ... I'm not sure that the structure that you're looking for is being used in this program - but it won't hurt to take a quick look at it ...
 
does anyone have a code snippet ?

Hi & thanks for replying

I need a code snippet on mangging FIFO and LIFO on the same
array.using RSlogix 5000
for example,i have 6 pumps each one get into action
when pressure decreases under certain setpoints.
in addition they have work in a cyclic turn queue
so each one of them will work the same amount of time.

Thanks.
 
I have a standard CLX routine that does exactly what you are asking for, but currently I have limited it to four devices and I will need to create a new project to cull the thing out so it is clear how it works. Give me an hour or two to clean it up and I will post as a zip file.
 
Ok.

Thank you.

why dont you use FIFO,LIFO instructions ?
using those will save writing many inplementing the queue.
are u using the rslogix 500 ?
I only know the 5000 version.:-(
later i'l show you the results...
 
Last edited:
I used to use the FIFO/LIFO instructions all the time, but I've found myself doing it this way. I find I can get the exact details of what I want to acheive more easily without having to comply to the exact behaviour of the FIFO/LIFO's, even if it does take a few more rungs of code. Once cut and proved, I;ve just used it over and again.

The example I've posted is probably not optimised, I can think of several ways to tighten it up...but to no real gain. It works and works reliably.

The main reason why I didn't use a FIFO was that I needed to handle simultaneous fault transitions, and more importantly, I wanted to handle new faulted devices by removing them from wherever they were located in the queue, and shuffle up all the devices lower in the queue by one to take it's place.

Newly restored devices always go in at the highest empty slot in the queue.

ie Adding devices to the stack could easily by done with a FIFO, but the removal of them from the stack is not.

I've adapted the same thing to SLC500 (RSLogix 500) and it works just the same.
 
Last edited:
PhilipW said:
but I've found myself doing it this way. I find I can get the exact details of what I want to acheive more easily without having to comply to the exact behaviour of the FIFO/LIFO's, even if it does take a few more rungs of code.
Is this a polite way of saying that the built-in function is too feature bloated to be useful, except for the most extreme application? Because, that's why I don't use a lot of the functions available in Logix5000.

The PIDE instruction has about 100 different operating modes: ProgMan, ProgOper, ProgAuto, ProgHand, OperHand, Hand, Random... What the H-E-doublehockeysticks??? I just want it to throttle my VFD! I've figured out how to make it do what I want, but I'm really afraid I missed something and one of these things is going to take on a life of its own.

AK
 
Is this a polite way of saying that the built-in function is too feature bloated to be useful,
That is not what I had in mind at all. The CLX FIFO/LIFO instructions work perfectly well when you have a proper FIFO/LIFO application...but this piece of code is not. So I didn't use them, although I could have manipulated them into doing it. Maybe someday I will; maybe someone else will post some better code that does.

As for your grizzle about the PIDE:

1. If you were a process control engineer using the CLX in a full blown process control application, ie petrochem, bulk water treatment, you would expect and demand that the PIDE instruction has all of those features.

2. Why didn't you just use the much less complex PID to throttle your VFD? Your complaint amounts to saying that "this space shuttle is a little over the top to go shopping at the mall".
 
Last edited:
akreel said:
Is this a polite way of saying that the built-in function is too feature bloated to be useful, except for the most extreme application? Because, that's why I don't use a lot of the functions available in Logix5000.
If you load and unload your queue with FIFO instructions, it is not a simple matter to remove an item from the middle of the queue and then advance trailing items to fill the gap.

akreel said:
The PIDE instruction has about 100 different operating modes: ProgMan, ProgOper, ProgAuto, ProgHand, OperHand, Hand, Random... What the H-E-doublehockeysticks??? I just want it to throttle my VFD! I've figured out how to make it do what I want, but I'm really afraid I missed something and one of these things is going to take on a life of its own.
Check out the PI function block in the Drives group of instructions - it is probably more appropriate to your needs.
 
PhilipW said:
2. Why didn't you just use the much less complex PID to throttle your VFD? Your complaint amounts to saying that "this space shuttle is a little over the top to go shopping at the mall".
I would have liked to.
The answer: autotune.

And, the PIDE is not the only over-blown function that I have a problem with. It's just the only one I've been forced to use.

K.I.S.S.

AK
 
Greetings gaurav ...

and welcome to the forum ... this is an old thread - but I think the printout attached below is what you're asking for ...

it was written with RSLogix5000 version 13 ... you will need a copy of that version in order to open the original file ...
 

Similar Topics

Oh, I hope someone can help! I have one little problem holding me up from studying this weekend. I'm using Rslogix micro starter light, it's a...
Replies
7
Views
2,991
So I have a PID loop on an 1756-L61 running V17 software just for background. Also the PID PV is a pressure transmitter and the CV is speed sent...
Replies
1
Views
894
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,765
Hey all, I just joined today. Not sure if this question is in the right place or if anyone has asked it before. I am monitoring a machine from...
Replies
2
Views
1,445
Note, I have NO experience with RSLogix products. Never done anything beyond installing the software for others. Please forgive me for my...
Replies
9
Views
4,632
Back
Top Bottom