====== MPINO STUDIO 2 Phase 3 · Ladder Editing Basics ====== This page explains ladder-cell editing, writing memory values, contacts and coils, box functions, series and parallel connections, edges, and a self-holding circuit. {{ :en-us_products:mpino_studio2:ladder-learning-path.svg?1000 |Ladder editing sequence }} > **About screenshots:** Screenshots use the Korean user interface. Button positions, icons, and keyboard shortcuts are the same. ===== 1. Ladder Editing Screen ===== Read ladder logic from left to right. A coil operates when the condition formed by the contacts reaches it through the connecting lines. A circuit arranged on one line is called a **rung**. {{ :products:mpino_studio2:ladder-editor-toolbar-marked.svg?1000 |Figure 1. Locations of ① the toolbar, ② the ladder grid, and ③ the grid status bar }} * **① Toolbar:** Select contacts, connecting lines, coils, and edges. * **② Ladder grid:** Place elements in cells and connect the circuit. * **③ Grid status bar:** Shows the selected cell's coordinates and type. ''R1 C0'' is the first cell on the first row. {{ :en-us_products:mpino_studio2:ladder-tool-map.svg?1000 |Ten ladder tools and their default shortcuts }} You can place a tool in any of these ways: - Select a cell and press the tool's shortcut. - Select a cell and click the tool on the left toolbar. - Drag the toolbar button onto the target cell. ===== 2. Select and Move Between Ladder Cells ===== Click the cell that you want to edit, or move the selection with the arrow keys. Hold ''Shift'' and press an arrow key to select multiple cells. ^ Action ^ Result ^ | Mouse click | Select the clicked cell | | ''↑'' ''↓'' ''←'' ''→'' | Move the selection by one cell | | ''Shift + Arrow key'' | Select a rectangular range from the current cell | | ''Enter'' or double-click | Open the editor for the selected contact, edge, or coil | | ''Delete'' | Clear the selected element and its value, leaving an empty cell | When editing a contact or coil, enter an address or registered symbol. Matching items appear in the autocomplete list as you type. {{ :products:mpino_studio2:ladder-cell-edit-modal.png?1000 |Figure 2. Ladder-cell editor for entering a contact or coil address }} > **Shortcut focus:** Use arrow keys and ladder shortcuts such as ''F2'' through ''F12'' while the ladder grid has focus. When the code editor has focus, arrow and clipboard shortcuts edit the code. ===== 3. Write a Value to Memory ===== You can write a memory value from the selected ladder cell directly to the running board. **Right-click the ladder cell → Write Value to Memory**, or press ''Ctrl + Shift + W'' while the ladder grid has focus. {{ :products:mpino_studio2:memory-force-popup-marked-en.svg?1000 |Write Value to Memory popup beside the selected cell }} ^ Marker ^ Screen item ^ How to use it ^ | **①** | Monitoring | Turn it on here if it is off. The **Write** button becomes available when monitoring communication is connected to the board. | | **②** | Address and current value | The selected cell's address is filled in automatically. If a function box contains several addresses, choose one from the list. For an empty cell, enter an address yourself. The current value comes from the board during monitoring. | | **③** | Value and Write | Enter a value and select **Write** or press ''Enter''. After a successful write, only the value field is cleared so you can write another value. | This popup accepts **M, D, C, T, and R** addresses. **P addresses cannot be written here.** The value changes on the running board and may affect an output or control condition. Check the address and value before writing. This one-address popup differs from [[en-us_products:mpino_studio2:menus_settings#run_menu|Run → Memory Write List]], where you register multiple addresses. Close the popup with ''Esc'', a click outside it, or **✕**. ===== 4. Insert, Delete, and Copy Cells ===== ''Delete'', which clears a cell, behaves differently from ''Ctrl + Delete'', which pulls following cells to the left. ^ Command ^ Shortcut ^ Result ^ | Clear cell | ''Delete'' | Change only the selected cell to an empty cell | | Insert cell | ''Insert'' | Create an empty cell at the selection and move cells to the right | | Delete cell | ''Ctrl + Delete'' | Remove the selected cell and pull following cells left | | Add row | ''Alt + Insert'' | Add an empty row above the selected row | | Delete row | ''Alt + Delete'' | Delete the selected row and pull lower rows up | Right-click a ladder cell to select **Insert Cell, Delete Cell, Add Row,** or **Delete Row**. The shortcuts in the table run the same commands. {{ :products:mpino_studio2:chgrid-context-menu.png?240 |Figure 3. Ladder-cell context menu }} ==== Insert and delete cells ==== Insert Cell moves cells to the right from the selected position up to the nearest available space. If no space is available on the right, the circuit remains unchanged and a message appears. A coil at the end of the row does not move. {{ :products:mpino_studio2:chgrid-cell-insert-before.png?420 |Figure 4. Before inserting a cell }} {{ :products:mpino_studio2:chgrid-cell-insert-after.png?420 |Figure 5. After inserting a cell }} Delete Cell removes the selected cell and pulls the cells on its right to the left. The coil stays at the end of the row, and a gap before the coil is filled with a connecting line. {{ :products:mpino_studio2:chgrid-cell-delete-before.png?420 |Figure 6. Before deleting a cell }} {{ :products:mpino_studio2:chgrid-cell-delete-after.png?420 |Figure 7. After deleting a cell }} ==== Add and delete rows ==== Add Row creates an empty row above the selected row. Vertical lines that crossed the insertion point continue through the new row. {{ :products:mpino_studio2:chgrid-row-add-before.png?300 |Figure 8. Before adding a row }} {{ :products:mpino_studio2:chgrid-row-add-after.png?300 |Figure 9. After adding a row }} Delete Row removes the entire selected row and pulls the rows below it upward. Vertical lines that crossed the deleted row reconnect to the remaining circuit. {{ :products:mpino_studio2:chgrid-row-delete-before.png?300 |Figure 10. Before deleting a row }} {{ :products:mpino_studio2:chgrid-row-delete-after.png?300 |Figure 11. After deleting a row }} ==== Clipboard and undo ==== * ''Ctrl + C'': Copy the selected cells * ''Ctrl + X'': Cut the selected cells * ''Ctrl + V'': Paste at the selected position * ''Ctrl + Z'': Undo the last ladder edit Copied cells can be pasted into another ladder tab or into a separately running MPINO Studio 2 window. ===== 5. Connect Horizontal and Vertical Lines ===== A horizontal line connects cells on the same row. A vertical line joins upper and lower branches. ^ Tool ^ Shortcut ^ Operation ^ | Horizontal line | ''F5'' | Change the selected empty cell into a left-to-right connection | | Vertical line | ''F6'' | Toggle a downward connection on the right side of the selected cell | A vertical line is not a separate cell. It adds a connection from the right edge of the selected cell to the row below. Press ''F6'' again at the same position to remove it. Use horizontal lines to form a series circuit on one row and vertical lines to join the branches of a parallel circuit. ===== 6. Define and Create NO, NC, and NOT Contacts ===== NO and NC contacts read an ON/OFF memory state or the result of a comparison. A NOT contact reverses the condition calculated before it. {{ :en-us_products:mpino_studio2:ladder-contact-logic.svg?1000 |Comparison of NO, NC, and NOT contacts }} ^ Contact ^ Shortcut ^ When the condition is OFF ^ When the condition is ON ^ | NO contact | ''F2'' | Does not conduct | Conducts | | NC contact | ''F3'' | Conducts | Does not conduct | | NOT contact | ''F10'' | Following condition is ON when the preceding condition is OFF | Following condition is OFF when the preceding condition is ON | Select a cell, press ''F2'' or ''F3'', and then press ''Enter''. Enter a bit address such as ''P0'', ''M0'', or ''D0.1'', or enter a registered symbol. See [[en-us_products:mpino_studio2:memory|Phase 2 · Understand Memory]] for memory-address formats. ==== Enter comparisons ==== You can enter a comparison instead of an address in an NO or NC contact. For example, ''D0 > 10'' is true when D0 is greater than 10. A comparison in an NC contact conducts when the expression is false. ^ Operator ^ Condition ^ | ''>'' | The left value is greater than the right value | | ''<'' | The left value is less than the right value | | ''>='' | The left value is greater than or equal to the right value | | ''<='' | The left value is less than or equal to the right value | | ''=='' | Both values are equal | | ''!='' | The values are different | Enter one comparison in each contact. To combine several comparisons, connect separate contacts in series or parallel instead of entering ''&&'' or ''||''. {{ :products:mpino_studio2:ch4-cmp-monitor.png?420 |Figure 12. Comparison contact with the condition D0 greater than 10 }} ==== NOT contact ==== A NOT contact reverses the condition calculated up to its position. It does not take an address and is placed with ''F10''. When the preceding condition is OFF, the condition after the inversion is ON; when the preceding condition is ON, the condition after it is OFF. Use no more than one NOT contact in a branch. ===== 7. Use Positive and Negative Edges ===== A standard contact conducts while its condition remains true. An edge contact conducts for one scan only when the input changes state. {{ :en-us_products:mpino_studio2:ladder-edge-timing.svg?1000 |Ladder circuits and one-scan behavior of positive and negative edges }} ^ Contact ^ Shortcut ^ Conducting point ^ | Positive Edge | ''F11'' | One scan when the input changes from OFF to ON | | Negative Edge | ''F12'' | One scan when the input changes from ON to OFF | After placing an edge cell, enter the bit address or symbol whose change will be detected. Each edge cell tracks its previous state automatically, so you do not need a separate memory address for that state. Use Positive Edge for an action that runs once when a button is pressed. Use Negative Edge for an action that runs once when a button is released. ===== 8. Create an Output Coil ===== A standard output coil writes the result calculated by its contacts to a bit address on every scan. The coil address is ON while the condition is ON and OFF while the condition is OFF. - Select a cell on the row where the coil will be placed. - Press ''F9'' or select **Output Coil** from the toolbar. - Press ''Enter'' or double-click to open the editor. - Enter the bit address or symbol that will store the result. The output coil is placed automatically at the right end of its row, and empty cells before it are connected with horizontal lines. {{ :products:mpino_studio2:ch4-coil-off.png?300 |Figure 13. P32 output coil OFF while M0 is OFF }} {{ :products:mpino_studio2:ch4-coil-on.png?300 |Figure 14. P32 output coil ON while M0 is ON }} > **Check the output address:** Before using a P address in an output coil, confirm under **Settings → Ladder Pin Map Settings** that it is an output on the selected board. ===== 9. Create SET and RESET Coils ===== A standard output coil follows its condition continuously. SET and RESET coils store a value when their conditions turn ON. {{ :en-us_products:mpino_studio2:ladder-coil-behavior.svg?1000 |How output, SET, and RESET coils store values }} ^ Coil ^ Shortcut ^ When the condition turns ON ^ After the condition returns to OFF ^ | SET coil | ''F7'' | Store ON in the target bit | Remains ON | | RESET coil | ''F8'' | Store OFF in the target bit | Remains OFF | ''M0 NO → P32 SET'' stores ON in P32 when M0 turns ON. P32 stays ON after M0 returns to OFF. {{ :products:mpino_studio2:ch4-set-on.png?300 |Figure 15. SET condition stores ON in P32 }} {{ :products:mpino_studio2:ch4-set-hold.png?300 |Figure 16. P32 remains ON after the SET condition turns OFF }} To turn the stored value off, enter the same address in a RESET coil. In ''M1 NO → P32 RESET'', P32 is stored as OFF when M1 turns ON. {{ :products:mpino_studio2:ch4-reset-pair.png?360 |Figure 17. SET circuit that turns P32 on and RESET circuit that turns it off }} When using a SET coil, also provide a RESET condition that releases the stored value. ===== 10. Create a Box Function ===== A box function runs a timer, counter, calculation, transfer, or another command when the condition calculated on its left is ON. - Select an empty cell on the row where the box function will be placed. - Press ''Ctrl + Enter'' or select **Box Function** from the left toolbar to open the editor. - Select a category and command to place the command syntax in the input field. - Enter the addresses and values, then select **OK**. {{ :products:mpino_studio2:ch5-palette.png?760 |Figure 18. Box Function editor for selecting a category and command }} A box function is placed at the right end of its row like an output coil. It runs while the contacts on its left are ON. With no contact on the left, it runs on every scan. **[[:en-us_products:mpino_studio2:box_functions#box_function_list|View the box function list →]]** ===== 11. Series and Parallel Circuits ===== {{ :en-us_products:mpino_studio2:ladder-wiring-logic.svg?1000 |Comparison of a series AND circuit and a parallel OR circuit }} * **Series connection:** Power reaches the next cell only when every contact conducts. In ''M0 NO → M1 NO → P32 coil'', P32 turns ON only when both M0 and M1 are ON. * **Parallel connection:** Power continues after the branches rejoin when any connected branch conducts. If M0 and M1 are connected in parallel, P32 turns ON when either one is ON. {{ :products:mpino_studio2:ch4-no-parallel-on.png?420 |Figure 19. OR circuit with M0 and M1 connected in parallel }} Combining series and parallel connections can express a condition such as “(M0 or M1) and M2.” Read from the left, and separate the conditions at the points where parallel branches split and rejoin. ===== 12. Create a Self-Holding Circuit ===== A self-holding circuit connects an output coil's auxiliary contact in parallel with the start contact so that the output remains ON after the start signal disappears. {{ :en-us_products:mpino_studio2:ladder-self-hold.svg?1000 |Idle, start, hold, and stop sequence of a self-holding circuit }} Build the circuit in this order: **[M0 NO ∥ P32 NO] → M1 NC → P32 output coil**. - Connect the M0 NO contact and P32 NO contact in parallel. - Connect the M1 NC contact in series after the parallel branches. - Place the P32 output coil at the right end of the row. - When M0 turns ON, P32 turns ON and the P32 auxiliary contact also conducts. - After M0 returns to OFF, the P32 auxiliary contact maintains the conducting path. - When M1 turns ON, the NC contact opens and P32 turns OFF. {{ :products:mpino_studio2:ch4-selfhold-on.png?420 |Figure 20. P32 turns ON through the M0 start contact }} {{ :products:mpino_studio2:ch4-selfhold-hold.png?420 |Figure 21. P32 auxiliary contact maintains the circuit after M0 turns OFF }} M0 and M1 are internal-memory addresses used to explain the sequence. Replace them with P input addresses for the selected board when using physical input terminals. ===== 13. Ladder Editing Shortcuts ===== You can change shortcuts under **File → Preferences → Shortcuts**. ^ Category ^ Shortcut ^ Action ^ | Move | ''↑'' ''↓'' ''←'' ''→'' | Move the selected cell | | Range selection | ''Shift + Arrow key'' | Extend the rectangular selection | | Edit cell | ''Enter'' or double-click | Open the address and symbol editor | | Clear cell | ''Delete'' | Delete the selected element and its value | | Insert/delete cell | ''Insert'' / ''Ctrl + Delete'' | Insert an empty cell / delete and pull cells left | | Add/delete row | ''Alt + Insert'' / ''Alt + Delete'' | Add a row above / delete the current row | | Copy/cut/paste | ''Ctrl + C'' / ''Ctrl + X'' / ''Ctrl + V'' | Edit the selected cells | | Undo | ''Ctrl + Z'' | Undo the last ladder edit | | Write Value to Memory | ''Ctrl + Shift + W'' | Open the popup for writing the selected cell's memory value to the board | | Contacts | ''F2'' / ''F3'' | NO contact / NC contact | | Lines | ''F5'' / ''F6'' | Horizontal line / vertical line | | Coils | ''F7'' / ''F8'' / ''F9'' | SET / RESET / standard output coil | | NOT contact | ''F10'' | Invert the condition calculated before it | | Edges | ''F11'' / ''F12'' | Positive Edge / Negative Edge | ===== 14. Troubleshooting ===== ^ Symptom ^ What to check ^ | Pressing a shortcut does not change the cell. | Select a cell in the ladder grid first and confirm that the grid has focus. | | An address cannot be entered in a contact or coil. | Confirm that it is a bit address, then check its format and range in the Phase 2 memory documentation. | | A cell cannot be inserted. | Check for an empty cell or horizontal line to the right of the selected cell. | | Pressing ''Delete'' does not pull following cells left. | ''Delete'' clears a cell. Use ''Ctrl + Delete'' to delete it and pull following cells left. | | A value set by a SET coil remains ON. | Check for a RESET coil and RESET condition that use the same address. | | The self-holding circuit stops as soon as the start signal turns OFF. | Check that the output's NO auxiliary contact is connected in parallel with the start contact. | | The build reports a NOT-contact error. | Check whether the same branch contains more than one NOT contact. | ===== Related Documentation ===== * [[en-us_products:mpino_studio2:menus_settings|Phase 7 · Menus and Preferences]] * [[en-us_products:mpino_studio2:monitoring|Phase 6 · Serial and Ladder Monitoring]] * [[en-us_products:mpino_studio2:code_editor|Phase 5 · Editing Arduino Code]] * [[:en-us_products:mpino_studio2:first_project|Phase 1 · Create Your First Project]] * [[:en-us_products:mpino_studio2:memory|Phase 2 · Understand Memory]] * [[:en-us_products:mpino_studio2|MPINO STUDIO 2 User Manual]] [[:en-us_products:mpino_studio2:memory|← Phase 2 · Understand Memory]] | [[:en-us_products:mpino_studio2|Back to the MPINO STUDIO 2 User Manual]]