PLC Program

silva.foxx

I have left the start sequences out for the minute, trying to get the main part sorted first. With respect to the amber lamp..when the door is closed, the lamp comes on for 5 seconds before the red lamp comes on for 30 secs. You will see I have added the t2 instruction in the rung for the y1 (amber lamp) output, is this correct ? the trickery is the amber lamp is on twice for different durations each time.


Chris
 
Chris Corkhill said:
I'm working on the thought process of input = output.... maybe this is wrong ?
Yes, in my opinion, this is wrong. Start with the outputs and work your way back...

You already know what you want from the outputs. You have a list of steps.

So, draw the coils on paper for each of your outputs. Leave plenty of space between them. How about one per page...just the coil and the "neutral wire" and think of it as an electrical circuit.

Now, consider the steps and the inputs.

Even though it will make the program longer, structuring the discrete steps with internal bits will give you reliable structure, and make this a piece of cake. So, sequester a group of consective bits that will represent your steps.

Now for each output, go ahead and put step bits in front of it...Example: output 1needs to be on in steps 1 and 7:


step 1 Output 1
---][--- ---()---

step 7
---][---



Don't worry about connecting the lines yet, you may need to insert interlocks like stop buttons, or mode controls.

Soon, you will have logic that will turn on exactly the right outputs during exactly the correct steps, and all you'll have left is to write a little logic to drive those steps based on conditions from your inputs:

On paper, write down the "conditions for completion" for each step in a clomun next to your steps list. Then try to code those on your own...

Good Luck
Happy Easter
Paul
 
Last edited:

door sw ?
--] [----------]/[----------(m0) Start Oven
|
|
|
|

m0 t3
--] [----------] [---+------(m6) End Oven
|
door sw ? |
--] [----------] [---+

m2 ?
------------] [----]/[------(y0) Red lamp

m1 ?
--] [--+-----------]/[------(y1) Amber lamp
|
m4 |
--] [--+

m5
--] [-----------------------(Y2) Green lamp


m2 ?
------------] [----]/[------(y3) Heater On




Look at using the M flags as opposed to the timer bits.
 
Program

silva.foxx

please see attached, ive added a stop (x1) on rung 1, although this is a normally closed contact which i think in the plc world is unsafe ??

happy easter and thanks again.

Chris

plc8.jpg
 
Chris Corkhill said:
I'm working on the thought process of input = output.... maybe this is wrong ?

OkiePC said:
Yes, in my opinion, this is wrong. Start with the outputs and work your way back...
You already know what you want from the outputs. You have a list of steps.
I agree with Paul.
Use the desired behaviour of the outputs, to find out which "states" or "steps" there must be in the program. The states (or steps) should be stored in memory bits.
 
I agree with Paul.
Use the desired behaviour of the outputs, to find out which "states" or "steps" there must be in the program. The states (or steps) should be stored in memory bits.

I agree with both. Here is why
You start with a machine or process you want to build
1. What do I want this thing to do
2. What are the steps in process
3. How do I control each step
4. You now have a list of your outputs and may have even defined them.

Dan Bentler
 
Hi Chris

Your task did not ask for any input other than the doorswitch.

 door sw        ?

--] [----------]/[----------(m0) Start Oven

|
|
|
|

m0 t3

--] [----------] [---+------(m6) End Oven

|

door sw ? |

--] [----------] [---+



m2 ?

------------] [----]/[------(y0) Red lamp



m1 ?

--] [--+-----------]/[------(y1) Amber lamp

|

m4 |

--] [--+



m5

--] [-----------------------(Y2) Green lamp





m2 ?

------------] [----]/[------(y3) Heater On



Start Oven whilst doorswitch is closed and NOT End Oven.

End Oven whilst (Start Oven and Cooling Time done) OR (doorswitch closed and End Oven).

Red lamp on whilst Heating and NOT Heating complete.

Amber lamp on whilst (Warning start on OR Warning end) and NOT Cooling.

Green lamp on whilst Cooling

Heater on whilst Heating and NOT Heat complete.
 
program

 
door sw m6
--] [----------]/[----------(m0) Start Oven
m0 kt50
--] [-----------------------(t0) Warning start time
m0 t0
--] [----------]/[----------(m1) Warning start on
m0 t0
--] [----------] [----------(m2) Heating
m2 kt300
---------------] [----------(t1) Heat time
m0 t1
--] [----------] [----------(m3) Heat complete
m0 m3
--] [----------] [----------(m4) Warning end
m4 kt100
---------------] [----------(t2) Warning end time
m0 t2
--] [----------] [----------(m5) Cooling
m5 kt150
---------------] [----------(t3) Cooling time
m0 t3
--] [----------] [---+------(m6) End Oven
|
door sw m6 |
--] [----------] [---+
m2 m3
------------] [----]/[------(y0) Red lamp
m1 m5
--] [--+-----------]/[------(y1) Amber lamp
|
m4 |
--] [--+
m5
--] [-----------------------(Y2) Green lamp

m2 m3
------------] [----]/[------(y3) Heater On

 
(y)

Now... you need to understand it! Can you see and realise the sequential states of the program? Perhaps create notes of how you see each rung operating.

The safety bit! You need to think of the possible scenarios that may result in danger to the operator... and ways of preventing or controlling them.

Have you tried the software I linked you to in post #34?

.
 
Last edited:
silva.foxx

the more i look at it the more i can see it (if you know what i mean). I tried to download the software you liknked but could not get it to run. I am at the college tommorow (tuesday) and this program has to be demonstrated to lecturer so I will be working with mitsubishi GX Developer software. I will produce an instruction list and a step by step description of the program to be submitted tommorow.
I will let you know how it goes.
Huge thank you to yourself, I've not found it easy but I've definately learned from all your comments/help.
Big thank you to everyone else to, great website great people ! :)

Chris
 
Chris

There's still the safety interlock to address before the program is complete.

What's to stop the oven from being opened whilst the oven and bearing are heating and too hot?

A relatively simple device can be added to satisfy the interlock requirement. Any ideas?


.
 
silva.foxx

I submitted the program after demonstrating, delighted to say it worked first time ! ;-) I didn't require a safety interlock to hand the program in, and I couldn't log on yesterday as this forum was under maintenance. I am however still interested in what interlock and where we would fit this ?
I have looked at the program and would be inclined to fit the interlock on rung 4 (Heating). Would this be a normally open contact which goes high when oven starts ?

Chris
 

Similar Topics

Can we use a Simotion D455 ethernet port x127 as a gate, to access S7-1500 plc Tia Portal program ? In the Simatic manager, we used Netpro to do...
Replies
2
Views
93
Posted this to Reddit with little success, so I figured I would share it here as well. Very new to PLCs, but figured I would give it a shot to...
Replies
0
Views
134
I'm a beginner in the automation field and I've set up an automation system connecting several devices (datalogger, radio, etc.) via Modbus RS485...
Replies
5
Views
220
Hi All, want to ask. I have PLC a programme to control the valve. The existing programme is to control valve A (Y22), and I want to change to...
Replies
2
Views
148
can anyone has a good program to learn plc programming online. i have the basic looking into improve my skills thanks
Replies
1
Views
149
Back
Top Bottom