LOGO! challenges: basic functions 11-20

plc
logo
boolean-logic

(Community & PR manager) #1

Hello 0x00sec. My previous challenges have not been a great success. I think I underestimated 0x00sec’s knowledge of boolean logic. Trust me when I tell you it gets more difficult later on!

Like I said in my previous article, the first 20 challenges are meant to teach you how to use boolean logic and get familiar with LOGO Soft, so don’t expect very difficult challenges here either. However, I PROMISE you it will get A LOT more difficult after you mastered the basics!


Requirements

  • You have LOGO Soft installed, you can download it from here.

Manuals:


How to solve a challenge

  • You must take a screenshot of the program you made in LOGO Soft. A screen recording of you running the simulation is also accepted and recommended.

  • Then you must write down how your program works. Example: “If I1 is active, then it will activate the 1st pin on the AND-gate called B001. If I2 is also active, which is connected to the 2nd pin of B001, then B001 will be active.”

  • You must write a short report of how you came to the solution if you used any of the manuals or help menus. If the solution was so easy you didn’t need any of the manuals or help menus, you can skip this step.

Your solution is ONLY valid if you have done all of the above!!

Solutions must ALWAYS be blurred using the “blur spoiler” tool!


Challenge 11

Description: When I1 and I3 are active, Q1 must be active. When I2 and I4 are also active, Q1 must become inactive.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 12

Description: There is a hallway with two switches on each end, connected to I1 and I2 of your LOGO. The lights in the hallway are connected to output Q1 of your LOGO. The light must change it’s state every time that one of the two switches is flipped, so that the light can be controlled by the two switches. Example: You flip the switch S1 to turn on the light, then walk through the hallway to flip the switch S2 to turn off the light. Then later you flip S2 again to turn on the light and S1 to turn it off again.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)
  • You are limited to just ONE function block

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 13

Description: Q1 will be active when I1 and I2 are active. When I3 also becomes active after that, Q1 becomes inactive.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 14

Description: If I1 and I2 are active at the same time, or just I3 is active, then Q1 will be inactive.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 15

Description: I1, I2, and I3 need to be active at the same time to turn Q1 inactive.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 16

Description: I1 and I3 need to be active in order for Q1 to be active. When I2 and I4 are also active, Q1 will become inactive again.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 17

Description: When I1 and I3 are active, Q1 will be active. When I2 and I4 are active, Q2 will be active.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 18

Description: When I1 is active, Q1 will be active and Q2 will be inactive. When I1 is inactive, the opposite happens.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 19

Description: When I1 and I2 are active at the same time, Q1 and Q2 will be active. When we also activate I3 after that, both Q1 and Q2 will be inactive.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Challenge 20

Description: When I1 and I3 are active, Q1 and Q2 will be active. When I2 and I4 are active after that, Q1 and Q2 will be inactive.

Rules of engagement

  • ONLY basic functions (AND, OR, NOT…)

Author assigned level: Newbie

Community assigned level:

  • Newbie
  • Wannabe
  • Hacker
  • Wizard
  • Guru

0 voters


Conclusion

These are the last set of challenges that cover basic LOGO functions. If you had an easy time solving these, you have a decent understanding of boolean logic and are ready to move onto my next set of challenges which will focus on special functions like on-delays, off-delays, latching relays, etc. which I will post tomorrow.


#2
Solutions


I1 and I3 are connected to pins 1, 4 of the AND(B0) gate, I2 and I4 are connected to the same pins of the second AND(B1) gate. B1 is connected to a NOT gate which then is connected to an AND gate along with B0.
So when I1 and I3 are active, Q1 will be active, but when I2 and I4 start to be active, Q1 will become inactive


I1 and I2 are connected to pins 1, 4 of the XOR gate, which is connected to the Q1.
So when, either of the Inputs are active the Q1 will be active, but when both of them are active/inactive the Q1 will be inactive.


