How logic gates work: AND OR NOT NAND NOR XOR
How logic gates work: AND OR NOT NAND NOR XOR
Logic gates are the fundamental building blocks for all digital circuits including devices like cellphones, laptops and of course PLCs. Sometimes, in PLC programs, we use logic gates explicitly but they are always there behind the scenes in every function. The gates perform basic logical functions like AND. (Are both signals "ON"?)
In the program the logic gate outputs will go on or off based on combination of digital signals coming to the inputs. The logic gates are based on boolean algebra (on or off). Most logic gates need two or more input signals and will have one output signal. The output signal of a logic gate can go to another logic gate or an external output signal.
Every logic gate in the program will be in ON or OFF state. The binary conditions are often referred to as false or true. In Zeliosoft its referred to ON or OFF. OFF represents 0 (or 0v), and ON represents 1 (or 24v). Depending on the type of logic gate being used and the combination of inputs, the binary (boolean) output will differ. A logic gate can be thought of as a switch.
AND Gates
The AND Gate is used to compare multiple binary (ON or OFF) signals. For the AND Gate to be ON, all the connected signals need to be ON.
If one signal is OFF then the AND gate output signal will be OFF.
OR Gates
The OR Gate is used to compare multiple binary (ON or OFF) signals. For the OR Gate to be ON one of the signals connected most be ON.
When all the signals are OFF the OR Gates will be OFF.
NOT Gates
The NOT Gate is used to convert signals from ON to OFF or from OFF to ON. The output signal is the opposite of the input signal.
NAND Gates
NAND Gates are a combination of AND Gate and NOT Gate.
The signals are first compared in the AND Gate and after converted to the opposite.
NOR Gates
NOR Gates are a combination of OR Gate and NOT Gate.
The signals are first compared in the OR Gate and after converted to the opposite.
XOR Gates
XOR Gate are exclusive OR Gates.
They are similar to OR. For the output to be ON an input must be ON, but not both inputs.
Only if just one input is ON, the output is ON.
Simulation zeliosoft
Try the logic yourself. You can use the simulation in Zeliosoft or the PLCtrainingKIT.
To make sure the website can provide free lessons now and in the future. We try to lower are cost by using ads on are website.