Programming a sequence of events with RSLogix 5000

JMoga

Member
Join Date
Apr 2013
Location
Auburn, CA
Posts
4


I am taking my first attempt at modifying a program on our little bottling machine.
We need to automate a sequence to purge the tank on the filler. Basically what I need to do is push a button on the HMI and have the filler tank fill and drain while under Co2 pressure of 1bar.
I am sure there is a few ways to do this, any ideas on how to program this?

Here's the pieces involved:
RSLogix 5000
PanelView HMI
Control Logix PLC
Product inlet valve – PID
Product Pump – 0-10V speed reference to VFD
Tank Level – PID 0-300mm
Co2 in – PID 0-4bar
Co2 Vent – PID 0-4bar
Product out valve

Desired sequence:

1) Pressurize tank to 1bar /set vent to 1.1bar
2) Once tank is at 1bar go to step 3
3) If tank is GEQ to 140mm go to step 4
I. If tank is LES 140mm go to step 6
4) Open product out valve drain to LEQ 5mm
5) Close product out valve
6) Start pump to desired speed
7) Set tank level to 140mm
8) Once tank is GEQ 140mm turn off pump
9) Open product out valve and drain to LEQ 10mm
10) Stop sequence

I would like a 2 second delay between each step.

Thanks For the Help!
 


I am taking my first attempt at modifying a program on our little bottling machine.
We need to automate a sequence to purge the tank on the filler. Basically what I need to do is push a button on the HMI and have the filler tank fill and drain while under Co2 pressure of 1bar.
I am sure there is a few ways to do this, any ideas on how to program this?

Here's the pieces involved:
RSLogix 5000
PanelView HMI
Control Logix PLC
Product inlet valve – PID
Product Pump – 0-10V speed reference to VFD
Tank Level – PID 0-300mm
Co2 in – PID 0-4bar
Co2 Vent – PID 0-4bar
Product out valve

Desired sequence:

1) Pressurize tank to 1bar /set vent to 1.1bar
2) Once tank is at 1bar go to step 3
3) If tank is GEQ to 140mm go to step 4
I. If tank is LES 140mm go to step 6
4) Open product out valve drain to LEQ 5mm
5) Close product out valve
6) Start pump to desired speed
7) Set tank level to 140mm
8) Once tank is GEQ 140mm turn off pump
9) Open product out valve and drain to LEQ 10mm
10) Stop sequence

I would like a 2 second delay between each step.

Thanks For the Help!

Do you have any current experience writing ladder logic? Because it seems like you've got the hard part figured out already- you've already defined the requirements and written a rough draft of a state diagram. All that's left to do is to convert your sequence to ladder logic.

The sequence you described is a perfect application for a state engine.

Define each step in sequence as a unique integer value. I recommend using 10 for step 1, 20 for step 2,etc. This allows you to insert extra steps later without modifying all subsequent step numbers.
When the sequence is waiting to begin, the tag will be = 0. When the start signal comes in, go to step 1 (= 10). Then if sequence = 10 AND all other conditions are present, run your 2-second timer. When timer is done move 20 to sequence tag. Rinse and repeat for all necessary steps. Once complete clear your sequence tag.

I'm sure if you do a search on this site for 'state machine' or 'state engine' you can find examples of this ad nauseum.

If you need some help after trying your hand at this, post back with what code you've written and we'll be happy to critique and offer suggestions.

Good luck (y)
 
Do you have any current experience writing ladder logic? Because it seems like you've got the hard part figured out already- you've already defined the requirements and written a rough draft of a state diagram. All that's left to do is to convert your sequence to ladder logic.

The sequence you described is a perfect application for a state engine.

Define each step in sequence as a unique integer value. I recommend using 10 for step 1, 20 for step 2,etc. This allows you to insert extra steps later without modifying all subsequent step numbers.
When the sequence is waiting to begin, the tag will be = 0. When the start signal comes in, go to step 1 (= 10). Then if sequence = 10 AND all other conditions are present, run your 2-second timer. When timer is done move 20 to sequence tag. Rinse and repeat for all necessary steps. Once complete clear your sequence tag.

I'm sure if you do a search on this site for 'state machine' or 'state engine' you can find examples of this ad nauseum.

If you need some help after trying your hand at this, post back with what code you've written and we'll be happy to critique and offer suggestions.

Good luck (y)

I have some formal training but I am definitely a novice. My boss is finally letting take a stab at programming so I want to get it right!
I will work on the code this weekend and get back to you monday.
Thanks!
 

Similar Topics

Hello, i have a machine with 3 axis that can run simultaneously controlled by other software but sometimes this goes wrong due operator fault. So...
Replies
9
Views
2,836
Hello, I am trying to make a sequence program by using MOV function to change the value of a register. So far I have always used SET and RSET for...
Replies
5
Views
2,184
hello all experts. i'd like to know your experiences about sequence programming. i use positive or negative edge detection(|p|or |n| elements)...
Replies
1
Views
6,567
hello i am currently working on my program. i have some problem where i need some guidance. i have a question where when i do the next network...
Replies
2
Views
1,544
Hi again, Here is the situation..... I have now created function blocks for all my equippment in my Robot cell.. Pick and placer, Magazine...
Replies
54
Views
48,437
Back
Top Bottom