I1 and I2 are connected to pins 1, 4 of the AND(B0) gate. I3 is connected to a NOT(B1) gate.
B0 and B1 are connected to pins 1, 4 of the AND gate, which is connected to the Q1.
So when I1 and I2 are active Q1 is active, but when I3 starts to be active, Q1 becomes inactive.


I1 and I2 are connected to pins 1, 4 of the AND gate. The I3 and the AND gate are then connected to a NOR gate, which is connected to the Q1.
So when I1 and I2 are active Q1 becomes inactive and when I3 is active Q1 becomes inactive also.


I1, I2 and I3 are connected to pins 1, 3 and 4 of the AND gate, which is connected to the NOT gate, thus resulting that when I1, I2 and I3 are all active, Q1 becomes inactive.


I1 and I3 are connected to pins 1, 4 of the AND(B0) gate. I2 and I4 are connected to pins 1, 4 of another AND gate, which is connected to a NOT(B1) gate. Then B0 and B1 are connected to pins 1 and 4 of the B3(another AND gate) that leads to Q1.
So when I1 and I3 are active and I2 and I4 are not, B3 will be active. And when I2 and I4 become active, B3 will be inactive.


I1 and I3 are connected to pins 1 and 4 of the AND gate which is connected to Q1.
I2 and I4 are connected to pins 1 and 4 of the AND gate which is connected to Q2.
Thus, when I1 and I3 are active Q1 will be active and when I2 and I4 are active Q2 will be active.
(PS: Didn’t know if i need to to it only in 1 circuit so I made this way. Let me know if it’s something wrong.)


I1 is connected directly to Q1 and also to a NOT gate which is connected to Q1. So when, I1 is active Q1 will be also, but Q2 will not and viceversa.


I1 and I2 are connected to pins 1, 4 of the AND(B0) gate and I3 is connected to a NOT(B1) gate which is connected together with B0 to an AND gate leading to Q1 and Q2. So when, I1 and I2 are active and I3 is active also, B0 will be 1 and B1 will be 0, thus the last AND gate will be 0, so Q1 and Q2 inactive.


I1 and I3 are connected to pins 1, 4 of the AND gate(B0). I2 and I4 are connected to pins 1, 4 of the AND gate that is connected to the NOT(B1) gate. Then B0 and B1 are connected to a third AND gate, which leads to Q1 and Q2.
When I1 and I3 are active and I2 and I4 are active, B0 will be 1, B1 will be 0 so the third AND gate will result in 0, thus Q1 and Q2 being inactive.

Sorry if I wrote a little bit confusing, but I got lost in so many lines xD
Those challenges are lovely and very fun. Nice Job again!
See what comes next .


(Community & PR manager) #3

All of your solutions are correct @404Err0r!

Also, i made a mistake in the rules of engagement for the last two challenges, sorry about that!


#4
Spoiler

11


I2 and I4 are connected to NAND-gate B002 it is inactive when I1 and I2 are. B002, I1, and I3 are also connected to B001. B001 is active when I1, I2, and B002 are, i.e. I1, I2 are active and I3, I4 are inactive.

12


Pulse relay B002 toggles it’s output when pin 1 is high. Edge ANDS and NANDS are used so that pin 1 on B002. Is triggered when the inputs are instead of being held. The NANDS trigger the pin when an input is turned on and the NANDS trigger the pin when an input is turned off.
I looked at pulse relay in the manual. I also think this solution is probably over complicated.
EDIT: Just realised XOR would work, I’m stupid.

13


AND-gate B001 is connected to I1, I2 and NOT-gate B002. B002 is connected to I3. So B001 is active when I1 and I2 are active, and I3 is inactive. Making I3 active deactivates B002 which deactivates B001.

14


I1 and I2 are connected to AND-gate B001, so B001 is active when they both are. B001 and I3 are connected to XOR-gate B002, so it is active when either (but not both) are. NOT-gate B003 inverts this so that O1 is inactive when either B001 or I3 are (but not both).

15


I1, I2, and I3 are connected to AND-gate B001, so it is active when they all are. O1 is active when B001 is.

16

See 11

17


