Then my next guess is that the backwards jump to [Q2:] is still, inexplicably, being executed from the [LT] instruction, even though the EN input rung of the LT instruction is FALSE.
As a diagnostic, set up another integer that is cleared at the same time as the index, and increment that other integer in each pass of the loop i.e. before the [NEQ]; I suspect its value at the time of the HALT will be greater than 13. Because even if the jump back to [Q2:] is occurring even though the LT's input rung EN is False, the [ADD] should not be executing, so the index would stay at 13 until the watchdog timeout.
When the status of the left link is 1, a jump is made to a label (in the current section).
To generate an unconditional jump, the jump object must be placed directly on the left power rail.
To generate a conditional jump, a jump object is placed at the end of a series of contacts.
The jump wasn't conditional because it was set to a boolean output rather than connected to a contact. It looks like the LT is keeping its output energized even though the network is de-energized and the project is set to "don't Maintain output links on disabled Elementary Functions". Seems buggy, but now it works.
I get a halt when I place a zero at position 13 on Control Expert. Any ideas where I went wrong?
Attached a pair of screenshots and the program ZEF in a ZIP.
Brilliant! The jump continued towards infinity.
I found the following in the help file:
Emphasis mine. The jump wasn't conditional because it was set to a boolean output rather than connected to a contact. It looks like the LT is keeping its output energized even though the network is de-energized and the project is set to "don't Maintain output links on disabled Elementary Functions". Seems buggy, but now it works.
It halts as when it goes to index 13 it jams there for infinite time.
You have NE-instruction before adding.
With value 0 it don't anymore add index on loop and watchdog timer halts PLC.
Control expert ladder behaves differently than FBD-code. I have had problems with trigger contacts on ladder. Trigger output will hold output on even that it should be one scan pulse.
Try indexing with FBD code if it makes difference on PLC.
But the question I have is this: why does the jump occur from the LT instruction when the OUT rung, from the LT instruction to the jump (Q2), is FALSE?
The OUT rung of the LT instruction that feeds the jump must be FALSE, because the input rung of the LT instruction is also FALSE, because that LT input rung in turn is fed by the NE instruction output rung which evaluated to FALSE.
That seems like a bug to me, especially when the output rung of the NO instruction, that feeds the Q2 jump on the solution OP came up with, is FALSE, yet it inhibits the jump. But perhaps it is only a feature .
Only just noticed this post, cannot understand the screenshots, where are the variables ? all I see is what looks like actual values but no symbols is this the way it works in monitoring ?, very weird.
Only just noticed this post, cannot understand the screenshots, where are the variables ? all I see is what looks like actual values but no symbols is this the way it works in monitoring ?, very weird.
Also, I would have done the compare for the last array as a separate rung after that logic, like you say, perhaps the compare with a jump label as it's output is a bug.
I'm still not sure why the LT still energizes the output.
When the status of the left link is 1, a jump is made to a label (in the current section).
To generate an unconditional jump, the jump object must be placed directly on the left power rail.
To generate a conditional jump, a jump object is placed at the end of a series of contacts.
It's not the LT command's output, it's regarding this quote:
The LT output doesn't matter because this platform considers it an unconditional jump and jumps whatever the status of the line is.
The LT output doesn't matter because this platform considers it an unconditional jump and jumps whatever the status of the line is.