en-us_products:mpino_studio2:box_functions

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:box_functions [2026/09/12 18:08] – 바깥 편집 127.0.0.1en-us_products:mpino_studio2:box_functions [2026/11/17 17:59] (current) – external edit 127.0.0.1
Line 9: Line 9:
 ==== How to Create a Command ==== ==== How to Create a Command ====
  
-  - Select a ladder cell and press ''Ctrl + Enter'' to create a box function.+  - Select a ladder cell and press ''\'' or select **Box Function** from the left toolbar to place a box function cell. Then press ''Enter'' or double-click the cell to open the editor.
   - Choose a category and command in the editor.   - Choose a category and command in the editor.
   - Enter the selected argument, then press ''Tab'' for the next argument.   - Enter the selected argument, then press ''Tab'' for the next argument.
Line 33: Line 33:
  
 To edit an existing box function, select its cell and press ''Enter'', or double-click it. Choosing another command replaces the entire input with that command's template. **OK** saves the change; **Cancel** restores the value from before editing. To edit an existing box function, select its cell and press ''Enter'', or double-click it. Choosing another command replaces the entire input with that command's template. **OK** saves the change; **Cancel** restores the value from before editing.
 +
 +Structured command boxes show each argument in its own slot, so you can select one argument to edit or copy its value.
 +
 +{{ :en-us_products:mpino_studio2:box-function-slots-marked.svg?1000 |Command name, argument slots, destination slot, and missing argument slot in a box function }}
 +
 +^ Marker ^ Item ^ Action ^
 +| **①** | Command name | Shows the command name in the band at the top of the box. |
 +| **②** | Argument slot | Shows one argument per slot. A structured command draws as many slots as it has arguments. |
 +| **③** | Destination slot | The argument slot that stores the result is shaded and shown in bold. |
 +| **④** | Missing argument slot | If fewer arguments are entered than the command requires, each missing position appears as a dashed slot. |
 +
 +^ Task ^ How ^ Result ^
 +| Select an argument slot | On a box function cell, press ''←'' or ''→'', or click a slot | The selection moves one argument slot at a time. Pressing the key again at the last slot moves to the next cell outside the box. |
 +| Edit one argument | Select a slot, then press ''Enter'' or double-click the slot | The editor opens with only that argument selected, so typing replaces just that argument. |
 +| Paste only an argument value | Press ''Ctrl + C'' on a slot that has a value, then ''Ctrl + V'' on the argument slot to paste into | Only the value of that slot changes. Text copied from Notepad or another app can also be pasted; if it has several lines, only the first line is pasted. |
 +| Paste a whole box function | Press ''Ctrl + V'' on a place that is not an argument slot, such as an empty cell | The whole copied box function is placed from that cell to the right. If there is not enough room, a message shows how many columns are needed and nothing is pasted. |
 +| Show slot names | Hold ''Shift'' in the ladder grid | Each slot of a structured command box shows its slot name instead of the argument. For example, ''ADD'' shows ''IN0'', ''IN1'', and ''OUT'', and ''TON'' shows ''OUT'' and ''PT''. Missing argument slots also show their names, and releasing ''Shift'' restores the normal display. |
 +
 +> **Note on slot editing:** Argument slots cannot be selected in a free-form box such as ''D0 = D0 + 1'', or in a box drawn narrower than its argument count because of the grid edge or neighboring cells. In such a box, ''←'' and ''→'' skip the whole box at once, and ''Enter'' opens the editor with the entire input selected.
  
 ===== 3. Box Function Execution Condition ===== ===== 3. Box Function Execution Condition =====
Line 42: Line 61:
 ===== 4. Structured and Free-form Input ===== ===== 4. Structured and Free-form Input =====
  
-Structured commands are the 44 commands registered in the palette; each has a fixed syntax and argument count. Free-form input accepts an assignment containing an expression or an Arduino function call that you enter directly.+Structured commands are the 45 commands registered in the palette; each has a fixed syntax and argument count. Free-form input accepts an assignment containing an expression or an Arduino function call that you enter directly.
  
 ^ Type ^ Example ^ When to use ^ ^ Type ^ Example ^ When to use ^
Line 72: Line 91:
 |  | [[en-us_products:mpino_studio2:box_functions:timer:tmon|TMON]] | Starts one pulse when the input turns ON and holds the done state ON for the set time. | |  | [[en-us_products:mpino_studio2:box_functions:timer:tmon|TMON]] | Starts one pulse when the input turns ON and holds the done state ON for the set time. |
 |  | [[en-us_products:mpino_studio2:box_functions:timer:tmr|TMR]] | Accumulates time while the input is ON. | |  | [[en-us_products:mpino_studio2:box_functions:timer:tmr|TMR]] | Accumulates time while the input is ON. |
