You're right, it doesn't matter. But if the rung conditions for both are true, the last OTU/OTL instruction performed will "win" for the remainder of that scan until the next OTU/OTL instruction is executed.
I agree, latches have their place but the OP was asking if the order in which they should appear within a program scan is a requirement.If the logic for the latch and unlatch were identical, then it would be inappropriate to use a latch to begin with.
I agree, latches have their place but the OP was asking if the order in which they should appear within a program scan is a requirement.
yeah, I believe Steve and I said as much.I agree. There are instances in which scan order matters. Even if the latch and unlatch statements don't have identical logic, it is certainly possible for both statements to be true within the same program sweep. In such a case, one would be assigning priority to either the latched or unlatched state by making one of them the last statement, rather than the first.
Usually best to avoid latches, unless your purpose is to make retentive, or the situation dictates.