Why a Ladder Row Is Not an Execution Boundary
In DirectSOFT, a rung is an editor and documentation construct. The PLC executes the generated mnemonic instruction stream and does not use the displayed rung boundary as an execution boundary. This distinction matters when a long rung contains many accumulator operations and the engineer separates those operations visually for documentation.
A NOP creates a visible separation but performs no Boolean operation. It therefore leaves the Boolean stack unchanged. An accumulator instruction placed after that separation can still execute from the condition established before it.
Boolean and Accumulator Stack Interaction
| Item | Evidence-supported behavior | Engineering consequence |
|---|---|---|
| Rung shown by DirectSOFT | Editor-level representation | Do not assume a displayed boundary resets execution state. |
NOP |
Performs no operation and leaves the Boolean stack unchanged | Instructions after it retain the preceding execution condition. |
| Accumulator boxes | Operate on accumulator data but also use the Boolean stack as their execution condition | Visually separated boxes may remain conditionally enabled by an earlier contact. |
| Output without a new starting contact | Can use the Boolean-stack state left by previous logic | An output that appears tied to the power rail may not be unconditional. |
The evidence gives this mnemonic sequence:
STR X1
LD V2000
NOP
ADD V2001
NOP
SUB V2002
NOP
MUL V2003
NOP
OUT V2004
DirectSOFT can display this as multiple rungs, but the accumulator operations execute only when X1 is on because each NOP preserves the Boolean-stack condition established by STR X1.
Choose a Documentation Method
| Method | Result | Constraint |
|---|---|---|
| Split a final box into a separate rung without an execution instruction | DirectSOFT can merge the box back into the preceding rung and combine the comments | The comment may move away from the operation it describes. |
Insert NOP instructions |
Creates separate displayed rungs where rung comments can be attached | Adds instructions to program memory and does not establish a new Boolean condition. |
| Add a starting contact to every rung | Makes each execution condition explicit | Adds contacts and program words. |
| Use element descriptions and rung comments | Documents addresses and non-obvious logic using existing DirectSOFT facilities | Does not provide a distinct comment attached directly to every box or graphical row. |
Do not treat MLS/MLR logic as a row-comment mechanism. The evidence does not establish that it creates independent documentation boundaries or resets the Boolean condition between accumulator boxes.
Procedure for Separating Accumulator Operations
- Identify the instruction that establishes the Boolean execution condition, such as the evidenced
STR X1. - Trace every following accumulator box and output until another instruction explicitly establishes or changes the Boolean condition. Do not infer a reset from the displayed rung boundary.
- Insert
NOPonly where a separate displayed rung and rung comment justify the added program word. - Place a conspicuous warning on each artificial boundary stating that the Boolean condition is inherited from the preceding logic.
- Place the functional explanation on the rung containing the accumulator operation it describes.
- If independent execution is required, start the rung with an explicit contact instead of relying on
NOP.
Verification Before Commissioning
Inspect the mnemonic sequence as well as the ladder display. Confirm that each documented section has the intended Boolean source and that no output relies unintentionally on stack state from preceding logic.
Test the controlling condition in both states. For the evidenced sequence, verify that LD V2000, ADD V2001, SUB V2002, MUL V2003, and OUT V2004 execute when X1 is on and do not execute when it is off. Then confirm that accepting edits does not cause DirectSOFT to merge the separated logic or relocate its comments.
Dense parallel branches introduce an additional documentation problem: mnemonic generation is organized by operations rather than by a simple graphical row. A graphical row can appear in several parts of the mnemonic sequence, so attach explanations to contacts, coils, boxes, or complete rungs instead of assuming a one-to-one row-to-mnemonic mapping.
FAQ
Does a DirectSOFT NOP start a new execution condition?
No. NOP performs no Boolean operation, so instructions after it continue using the existing Boolean-stack condition.
Can a DirectSOFT output coil execute without a contact on its displayed rung?
Yes. It can use Boolean-stack state established by preceding logic, even when the ladder display makes the output appear connected directly to the power rail.
How can I document individual boxes in a long DirectSOFT rung?
Use element descriptions and rung comments where possible. If separate displayed rungs are necessary, insert NOP boundaries, label the inherited execution condition clearly, and verify the resulting mnemonic sequence.