User Tools

Site Tools


en-us_products:mp_studio:ladder_editing

MP STUDIO 2 Phase 3 · Ladder Editing

한국어 | English

This page describes how to place contacts, coils and wires on the ladder canvas and enter their addresses, how to edit and move rungs, and how to use find and replace and the navigation features.

Ladder Symbols

Select a cell, then press a function key or a symbol rail button to place a symbol in that cell.

Figure 1. Ladder symbols placed with the function keys

In Figure 1, the first rung is P0 (NO) → rising edge (P) → P1 (NC) → NOT → P32 coil, the second rung is P2 → falling edge (N) → SET M0, and the third rung is P3 → RESET M0.

Shortcut Symbol Action Cursor after placing
F2 NO contact Passes power when the address is ON. Stays
F3 NC contact Passes power when the address is OFF. Stays
F5 Horizontal line Carries power from the left to the cell on the right. 1 cell right
F6 Vertical line Turns on or off a vertical line from the right edge of the cell to the row below. 1 cell down
F7 SET coil Turns the address ON and keeps it ON when the condition turns ON. Right end of the row
F8 RESET coil Turns the address back OFF when the condition turns ON. Right end of the row
F9 Output coil Writes the ON/OFF state of the condition to the address on every scan. Right end of the row
F10 NOT Inverts the power state before it. 1 cell right
F11 Rising edge Passes power for only the one scan in which the preceding condition goes from OFF to ON. Stays
F12 Falling edge Passes power for only the one scan in which the preceding condition goes from ON to OFF. Stays

Coils (F7, F8 and F9) are always placed at the right end of the row, and the empty cells between the preceding symbol and the coil are filled with horizontal lines automatically. You cannot place a symbol on top of a function block.

Entering Addresses

  1. Select a contact or coil cell and press Enter or double-click it.
  2. In ① Address of the Edit Contact (or Edit Coil) window, enter an address such as P0, M10 or T0.
  3. If needed, also enter ② Symbol and ③ Comment, then click OK. The symbol and comment you enter are registered as the symbol of that address and are also shown on other cells that use the same address.

Figure 2. Entering the address, symbol and comment in the Edit Contact window

  • If you start typing on a cell, the input window opens with what you typed already filled in.
  • If you type an address on an empty cell, the Insert Contact (NO) window opens, and clicking OK places an NO contact with that address.
  • Press Shift+Enter to edit the address of the selected cell directly in the symbol table.

The address system is described in Phase 5 · Memory and Symbols.

Series and Parallel Connections

Contacts placed one after another in the same row form a series (AND) condition. Joining a contact in the row below to the row above with a vertical line forms a parallel (OR) condition.

  1. In row 1, place a P0 NO contact and a P32 output coil.
  2. In the first cell of row 2, place a P1 NO contact.
  3. Select the first cell of row 1 (P0) and press F6 to draw a vertical line down to the row below.

Figure 3. A rung with P0 and P1 connected in parallel

The vertical line is drawn at the right edge of the cell. You cannot draw a vertical line in the last column of a row or after a coil.

Self-Holding Circuit

To keep the output ON even after the start input was ON only briefly, put a contact of the output itself in parallel.

Figure 4. A self-holding circuit with start P0, stop P1 and output P32

  • ① P0 (NO): start input
  • ② P32 (NO): the self-holding contact of the output (in parallel with P0 through the vertical line)
  • ③ P1 (NC): stop input. When it turns ON, power is cut.
  • ④ P32 (output coil): output

SET and RESET

A SET coil turns its address ON and keeps it ON once the condition has been ON, and a RESET coil turns that address back OFF. Use SET and RESET for the same address as a pair.

Figure 5. M0 set by P0 and reset by P1

Edge Contacts

A rising edge (F11) passes power for one scan at the moment the preceding condition goes from OFF to ON, and a falling edge (F12) at the moment it goes from ON to OFF. Use them for actions that must run only once, such as a circuit that increases a value by one each time a button is pressed. Put the edge directly after the contact whose change you want to catch (for example P2).

