User Tools

Site Tools


en-us_products:mpino_studio2:memory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en-us_products:mpino_studio2:memory [2026/09/08 22:56] – 바깥 편집 127.0.0.1en-us_products:mpino_studio2:memory [2026/09/14 12:24] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== MPINO STUDIO 2 Phase 2 · Understand Memory ====== ====== MPINO STUDIO 2 Phase 2 · Understand Memory ======
  
-This page explains the differences between **P, M, D, C, T, and R memory**, address notation, memory-region settings, the Used Memory Map, and time-driven special-bit memory.+This page explains the differences between **P, M, D, C, T, and R memory**, address notation, memory-region settings, where memory is used in a project, and special-bit memory.
  
-^ Reference board ^ Completion goal ^ +{{ :en-us_products:mpino_studio2:memory-learning-path.svg?1000 |Memory understanding sequence }}
-| MPINO-8A4R(T)-S | Identify memory addresses and locate where they are used in a project | +
- +
-{{ :en-us_products:mpino_studio2:memory-learning-path.svg?1000 |Phase 2 memory learning path }}+
  
 > **About screenshots:** Screenshots use the Korean user interface. Button positions, icons, and keyboard shortcuts are the same. > **About screenshots:** Screenshots use the Korean user interface. Button positions, icons, and keyboard shortcuts are the same.
Line 27: Line 24:
 | ''T'' | WORD | Current timer value (signed internal WORD memory) | -32,768 to 32,767 | | ''T'' | WORD | Current timer value (signed internal WORD memory) | -32,768 to 32,767 |
 | ''R'' | Floating Point (32 bits) | Internal Floating Point memory (real-number memory) | Approximately -3.4028235E38 to +3.4028235E38 | | ''R'' | Floating Point (32 bits) | Internal Floating Point memory (real-number memory) | Approximately -3.4028235E38 to +3.4028235E38 |
 +
 +==== Sharing Memory Between Arduino Code and Ladder Logic ====
 +
 +Ladder logic and Arduino code use the same storage for P, M, D, C, T, and R memory. A value written on one side can be read from the same address on the other side.
 +
 +{{ :en-us_products:mpino_studio2:memory-sharing.svg?1000 |Arduino code and ladder logic sharing the same PLC memory }}
 +
 +In Arduino code, use the ladder address name directly or write it in array form. Both forms refer to the same memory.
 +
 +  * Ladder ''M0'' ↔ Arduino code ''M0'' or ''M[0]''
 +  * Ladder ''D0'' ↔ Arduino code ''D0'' or ''D[0]''
 +  * Ladder ''R0'' ↔ Arduino code ''R0'' or ''R[0]''
 +
 +<code cpp>
 +void loop() {
 +  M0 = true;    // Sets the M0 bit contact in the ladder to ON.
 +  D0 = 120;     // Shares the D0 integer between ladder and Arduino code.
 +  R0 = 23.5f;   // Shares the R0 floating-point value between both sides.
 +
 +  ladderLoop(); // Runs the ladder logic with the values stored above.
 +}
 +</code>
 +
 +A value changed by ladder logic can be read in Arduino code after ''ladderLoop()'' finishes. Within one scan, read and write order follows the position of the ''ladderLoop()'' call inside ''loop()''.
 +
 +> **I/O mapping caution:** The P region and C addresses mapped to board functions are synchronized with physical I/O during a ladder scan. Before sharing these regions with Arduino code, check the address and I/O direction under **Settings → Ladder Pin Map Settings**.
  
 > **P address caution:** P addresses can be reviewed and changed in **Board Pin Editing**. Their I/O directions and physical terminals follow the definition of the board selected for the project. > **P address caution:** P addresses can be reviewed and changed in **Board Pin Editing**. Their I/O directions and physical terminals follow the definition of the board selected for the project.
Line 38: Line 61:
 You can change the number of addresses used under **Settings → Memory Region Settings**. (Shortcut: ''Ctrl + Shift + M'') You can change the number of addresses used under **Settings → Memory Region Settings**. (Shortcut: ''Ctrl + Shift + M'')
  
-{{ :products:mpino_studio2:memory-settings-modal.png?430|Figure 1. Memory Region Settings showing the address counts and estimated SRAM use}}+{{ :products:mpino_studio2:memory-settings-modal.png?430 |Figure 1. Memory Region Settings showing the address counts and estimated SRAM use }}
  
 ^ Region ^ Default count ^ Default address range ^ ^ Region ^ Default count ^ Default address range ^
Line 68: Line 91:
 | ''C11'' to ''C99'' | Remaining C region not directly assigned above | Confirm the intended use before selecting an address | | ''C11'' to ''C99'' | Remaining C region not directly assigned above | Confirm the intended use before selecting an address |
  
-> **Critical check:** If you choose ''C0'' through ''C10'' as ordinary counter addresses on this board, their data can overlap with the board functions that use the same addresses. Before assigning a counter, inspect both the **pin map** under Board/Memory Information and the **Used Memory Map**.+> **Critical check:** If you choose ''C0'' through ''C10'' as ordinary counter addresses on this board, their data can overlap with the board functions that use the same addresses. Before assigning a counter, check **Settings → Ladder Pin Map Settings** and **Settings → Used Memory**.
  
 Mapped addresses vary by board and can also be changed by the user. Check them under **Settings → Ladder Pin Map Settings**. Mapped addresses vary by board and can also be changed by the user. Check them under **Settings → Ladder Pin Map Settings**.