I1 and I3 are connected to AND-gate B001 which is connected to O1. So O1 is active when both I1 and I3 are. I2 and I4 are connected to AND-gate B002 which is connected to O2. So O2 is active when both I2 and I4 are.

18


I1 is connected to O1 so O1 is active when I1 is. I1 is connected to O2 through NOT-gate B001 so O2 is active when I1 isn’t

19


I3 is connected to NOT-gate B002. I1, I2, and B002 are connected to O1 and O2 through AND-gate B001. So O1 and O2 are active when I1 and I2 are active, and I3 isn’t.

20


I2 and I4 are connected to NAND-gate B002. I1, I3, and B002 are connected to O1 and O2 through AND-gate B001. So O1 and O2 are active when I1 and I3 are active, and both I2 and I4 are not active (at the same time).


(Community & PR manager) #5

@lkw I will have to give you negative points because some of your solutions are not following the rules. You edited though so you are forgiven :stuck_out_tongue:.


(Guess, there's a solution I'm not seeing.) #6

Those ones were pretty good challenges to get used to boolean again.

Edit: Removed the blur spoiler, so one is able to enlarge the pictures.

Solutions

11|
l1 & l3 are connected to B001 (AND) in order to ensure, that they only activate something, if both are on. Same thing for l2 and l4, which are connected to B002 (AND). B001 & B002 are connected to B003 (XOR) which will only activate Q1, if only one of its pins are active. Therefor B001 and B002 can never be active at the same time.

12|
l1 is connected to pin 1 of B001 (XOR). l2 to pin 2 of B001. If both pins of B001 are active/not active, B001 wont activate anything. If just one is active, it will activate Q1. Therefor, turning l1 and l2 on and off will change the state of B001 every time from active to not active and with it Q1.

13|
l1,l2 are connected to B001 (AND) to ensure that both are active at the same time. B001 and l3 are connected to B003 (XOR). So if B001 activates pin 1 of B002 it will activate Q1. Turning on l3 after that will activate the second pin of B002 and turn off Q1 with that.

14|
Ok, so that gets kinda messy. Q1 is connected to B005 (XOR). B005 is connected to B002 over pin1 and to l3 (pin2). This means that l3 can activate B005 on its own.
B002 (OR) will also be able to activate B005 (if l3 is deactivated).
Let’s look at l1 and l2. They are bound together with B001 (AND). So both need to be active to activate B002, following that B005 and therefor Q1.
Now to B003 and B004 (both AND). - Pin1 of B003 connects to l3, pin2 to l1. - Pin1 of B004 connects also to l3 but pin2 leads to l2.
So if l3 is active and l1/l2 with it, B003/B004 will be active, therefor B002, hence both pins of B005 => Q1 will stay deactivated.

15|
l1,l2,l3 are connected to B001 (NAND). B001 will always be active, except all L’s are active.

16|
l1, l3 are connected to B001 (AND). l2, l4 are connected to B002(NAND).
B001 in turn is connected to pin2 of B003 (AND). This Pin2 will only be active, when l1, l3 are active as well (and with it B001).
Pin1 of B003 is connected to B002 (NAND) and will be active as long as l2, l4 are not active.

17|
Well, should be obvious. But I didn’t get the point of this task :smiley:

18|
l1 connects to pin3 of B001 (NOR) and to pin1 of B002 (OR). B002 will activate Q2, if l1 is active. B001 will do the opposite.

19|
l1,l2 are bound together with B001 (AND). B001 is connected to pin1 of B003/B004 (both AND). Pin3 of B003/B004 are connected to B002 (NOT). So pin3 of B003/B004 will be active as long as l3 stays off. l1, l2 can activate together the first pins of B003/B004 (and with it Q1/Q2). l3 can turn off pin3, hence Q1/Q2.

20|
It’s like 19 but l2 and l4 are connected to B001 (NAND) and act as if they were like l3 in the challenge 19.


(Community & PR manager) #7

This is a great idea acutally. We’ll make this the standard for the next challenges!