-|  | [[en-us_products:mpino_studio2:box_functions:timer:taon|TAON]] | Provides the same on-delay behavior as TON with a 100 ms tick. | +|  | [[en-us_products:mpino_studio2:box_functions:timer:taon|TAON]] | Provides the same on-delay behavior as TON with a default 100 ms tick. | 
-|  | [[en-us_products:mpino_studio2:box_functions:timer:taoff|TAOFF]] | Provides the same off-delay behavior as TOFF with a 100 ms tick. | +|  | [[en-us_products:mpino_studio2:box_functions:timer:taoff|TAOFF]] | Provides the same off-delay behavior as TOFF with a default 100 ms tick. | 
-|  | [[en-us_products:mpino_studio2:box_functions:timer:tapl|TAPL]] | Provides the same input-held pulse behavior as TPL with a 100 ms tick. | +|  | [[en-us_products:mpino_studio2:box_functions:timer:tapl|TAPL]] | Provides the same input-held pulse behavior as TPL with a default 100 ms tick. | 
-|  | [[en-us_products:mpino_studio2:box_functions:timer:tamon|TAMON]] | Provides the same one-shot pulse behavior as TMON with a 100 ms tick. | +|  | [[en-us_products:mpino_studio2:box_functions:timer:tamon|TAMON]] | Provides the same one-shot pulse behavior as TMON with a default 100 ms tick. | 
-|  | [[en-us_products:mpino_studio2:box_functions:timer:tamr|TAMR]] | Provides the same retentive behavior as TMR with a 100 ms tick. |+|  | [[en-us_products:mpino_studio2:box_functions:timer:tamr|TAMR]] | Provides the same retentive behavior as TMR with a default 100 ms tick. |
 | Counter Box Functions | [[en-us_products:mpino_studio2:box_functions:counter:ctu|CTU]] | Increments the current value once whenever the left condition changes from OFF to ON. | | Counter Box Functions | [[en-us_products:mpino_studio2:box_functions:counter:ctu|CTU]] | Increments the current value once whenever the left condition changes from OFF to ON. |
 |  | [[en-us_products:mpino_studio2:box_functions:counter:ctd|CTD]] | Preloads the current value with the set value, then decrements it once on each rising edge of the left condition. | |  | [[en-us_products:mpino_studio2:box_functions:counter:ctd|CTD]] | Preloads the current value with the set value, then decrements it once on each rising edge of the left condition. |
Line 89: Line 108:
 |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:inc|INC]] | Increments the destination by one and stores it back at the same address. | |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:inc|INC]] | Increments the destination by one and stores it back at the same address. |
 |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:dec|DEC]] | Decrements the destination by one and stores it back at the same address. | |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:dec|DEC]] | Decrements the destination by one and stores it back at the same address. |
-|  | [[en-us_products:mpino_studio2:box_functions:arithmetic:scale|SCALE]] | Linearly maps an integer from an input range to an integer output range. |+|  | [[en-us_products:mpino_studio2:box_functions:arithmetic:scale|SCALE]] | Linearly maps a value from the input range to the output range and stores it in the destination. Calculates with real numbers if any argument is real, and with integers otherwise. |
 |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:floor|FLOOR]] | Stores the greatest integer that is not larger than the source. | |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:floor|FLOOR]] | Stores the greatest integer that is not larger than the source. |
 |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:sqrt|SQRT]] | Stores the square root of the source. | |  | [[en-us_products:mpino_studio2:box_functions:arithmetic:sqrt|SQRT]] | Stores the square root of the source. |
Line 111: Line 130:
 |  | [[en-us_products:mpino_studio2:box_functions:logic_control:mcs|MCS]] | Starts a master control zone at a level from 0 to 15. | |  | [[en-us_products:mpino_studio2:box_functions:logic_control:mcs|MCS]] | Starts a master control zone at a level from 0 to 15. |
 |  | [[en-us_products:mpino_studio2:box_functions:logic_control:mcsclr|MCSCLR]] | Ends the master control zone at the specified level and any inner zones. | |  | [[en-us_products:mpino_studio2:box_functions:logic_control:mcsclr|MCSCLR]] | Ends the master control zone at the specified level and any inner zones. |
 +| CLCD Box Functions | CSCR | When the left condition is ON, switches the LCD at I²C address ADR to screen PAGE, and keeps the last screen after the condition turns OFF. The optional third argument is the LCD response bit. Create the screens in [[en-us_products:mpino_studio2:menus_settings#clcd_screen_editor|CLCD Screen Editor]]. Example: ''CSCR 0x27 D10 M100'' |
 | Free-form Box Functions | [[en-us_products:mpino_studio2:box_functions:free_input|Free-form Box Functions]] | ''D0 = D0 + 1'' · ''R0 += 1.5'' · ''D0 = readSensor()'' | | Free-form Box Functions | [[en-us_products:mpino_studio2:box_functions:free_input|Free-form Box Functions]] | ''D0 = D0 + 1'' · ''R0 += 1.5'' · ''D0 = readSensor()'' |
  
Line 126: Line 146:
  
   * [[en-us_products:mpino_studio2:monitoring|Phase 6 · Serial and Ladder Monitoring]]   * [[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:code_editor|Phase 5 · Editing Arduino Code]]
- 
   * [[en-us_products:mpino_studio2:ladder_editing|Phase 3 · Ladder Editing Basics]]   * [[en-us_products:mpino_studio2:ladder_editing|Phase 3 · Ladder Editing Basics]]
   * [[en-us_products:mpino_studio2:memory|Phase 2 · Understanding Memory]]   * [[en-us_products:mpino_studio2:memory|Phase 2 · Understanding Memory]]
   * [[en-us_products:mpino_studio2|MPINO STUDIO 2 User Manual]]   * [[en-us_products:mpino_studio2|MPINO STUDIO 2 User Manual]]
  
en-us_products/mpino_studio2/box_functions.1789204137.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki