PLC Program

Here's my crude implementation of CC's ladder logic from post #43. Run the exe and click on X0 and X1 to start the ball rolling.

Without some sort of visualisation, this will take for ever :)
 
Forgive me if someone else has asked this and I just missed it but, are you ramping and soaking to temp or are you 100% output until temp is reached? Also, are you using T/C's for temp reading/control?
 
Forgive me if someone else has asked this and I just missed it but, are you ramping and soaking to temp or are you 100% output until temp is reached? Also, are you using T/C's for temp reading/control?

... this is only make-believe...


homework... if you like. But the guy is trying ;)


@LD wrt post #43... agreed... it don't work... but how do you do that?
 
Last edited:
We're up to 50 posts!!! o_O



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

m0 kt50
--] [-----------------------(t0) Warning start time

m0
--] [----------]/[----------(m1) Warning start on

m0
--] [----------] [----------(m2) Heating

kt300
---------------] [----------(t1) Heat time

m0
--] [----------] [----------(m3) Heat complete

m0
--] [----------] [----------(m4) Warning end

kt100
---------------] [----------(t2) Warning end time

m0
--] [----------] [----------(m5) Cooling

kt150
---------------] [----------(t3) Cooling time

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


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


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


--] [-----------------------(y2) Green lamp



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



You're going to have to fill in the blanks! ;)
 
My opinion of what Chris needs for a breakthrough:

A) Build real hardwired circuits:
---Simple motor start stop station with a normally open PB, a normally closed PB and a motor starter (or relay).
---Forward and Reverse start stop station with same as above plus one more relay or motor starter and electrical interlocks.
---Two motor start stop station where motor 1 must run for five seconds before motor 2 starts.
---Add to above circuit a pressure switch (or another normally closed PB) that will stop both motors and reset the timer.
---Two motor circuit with start and stop buttons, motor 2 must start 10 seconds after motor 1 is running and must run for 30 seconds after motor 1 stops.

B) A real PLC and the above exercises.

Then the double coils and other logical misunderstandings will instantly vanish when you go from electrical motor controls to ladder logic, and building more and more complex programs will go much easier.

No offense to Chris if I have misjudged his skills and experience...I have seen this type of training make the "light bulb turn on " for many a mechanic or novice electrician who was totally or partially lost with PLC programming.

There is no substitute for trial and error with real working equipment in front of you, and learning how to hard-wire relay logic, especially timing relays, is very educational for someone starting out.

Paul
 
This has been in the back of my mind and only became apparent to me when Okie wrote it up.

I heartily endorse this kind of thinking and would paraphrase / condense thus
You must understand the whole system in order to understand how the controls are supposed to make the system work.

I second the recommendation

Dan Bentler
 
@LD wrt post #43... agreed... it don't work... but how do you do that?

sorry... post #46


.

A few lines of code using Delphi. I expect a similar result can be achieved with Excel using VBA

Code:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
//Rung 1
M3.Checked:=M3Coil.Checked;

M1Coil.Checked:= (X0.Checked or M3.Checked) and X1.Checked;

//Rung 2
M1.Checked:=M1Coil.Checked;

If T1Count > 0 then T1Count:=T1Count-1;
If M1.Checked and not T1RisingEdgeStore then T1Count:=500;
T1RisingEdgeStore:=M1.Checked;
T1Coil.Checked:= (T1Count>0);

//Rung 3
M1A.Checked:=M1.Checked;
M3A.Checked:=not M3.Checked;
M2C.Checked:=M2Coil.Checked;
T1.Checked:=not T1Coil.Checked;

M2Coil.Checked:= (M1Coil.Checked or (M2Coil.Checked and not M3Coil.Checked)) and not T1Coil.Checked;



//Rung 4
M2A.Checked:=M2Coil.Checked;

If T2Count > 0 then T2Count:=T2Count-1;
If M2Coil.Checked and not T2RisingEdgeStore then T2Count:=3000;
T2RisingEdgeStore:=M2Coil.Checked;
T2Coil.Checked:= (T2Count>0);

//Rung 5
M2B.Checked:=M2Coil.Checked;
M3B.Checked:=M3Coil.Checked;
T2.Checked:=T2Coil.Checked;