The name of an edge cell is the bit that remembers the previous state. If you leave the name empty, an automatic name (#Edge…) is used. If you use an address that the device overwrites on every scan, such as an input (P) address, as the name, the cell turns red, so unless you have a specific reason, leave the name empty.

Figure 6. When rising and falling edges pass power

Notes and Bookmarks

Select a horizontal line cell and press Enter to open the Write Text in Wire Cell window. Text starting with // becomes a note, and text in the form [name] becomes a bookmark. Press Ctrl+B to open the Insert Bookmark window, where you can insert a bookmark by entering just its name (leave the name empty to delete it).

Figure 7. The bookmark [Motor run] on row 0 and a note on row 2

Bookmarks are listed in the Mark list at the bottom of the Functions panel; click a line in the list to go to that row. You can show or hide the list with View → Bookmark List.

Editing Cells and Lines

Shortcut Menu Action
Ctrl+L Edit → Insert Line Inserts an empty row at the cursor row and pushes the rows below down. If several rows are selected, inserts that many rows.
Ctrl+D Edit → Delete Line Deletes the cursor row. If several rows are selected, deletes those rows.
Ctrl+Insert Edit → Insert Cell Inserts an empty cell at the cursor and pushes the cells to the right.
Ctrl+Delete Edit → Delete Cell Deletes the cursor cell and pulls the cells on the right to the left.
Delete Edit → Delete Clears the contents of the selected cells.

Figure 8. Before inserting a line (cursor on row 1)

Figure 9. After inserting an empty row at row 1 with Ctrl+L

If you insert an empty row in the middle of a rung (between parallel branches), the rung is broken and cells may turn red. In that case, undo with Ctrl+Z.

Selecting

  • Drag with the mouse or Shift+arrow keys: select a rectangular area
  • Shift+click: select the rectangle from the cursor to the clicked cell
  • Ctrl+click: add or remove individual cells
  • Click or drag the row numbers: select whole rows
  • Ctrl+A (Edit → Select All): select the whole program
  • Ctrl+arrow keys: move the selected cells in that direction

Figure 10. Cells selected as a rectangular area

Copy, Paste and Undo

Shortcut Menu Action
Ctrl+C / Ctrl+X Edit → Copy / Cut Copies or cuts the selected cells.
Ctrl+V Edit → Paste Pastes starting at the cursor, overwriting the cells there.
Ctrl+Shift+V Edit → Paste as New Rows Inserts the copied rows at the cursor row. The rows below move down.
Ctrl+Z / Ctrl+Y Edit → Undo / Redo Undoes or redoes an edit.

When a paste overwrites existing cells, a notice shows how many cells were overwritten. If that was not intended, undo with Ctrl+Z.

Moving Rungs

Press Alt+↑ or Alt+↓ (Edit → Move Rung Up / Move Rung Down) to swap the rung under the cursor with the rung above or below it. Empty rows between rungs stay where they are, and one Ctrl+Z undoes the move.

Figure 11. Before moving a rung (cursor on the P1 rung)

Figure 12. After moving the P1 rung up with Alt+↑

A bookmark row is swapped like a rung.

Right-Click Menu

Right-click a cell or press Shift+F10 to open the cell menu.

Figure 13. The right-click menu of a cell

The menu contains Download and Monitoring, Insert Function and Insert Bookmark, Undo and Redo, Cut, Copy, Paste and Delete, inserting and deleting lines and cells, and Text Search. On a cell with an address, Add to Watch (address) is shown at the bottom.

Find and Replace

Press Ctrl+F or click the find box in the command bar to open the Text Search window.

Figure 14. The Text Search window with all matching cells highlighted

  1. In ① Address to find, enter the text to look for, such as P0 or M10.
  2. Use ③ ↓ Next and ↑ Previous to move between matches. The position and number of matches (for example 1 / 3 matches) are shown, and ④ the matching cells are all highlighted on the canvas.
  3. To replace, enter ② Replace with and click Replace or Replace All. If you leave Replace with empty, the matched text is deleted.
Option Action
Match case Distinguishes uppercase and lowercase letters.
Also search symbols & comments Searches symbol names and comments as well as addresses.
Match whole word Finds only cells whose whole address matches what you typed.
Function block name Searches by function block name (for example TON).
In selection only When two or more cells are selected in the ladder, finds and replaces only within those rows.

If Replace All for M1 would also change other addresses that only partly match, such as M10, a confirmation is shown. Replace Whole Addresses Only replaces only cells whose whole address matches, and Replace All Anyway also replaces the partly matching addresses. Cancel replaces nothing. Function blocks can be found by the beginning of their name, but cannot be replaced.

Figure 15. The Replace All confirmation when other addresses would also change

Shortcut Menu Action
Ctrl+G Search → Go to Row Goes to a row number. You can also enter a bookmark name, symbol name or address to go there.
F4 / Shift+F4 Search → Next Use of Address / Previous Use of Address Goes to the next or previous cell that uses the same address as the cursor cell.
Alt+← / Alt+→ Search → Back / Forward Returns to where you were before a long jump (find, go to row, bookmark and so on), or goes forward again.
Home / End — Goes to the first or last rung of the program.
PageUp / PageDown — Moves one screen at a time.

Figure 16. The Go to Row window

Moves made with the arrow keys or by clicking are not recorded in the Back and Forward history. Opening another project clears the history.

en-us_products/mp_studio/ladder_editing.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki