drbitboy
Lifetime Supporting Member
For example, consider these two rungs:
This is what I am mean when I say the rungs are not much different than random guesswork: they may work, but they are confusing.
- The value of time_out cannot be simultaneously
- BOTH 1 on the lower branch NOCON (Normally Open CONtact),
- AND 0 on the NCCON (Normally Closed CONtact) after the branches rejoin.,
- so the NOCON time_out and the lower branch can be removed, because it can never affect the output.
- Furthermore, the first rung shows that PTT_PULSE is a one-shot i.e.
- PTT_PULSE's value is 1 when the push button, I00013, has a rising edge,
- PTT_PULSE's value is 1 for at most one scan cycle
- For any scan when PTT_PULSE's value is 1,
- the value of I00013 must have been 0 on the previous scan cycle
- Therefore, if the PPT_PULSE value is 1, then the time_out bit's value cannot be 1 and must be 0,
- because the time_out value can be 1 only when the button is stuck
- i.e. when the value of I00013 has been 1 for at least the previous 15s of scan cycles,
- but we know that I00013 was 0 on the previous scan cycle.
- So if the PPT_PULSE value is 1, then
- The NOCON PTT_PULSE instruction must evaluate to TRUE,
- and the NCCON time_out instruction must evaluate to TRUE, because the time_out value is 0,
- And if the PPT_PULSE value is 0, then
- The NOCON PTT_PULSE instruction must evaluate to FALSE,
- so the value of time_out does not matter
- So the NCCON time_out instruction can be removed, because it can never affect the output.
- so the NCCON time_out instruction can be removed, because it can never affect the output.
This is what I am mean when I say the rungs are not much different than random guesswork: they may work, but they are confusing.