M3Coil.Checked:=(M2Coil.Checked or M3Coil.Checked) and T2Coil.Checked;

//Rung 6
M3C.Checked:=M3Coil.Checked;

If T3Count > 0 then T3Count:=T3Count-1;
If M3Coil.Checked and not T3RisingEdgeStore then T3Count:=1000;
T3RisingEdgeStore:=M3Coil.Checked;
T3Coil.Checked:= (T3Count>0);

//Rung 7
M3D.Checked:=M3Coil.Checked;
M4.Checked:=M4Coil.Checked;
T3.Checked:=T3Coil.Checked;

M4Coil.Checked:=(M3Coil.Checked or M4Coil.Checked) and T3Coil.Checked;

//Rung 8
M3.Checked:=M4Coil.Checked;

If T4Count > 0 then T4Count:=T4Count-1;
If M4Coil.Checked and not T4RisingEdgeStore then T4Count:=1500;
T4RisingEdgeStore:=M4Coil.Checked;
T4Coil.Checked:= (T4Count>0);

if M1Coil.Checked then Amber1.Color:=clYellow else Amber1.Color:=clBtnFace;
if M2Coil.Checked then Red.Color:=clRed else Red.Color:=clBtnFace;
if M3Coil.Checked then Amber2.Color:=clYellow else Amber2.Color:=clBtnFace;
if M4Coil.Checked then Green.Color:=clGreen else Green.Color:=clBtnFace;

T1Value.Caption:= inttostr(T1Count);
T2Value.Caption:= inttostr(T2Count);
T3Value.Caption:= inttostr(T3Count);
T4Value.Caption:= inttostr(T4Count);
end;
 
Program

silva.foxx

I think I've exhausted your's and everyone else's patience, for that I apologise :unsure:

As you can no doubt gather I've had no previous experience with PLC's or any other kind of programming. I was given this as an assignment to be handed in and demostrated on Tuesday coming complete with typical paperwork ie..instruction lists etc for the program.
Your help and guideance (and patience) has been great, and to all the guys & girl who have posted comments I say a big thank you !! I've had my head in books most of the week, and slowly it's becoming clearer, although I'm under no illusions I'm not the finished article yet by some way.

I've attemted to fill the blanks, I hope some of its correct, I'm working on the thought process of input = output.... maybe this is wrong ?

Thanks once again everybody, you have my upmost respect 🍺

PLC7.jpg
 
It's help I require not lesson in morality..


Chris I do not think I have seen anyone change their attitude so fast. Smart people are able to adapt so you should take this as a complement. The knowledge and ability you have gained in the last several days is also amazing.

Do I correctly assume this assignment if for a non PLC course?
What course is this for?
Dan Bentler
 
Chris... you've not exhausted anyone's patience.

wrt your attempt to fill-in-the-blanks. You're almost there.
I've left in the correct bits. You've added a 'stop' input that the task description doesn't ask for. We'll come to that once you've completed the blanks...

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

m0 kt50
--] [-----------------------(t0) Warning start time

m0 t0
--] [----------]/[----------(m1) Warning start on

m0
--] [----------] [----------(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 |
--] [----------] [---+

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

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

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



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




Attached is a Notepad file. Adapt it then copy and paste the contents into a post between the ladder tags (see -||- up top next to the highlighted ABC). Saves you printing out and scanning each time! :whistle:
 
Last edited:
leitmotif (Dan Butler)

You assume correct, the course I am studying is a Higher National Certificate (HNC) in Instrumentation & Process Control. PLC's is just one module of the course out of 10. We just have a 1 1/2 lecture a week and are often left to our own devices. Sort of teach yourself if you like. This website has been a huge help and you guys comments. Without it I'd have been stumped. Thanks all.

Chris
 
 
door sw
--] [----------]/[----------(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 |
--] [----------] [---+
m2 t0
------------] [----]/[------(y0) Red lamp
m1 t2
--] [--+-----------]/[------(y1) Amber lamp
|
m4 |
--] [--+
m5
--] [-----------------------(Y2) Green lamp

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

 

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