====== MP STUDIO 2 Phase 5 · Memory and Symbols ====== [[products:mp_studio:memory_symbols|한국어]] | **English** An address used in the ladder consists of a memory area name and a number. This page describes the memory areas and their notation, data memory sizes and retentive settings, the symbol table, and how to check which data is used. ===== Memory Areas ===== {{ :en-us_products:mp_studio:memory-areas.svg?1000 |Figure 1. MP STUDIO 2 memory areas }} ^ Area ^ Name ^ Use ^ Basic unit ^ | ''P'' | I/O | Digital input and output points of the device | Bit | | ''M'' | Internal relay | Bits used inside the program | Bit | | ''D'' | Data | Numeric values | Word | | ''T'' | Timer | Timer current values | Word | | ''C'' | Counter | Counter current values | Word | | ''R'' | Real | Decimal values (1 = 2 words) | Real | The range of I/O addresses differs from model to model. If you use an I/O address that the model does not have, the cell turns red. ===== Bit, Byte, Word and Double Word Notation ===== The same memory can be read and written in units of bits, bytes (B), words (W) or double words (D). Put the unit letter in front of the area name. ^ Area ^ Bit ^ Byte ^ Word ^ Double word ^ | P | ''P0'' | ''BP0'' | ''WP0'' | ''DP0'' | | M | ''M0'' | ''BM0'' | ''WM0'' | ''DM0'' | | D | — | ''BD0'' | ''D0'' | ''DD0'' | | T | — | ''BT0'' | ''T0'' | ''DT0'' | | C | — | ''BC0'' | ''C0'' | ''DC0'' | | R | — | — | — | ''R0'' (real) | {{ :en-us_products:mp_studio:address-views.svg?1000 |Figure 2. What bit, byte and word notation refer to in the P area }} Eight bit addresses make one byte. For example, ''P0'' to ''P7'' are ''BP0'', and ''P32'' to ''P39'' are ''BP4''. Double word numbers overlap in word steps: ''DD0'' occupies ''D0'' and ''D1'', and ''DD1'' occupies ''D1'' and ''D2''. Be careful not to use overlapping double words together. ===== System Bits and User Variables ===== ^ Notation ^ Meaning ^ | ''@n'' | A pulse that is ON for one scan every ''n''×10 ms. Example: ''@100'' is ON for one scan every second. | | ''@Fn'' | A blink that toggles ON/OFF every ''n''×10 ms. Example: ''@F100'' has a 2-second period. | | ''#name'' · ''##name'' · ''###name'' | User bit, word and double word variables used by name | ===== Data Memory ===== Select **Setting → Data Memory** to open the **Data Memory** window, where you set the size of each area and the retentive ranges. {{ :en-us_products:mp_studio:data-memory-dialog-marked.svg?720 |Figure 3. The Data Memory window }} * **① Available data:** the remaining memory (WORD) and the total size. If it is below 0 it is shown in red, and you need to reduce the area sizes. * **② Size (WORD):** the sizes of the M, D, C, T and R areas. * **③ Retentive (EEPROM) range:** check **Use** and enter the start and end numbers to keep the values in that range when the power is turned off. * **④ EEPROM update cycle:** how often the retentive values are written to EEPROM (×10 ms; 100 = 1000 ms). * **⑤ USER and SERIAL:** the user memory used by function blocks (USER MEMORY) and the send and receive buffer size of each serial channel. * **⑥ Default:** returns to the default sizes of the current model. The data memory settings are saved with the project. If you use an address outside the area size (for example a ''D'' number beyond the D area size), the cell turns red and you cannot download or monitor. ==== When You Change the Model ==== When you change the model in the **Device Select** window, check **Reset the data memory sizes to this model's defaults.** to change the memory sizes to the defaults of the new model as well. If you leave it unchecked, the current settings are kept. {{ :en-us_products:mp_studio:device-select-mpa-marked.svg?700 |Figure 4. Selecting the model and expansion modules of an MPA model }} For MPA models, select **① MPA**, then choose **② Model** and **③ the expansion modules** (**Analog Input** X to X5, **Analog Output** Y to Y4, **PT100Ω Input** F to F5, **Pulse Output** K to K4). **④ Device Name** shows the name including the module configuration (for example ''MPA-16A16R(T)-X''), along with the CPU and the P area size. If you choose a combination that cannot be fitted, the reason is shown at the bottom of the window. ===== Symbol Table ===== Symbols are names and descriptions attached to addresses. Select **Setting → Symbol** or click the **Symbol** button in the top band to open the **SYMBOL TABLE** window. {{ :en-us_products:mp_studio:symbol-table-marked.svg?860 |Figure 5. The SYMBOL TABLE window }} - Choose an area in **① the memory area tabs** (P Memory, M Memory, D Memory and so on) to show only the symbols of that area. The number next to a tab is the number of registered symbols. - In **② the add row**, enter the address, symbol name and comment, and click **Add (Enter)**. - Type in **③ Text Search** to show only the matching symbols. - Click a cell in the table to edit a registered symbol. Select a row and press ''Delete'' to delete it. - Use **④ Import** and **Export** at the top to read or save a CSV file. When importing, choose whether to **Merge** with the current table or **Replace** it. - Changes are applied to the project only when you click **OK**. The number of symbols to be saved is shown at the bottom of the window. Symbols of addresses that are not used in the ladder are marked **Not used in ladder**. If the same symbol name is used for several addresses, or a name cannot be used, the number of entries **to review** and the reason are shown. ==== Showing Symbols on the Ladder ==== Turn on **View → Show Symbols** and **View → Show Comments** to show symbol names and comments above and below the cells. {{ :en-us_products:mp_studio:symbol-display-on.png?930 |Figure 6. The ladder with symbol names and comments shown }} ===== Used Data ===== Select **Run → Used Data** or click the **Used** button in the top band to open the **Used Memory** window. In the memory grid of each area you can see which locations the program uses. {{ :en-us_products:mp_studio:use-data-viewer-marked.svg?425 |Figure 7. The memory grid of the Used Memory window (D Memory) }} * **① Area tabs:** choose the area to view: M Memory, T Memory, D Memory, C Memory or R Memory. * **② Used cells:** the bits used by the program are filled in. In the figure, ''D0'' to ''D2'' are in use. * **③ Usage count:** the number of used bits, the total number of bits in the area, and the number of rows. Hover over a grid cell to see its address. Use **Rows shown** at the top right to change how many rows are visible at once. Use this window to check that a new address does not overlap with locations already in use. ===== Related Pages ===== * [[:en-us_products:mp_studio:download#program_memory|Phase 6 · Program Memory]] * [[:en-us_products:mps|MPS Series]] and [[:en-us_products:mpa|MPA Series]] — I/O point names of each product [[:en-us_products:mp_studio|← Back to the MP STUDIO 2 User Manual]]