Beginner ladder logic question

Sonjacksy,
I do not use Yahoomail, or Yahoo Messenger. The fastest way to get me is right here.

You made a good effort on that last problem, but your logic is not exactly correct. I will post a solution later. There are many solutions that would work. If you have access to a PLC Simulator program, then run your program in the simulator to see how it works. That will tell you right away if it is correct, or not.

If you don't have a PLC simulator, you can try out a free download of LogixPro for 20 days, from http://www.thelearningpit.com/

When you run the program, from the top menu, select "Simulations", then "I/O Simulator", then enter your ladder program. To test it, on the top left at "OFFLINE", click the down arrow and select "Download to PLC". Then click "Go Online". Then switch the top center indicator from "PGM" to "RUN". Now in the left I/O Simulator panel, turn on a switch and watch what it does.
 
Last edited:
Here is a solution to the "3 Lights & 3 Switches" problem. I made the screen shot when Switch 1 was ON, Switches 2 and 3 are OFF. What will happen if I press Switch 1 and 2 at the same time? Does this result violate the logic rules that were given?

3 Lights & 3 Switches.JPG
 
3 switches and 3 loads problem
What will happen if I press Switch 1 and 2 at the same time? Does this result violate the logic rules that were given?
yes sir i have found a solution for that even any of two switches both are on the loads will be off (it will not violate the logic). i think this is the answer i am pasting a snap shot of the answer

PROBLEM2.jpg
 
Yes sir, I have found a solution for that. Even if any of two switches both are on, the loads will be off (it will not violate the logic).
It is very good that you have thought about the logic. But technically the original problem does not say what should happen if 2 switches are ON at the same time. It is a "don't care" condition of the logic.

The originator of the problem did not say (so s/he does not care) what happens when 2 or 3 switches are ON at the same time, as long as you meet the conditions for 1 switch being ON each time.

As usual, making the logic do the intended task is the easy part. Preventing the logic FROM doing all of the infinite number of bad things is the harder part.
 
A little late to the game but this is how I’d do it (the original question).

simplelogic_zps9f2030c0.jpg
 
Firejo,
That is a neat solution. I think you probably meant to do it like the attached picture, to avoid the double-coil syndrome where only the last occurance of O:0.0 (O:2/0 in the LogixPro simulator) is the only one that works.

5 Swithces & 1 Lamp- Firejo.jpg
 
Last edited:
To be honest I hadn’t thought of that but yes it would fail. What I like about it is you can come up with combinations of inputs just as long as you have the combinations decimal value in one of the equal blocks (for example if you wanted to turn an output on when inputs 0, 1 and 4 are high then N7:0 would need to equal 19).
 
Yes, it is a neat device to use. I will have to remember that for some of these student problems with switch combinations turning on this or that output. It would simplify a lot of that type of logic (although maybe not what the professor hoped to see for a beginner-type solution).
 
How's this for a stupidly overcomplicated solution? :)

Code:
SOR LOG Input_Word Inp_Log_10 LOG 2 Two_Log_10 DIV Inp_Log_10 Two_Log_10 Inp_Log_2 EOR
SOR NEQ Input_Word 0 MOD Inp_Log_2 1 Inp_Result EQU Inp_Result 0 OTE One_Input_On EOR

This could be cleaned up a bit, and would actually save a ton of instructions if you just happened to be using all 31 of the least significant bits of a DINT input word.
For this to work, all tags except Input_Word and One_Input_On have to be REALs, and it all falls apart if Input_Word.31 is on.
 

Similar Topics

Hi I have just started using Siemens S7 PLC for a mechatronics degree. I have used Matushita PLCs before but I am having difficulty with Siemens...
Replies
4
Views
3,672
a/ Input – X0 -> turns Output – y0, y5 Input X1 –turns OFF y5, but y0 stays ON b/ Input X0 -> turns Internal Bit M10 and Output Y0 M10 ->...
Replies
14
Views
3,323
Hi, I am a complete beginner with PLCs - so please forgive my ignorance. System: Siemens S7-313C Programming: Step 7 Ladder Diagram 1. How to you...
Replies
4
Views
8,734
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
265
So to start off: I have no experience with PLC's, but I'm good at figuring stuff out, but I need some help to know if my PLC is just dead in the...
Replies
2
Views
119
Back
Top Bottom