×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

RSLogix 5000 FIFO

RSLogix 5000 FIFO

RSLogix 5000 FIFO

(OP)
I have to get four pumps which are dedicated to one tank each to start first on first off. Even though the demand may fluctuate. I am having some major writers block figuring this out..... Every other system I have done uses first on last off.
If anyone can give me an example or even write in text an example, I would greatly appreciate it.

RE: RSLogix 5000 FIFO

In the spirit of OOP (particularly the "code reuseability" part), I'm going to recycle some puesdo-code I wrote earlier tonight for your problem.


For our example let's create five tags (DINTS would be fine). call them Reg1, Reg2, Reg3, Reg4, and Reg5.

Do this for each of your four pumps:

If pump 1 is energized and Reg5 = 0, then load a "1" (using a oneshot) into Reg 5. '(However, you will have to wait to energize pump 1 until Reg5 is = 0 otherwise you will lose track of which pump came on first).

If pump 2 is energized and Reg5 = 0, then load a "2" (using a oneshot) into Reg 5. '(However, you will have to wait to energize pump 2 until Reg5 is = 0 otherwise you will lose track of which pump came on first).

If pump 3 is energized and Reg5 = 0, then load a "3" (using a oneshot) into Reg 5. '(However, you will have to wait to energize pump 3 until Reg5 is = 0 otherwise you will lose track of which pump came on first).

If pump 4 is energized and Reg5 = 0, then load a "4" (using a oneshot) into Reg 5. '(However, you will have to wait to energize pump 4 until Reg5 is = 0 otherwise you will lose track of which pump came on first).

'BTW, the "wait" period for any motor (if necessary) will always be no more than one scan.

'The only reason why Reg5 would not be set to 0 would be if two pumps tried to come on during the same scan.


'This next bit of code will have to be done for each register from Reg5 to Reg 1.

If Reg5 <> 0 and Reg4 = 0, then copy Reg5 into Reg4, and 0 out Reg5.

If Reg4 <> 0 and Reg3 = 0 then copy Reg4 into Reg3, and zero out Reg4.

If Reg3 <> 0 and Reg2 = 0 .... And so on until you get to Reg1.

'Notice that by doing your "bubble up" from the highest register to the lowest, your program will move your newest entry up the entire stack in one scan.


'Now, when it comes time to shut off a motor, look at the value in Reg1 (which should be either a 1, 2, 3, or 4), and shut that motor off. You can then turn that motor back on and it will take it's position at the bottom of the stack.

'Note that you really don't need five registers, four would do the trick, but I would provide for five because it should prevent any gremlins from popping up.

I would of coded this for you in RSLogix, but I don't have RSLogix on this PC. Sorry.

 

RE: RSLogix 5000 FIFO

(OP)
Thank you John. I will give this a shot. I am a little confused right now but I'm sure once I transcribe this into the ladder logic it will make more sense. I appreciate it.

T.J.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources