The following are some simple logic operations for PLC programming. X: Input, M: Output. Simulations are conducted on Fatek PLC simulator.
Table of probabilities:
X0
|
X1
|
M0
|
0
|
0
|
0
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
1
|
1
|
![](http://4.bp.blogspot.com/-TEwo8fjYxSM/VDlHOK7z1wI/AAAAAAAAAzc/j-SWgKO4FkE/s1600/1.png)
![](http://3.bp.blogspot.com/-uJv1FzXU-Ts/VDlHRW_fR8I/AAAAAAAAAzk/StPVDTtOSiQ/s1600/2.png)
![](http://4.bp.blogspot.com/-BrMiGUwfBq8/VDlIV80y-NI/AAAAAAAAAz0/jpoKWwDeIqU/s1600/4.png)
If only X0=1 and X1=0 then M1=1
Table of probabilities:
X0
|
X1
|
M1
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
1
|
0
|
1
|
1
|
0
|
![](http://2.bp.blogspot.com/-ts_wNdGVhQA/VDlKeLP1uoI/AAAAAAAAA0A/oe6GqwsuZBs/s1600/5.png)
![](http://3.bp.blogspot.com/-W2ksPHaKjrY/VDlKeCXp7eI/AAAAAAAAA0I/aoMVwx7cA_0/s1600/6.png)
![](http://2.bp.blogspot.com/-iG5bY1Pwid0/VDlKeMoOa7I/AAAAAAAAA0E/fN1n7ZTSQoE/s1600/7.png)
![](http://2.bp.blogspot.com/-wJPPfuAd-LQ/VDlKepq8KwI/AAAAAAAAA0Q/LerXPJHuMEw/s1600/8.png)
If X0=1 or X1=1 then M3=1
Table of probabilities:
X0
|
X1
|
M3
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
1
|
1
|
1
|
1
|
1
|
If one only of contacts X0 or X1 equals 0 then M5=1
Table of probabilities:
X0
|
X1
|
M5
|
0
|
0
|
1
|
1
|
0
|
1
|
0
|
1
|
1
|
1
|
1
|
0
|