en-us_products:mpino_studio2:memory
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en-us_products:mpino_studio2:memory [2026/10/03 13:15] – external edit 127.0.0.1 | en-us_products:mpino_studio2:memory [2026/11/13 00:27] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 54: | Line 54: | ||
| > **R value error caution:** Because of the limits of 32-bit floating-point arithmetic, '' | > **R value error caution:** Because of the limits of 32-bit floating-point arithmetic, '' | ||
| + | |||
| + | ==== Use Arduino Variables in Ladder ==== | ||
| + | |||
| + | Global variables declared outside functions in a '' | ||
| + | |||
| + | <code cpp> | ||
| + | bool motorOn = false; | ||
| + | uint16_t flags = 0; // Used in contacts and coils with a bit number, such as flags.3. | ||
| + | int speed = 0; // Used in comparison contacts such as speed > 100, or as a box-function argument. | ||
| + | </ | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ^ Class ^ Supported C types ^ Use in contacts and coils ^ | ||
| + | | Bit | '' | ||
| + | | Byte | '' | ||
| + | | Word | '' | ||
| + | | Double-word | '' | ||
| + | | Floating-point | '' | ||
| + | |||
| + | Variables of every class can be used in comparison contacts and box-function arguments. They cannot be used in the following cases. | ||
| + | |||
| + | * A '' | ||
| + | * Arrays, structures, '' | ||
| + | * A name shaped like a ladder address, such as '' | ||
| + | * Arduino variables cannot be timer or counter targets or presets, and they cannot be used in the '' | ||
| + | |||
| + | In the candidate list of the cell editor, an Arduino variable appears as “Variable · code file name”. A symbol name spelled exactly like an Arduino variable is an error, and the project cannot be built. If the names differ only in letter case (for example, symbol '' | ||
| + | |||
| + | Ladder monitoring does not receive Arduino variable values, so variable cells are not shown as ON or OFF, and hovering over such a cell shows “Arduino variable values are not monitored”. Values cannot be written to Arduino variables with the **Write Value to Arduino** popup or with '' | ||
| ===== 2. Memory Regions ===== | ===== 2. Memory Regions ===== | ||
| Line 59: | Line 89: | ||
| The MPINO-8A4R(T)-S board uses these default memory counts: | The MPINO-8A4R(T)-S board uses these default memory counts: | ||
| - | You can change the number of addresses used under **Settings → Memory | + | You can change the number of addresses used under **Settings → Memory |
| - | {{ : | + | {{ : |
| ^ Region ^ Default count ^ Default address range ^ | ^ Region ^ Default count ^ Default address range ^ | ||
| Line 71: | Line 101: | ||
| | '' | | '' | ||
| - | **Memory | + | **Memory |
| + | |||
| + | In **Timer units** at the bottom of the dialog, you can also select the length of one timer tick (1 ms or 10 ms for '' | ||
| Do not confuse a count with the last address. Numbering begins at zero, so 200 D addresses run from '' | Do not confuse a count with the last address. Numbering begins at zero, so 200 D addresses run from '' | ||
| Line 136: | Line 168: | ||
| Select **Settings → Used Memory**, or press '' | Select **Settings → Used Memory**, or press '' | ||
| - | {{ : | + | {{ : |
| + | |||
| + | ^ Marker ^ Item ^ Action ^ | ||
| + | | **①** | Area tabs | Switches among the '' | ||
| + | | **②** | Ladder and Code | Show or hide the addresses used by the ladder and by Arduino code. | | ||
| + | | **③** | Search address | Enter an address such as '' | ||
| + | | **④** | Used cells | Blue cells are used by the ladder, green cells by Arduino code, and purple cells by both. Select a cell to open the usage dialog. | | ||
| + | |||
| + | If a ladder cell is selected when you open this dialog, the tab and row for that cell's address appear immediately. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ^ Marker ^ Item ^ Action ^ | ||
| + | | **①** | Usage locations | For the ladder, shows the ladder name and cell position ('' | ||
| + | | **②** | Go to | Moves to that ladder cell or code file and closes the Used Memory dialog. | | ||
| 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. | ||
| Line 171: | Line 217: | ||
| ^ Symptom ^ What to check ^ | ^ Symptom ^ What to check ^ | ||
| | An entered address is rejected. | Check the region letter, address range, B/W/D prefix support, and '' | | An entered address is rejected. | Check the region letter, address range, B/W/D prefix support, and '' | ||
| - | | Memory | + | | Memory |
| | An address does not appear in Used Memory. | Select the correct region tab and ladder/code filters, enter the address, and press '' | | An address does not appear in Used Memory. | Select the correct region tab and ladder/code filters, enter the address, and press '' | ||
| | A C counter value is unexpected. | First check for overlap with the '' | | A C counter value is unexpected. | First check for overlap with the '' | ||
| Line 179: | Line 225: | ||
| * [[en-us_products: | * [[en-us_products: | ||
| - | |||
| * [[en-us_products: | * [[en-us_products: | ||
| - | |||
| * [[en-us_products: | * [[en-us_products: | ||
| - | |||
| * [[: | * [[: | ||
| * [[: | * [[: | ||
en-us_products/mpino_studio2/memory.1791000954.txt.gz · Last modified: by 127.0.0.1