Line 111: Line 134:
 ===== 5. Find Memory Used by the Project ===== ===== 5. Find Memory Used by the Project =====
  
-Select **View → Used Memory Map**, or press ''Ctrl+Shift+L''.+Select **Settings → Used Memory**, or press ''Ctrl+Shift+L''.
  
-{{ :products:mpino_studio2:memory-map-modal.png?800 |Figure 2. Addresses and references in the Used Memory Map }}+{{ :products:mpino_studio2:memory-map-modal.png?800 |Figure 2. Addresses and references in Used Memory }}
  
 Inspecting this map before reassigning an address or reducing a memory-region size helps prevent duplicate use and out-of-range references. Inspecting this map before reassigning an address or reducing a memory-region size helps prevent duplicate use and out-of-range references.
  
-===== 6. Time-Driven Special-Bit Memory =====+===== 6. Special-Bit Memory =====
  
-Special-bit memory beginning with ''@'' is updated automatically as time passes. It differs from an ordinary P or M memory address and can be used in ladder contact or rising/falling-edge cell. +Special-bit memory beginning with ''@'' is updated automatically by MPINO Studio 2. It can be used in ladder bit contacts.
- +
-{{ :en-us_products:mpino_studio2:special-memory-timing.svg?1000 |Timing comparison of @100 and @F1000 special-bit memory }}+
  
 ^ Format ^ Operation ^ Example ^ ^ Format ^ Operation ^ Example ^
 +| ''@ON'' | Always ON | Keeps a bit contact true |
 +| ''@OFF'' | Always OFF | Keeps a bit contact false |
 | ''@<ms>'' | Turns ON for one scan once each specified time boundary | ''@100'' is ON for one scan every 100 ms | | ''@<ms>'' | Turns ON for one scan once each specified time boundary | ''@100'' is ON for one scan every 100 ms |
 | ''@F<ms>'' | Repeats ON for the specified duration, then OFF for the same duration | ''@F1000'' repeats 1 second ON and 1 second OFF | | ''@F<ms>'' | Repeats ON for the specified duration, then OFF for the same duration | ''@F1000'' repeats 1 second ON and 1 second OFF |
 +
 +''@ON'' and ''@OFF'' are case-insensitive, so ''@on'' and ''@off'' are also valid.
 +
 +{{ :en-us_products:mpino_studio2:special-memory-timing.svg?1000 |Timing comparison of @100 and @F1000 special-bit memory }}
  
 ''@100'' still produces one ON scan when the program scan crosses a 100 ms boundary without landing exactly on it. It can start an operation or increment a value at regular intervals. ''@100'' still produces one ON scan when the program scan crosses a 100 ms boundary without landing exactly on it. It can start an operation or increment a value at regular intervals.
Line 131: Line 158:
 ''@F1000'' provides a repeating one-second condition without code that manually toggles a state. ''@F1000'' provides a repeating one-second condition without code that manually toggles a state.
  
-{{ :products:mpino_studio2:special-relay-example.png?500 |Figure 3. A special contact entered in a ladder cell }}+{{ :products:mpino_studio2:special-relay-example.png?420 |Figure 3. Special-bit memory entered in a ladder cell }}
  
 Follow these input rules: Follow these input rules:
  
-  * The time unit is milliseconds (ms).+  * The time unit for ''@<ms>'' and ''@F<ms>'' is milliseconds (ms).
   * Do not use parentheses. Enter ''@F1000'', not ''@F(1000)''.   * Do not use parentheses. Enter ''@F1000'', not ''@F(1000)''.
-  * Use special contact only in a contact or rising/falling-edge cell.+  * Use special-bit memory only in bit contacts.
   * Do not enter it as an output-coil address.   * Do not enter it as an output-coil address.
-  * An arbitrary name such as ''@ON'' is not valid. 
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
Line 146: Line 172:
 | An entered address is rejected. | Check the region letter, address range, B/W/D prefix support, and ''.n'' bit-access support. | | An entered address is rejected. | Check the region letter, address range, B/W/D prefix support, and ''.n'' bit-access support. |
 | Memory Region Settings cannot be saved. | Check whether estimated SRAM use exceeds total SRAM and is shown in red. | | Memory Region Settings cannot be saved. | Check whether estimated SRAM use exceeds total SRAM and is shown in red. |
-| An address does not appear in the Used Memory Map. | Select the correct region tab and ladder/code filters, enter the address, and press ''Enter''. |+| An address does not appear in Used Memory. | Select the correct region tab and ladder/code filters, enter the address, and press ''Enter''. |
 | A C counter value is unexpected. | First check for overlap with the ''C0'' through ''C10'' board pin mapping on MPINO-8A4R(T)-S. | | A C counter value is unexpected. | First check for overlap with the ''C0'' through ''C10'' board pin mapping on MPINO-8A4R(T)-S. |
-| ''@F1000'' cannot be entered. | Confirm that the selected cell is a contact or edge cell, not an output coil, and that no parentheses are present. |+| ''@F1000'' cannot be entered. | Confirm that the selected cell is a bit contact and that no parentheses are present. |
  
 ===== Related Documentation ===== ===== Related Documentation =====
 +
 +  * [[en-us_products:mpino_studio2:activity_bar|Phase 8 · Activity Bar and Side Panels]]
 +
 +  * [[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:first_project|Phase 1 · Create Your First Project]]   * [[:en-us_products:mpino_studio2:first_project|Phase 1 · Create Your First Project]]
en-us_products/mpino_studio2/memory.1788875803.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki