I have got a PLC program.
In the program i got an error handler function, it has 1 bit output.
If there is any problem (with the machine) the output is TRUE.
My problem is, there are some machine fault, what i don't want to report to the central system monitoring PLC, but I would displayed on the OP.
so... with other words ...
A + B + C + ... + T + U + V + a + b + c + d = X
Where:
- all uppercase letters are the unknown sourced machine faults (more than 200 fault bit)
- all lowercase letters are those faults what I don't want to report (4-5 fault bit)
- X is the function output (1 bit)
What I know:
- the function output (X)
- faults what I don't want to report (a, b, c, d)
What I need:
- the unknown sourced machine faults (A + B + C + ... + T + U + V)
X - (a + b + c + d) = A + B + C + ... + T + U + V
How can I substract these variable from the result?
In the boolean algebra
OR logic acts as an addition +
AND logic acts as a multiplication *
Which logic acts as a subtraction? or How do I get A + B + C + ... + T + U + V?
If I understand you correctly, then what you want is not generally possible.
A logical OR throws away source information. Only if it returns 0 then you have full information about all its inputs: they must all be 0. As soon as it returns 1, then there is no way to reconstruct the individual inputs, except for the fact that they are not all 0.
I'll show what is possible, using several situations + what you can conclude from it: