User Tools

Site Tools


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/10 01:05] – 바깥 편집 127.0.0.1en-us_products:mpino_studio2:box_functions [2026/09/12 18:08] (current) – 바깥 편집 127.0.0.1
Line 3: Line 3:
 This page explains how to enter and edit box functions, when they run, and which box functions MPINO Studio 2 provides. This page explains how to enter and edit box functions, when they run, and which box functions MPINO Studio 2 provides.
  
-{{ :en-us_products:mpino_studio2:box-function-learning-path.svg?1000 |This page explains how to enter and edit box functions, when they run, and which box functions MPINO Studio 2 provides. }}+{{ :en-us_products:mpino_studio2:box-function-learning-path.svg?1000 |Steps from creating a box function to checking its behavior }}
  
-===== 1. Box Function Editor =====+===== 1. Create a Box Function ===== 
 + 
 +==== How to Create a Command ==== 
 + 
 +  - Select a ladder cell and press ''Ctrl + Enter'' to create a box function. 
 +  - Choose a category and command in the editor. 
 +  - Enter the selected argument, then press ''Tab'' for the next argument. 
 +  - Press ''Enter'' or **OK** when the command is complete.
  
 The box function editor is where you find a command and complete its arguments. Each marker points to the item described below. The box function editor is where you find a command and complete its arguments. Each marker points to the item described below.
  
-{{ :en-us_products:mpino_studio2:box-function-editor-marked.svg?1000 |The box function editor is where you find a command and complete its arguments. Each marker points to the item described below. }}+{{ :en-us_products:mpino_studio2:box-function-editor-marked.svg?1000 |Category, command list, input field, help, and confirmation in the box function editor }}
  
   * **①** Category: Choose a command group such as Timer, Counter, or Arithmetic.   * **①** Category: Choose a command group such as Timer, Counter, or Arithmetic.
Line 17: Line 24:
   * **⑤** OK and Cancel: Save the input to the cell or discard the change.   * **⑤** OK and Cancel: Save the input to the cell or discard the change.
  
-===== 2. Choose and Enter a Command =====+==== How to Read a Command ====
  
 Choose a category and a command. The editor fills in the command template and selects its first argument. Enter a value and press ''Tab'' to move to the next argument. In structured commands, separate the command name and arguments with spaces. Choose a category and a command. The editor fills in the command template and selects its first argument. Enter a value and press ''Tab'' to move to the next argument. In structured commands, separate the command name and arguments with spaces.
  
-  - Select a ladder cell and press ''Ctrl + Enter'' to create a box function. +{{ :en-us_products:mpino_studio2:box-function-entry-anatomy.svg?1000 |How a command name and its arguments are entered }}
-  - Choose a category and command in the editor. +
-  - Enter the selected argument, then press ''Tab'' for the next argument. +
-  - Press ''Enter'' or **OK** when the command is complete. +
- +
-{{ :en-us_products:mpino_studio2:box-function-entry-anatomy.svg?1000 |Choose a category and a command. The editor fills in the command template and selects its first argument. Enter a value and press ''Tab'' to move to the next argument. In structured commands, separate the command name and arguments with spaces. }}+
  
-===== 3. Edit an Existing Command =====+===== 2. Edit an Existing Command =====
  
 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.
  
-===== 4. Box Function Execution Condition =====+===== 3. Box Function Execution Condition =====
  
 The ON or OFF state from the contacts on the left is the box function's input. Timers and counters process their current and done states by command even while the input is OFF. With no contact, the input is always ON. Use a positive-edge contact when a cumulative command such as ''INC D0'' should run once. The ON or OFF state from the contacts on the left is the box function's input. Timers and counters process their current and done states by command even while the input is OFF. With no contact, the input is always ON. Use a positive-edge contact when a cumulative command such as ''INC D0'' should run once.
  
-{{ :en-us_products:mpino_studio2:box-function-execution.svg?1000 |The ON or OFF state from the contacts on the left is the box function's input. Timers and counters process their current and done states by command even while the input is OFF. With no contact, the input is always ON. Use a positive-edge contact when a cumulative command such as ''INC D0'' should run once. }}+{{ :en-us_products:mpino_studio2:box-function-execution.svg?1000 |How the left contact controls box function execution }}
  
-===== 5. 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 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.
Line 46: Line 48:
 | Free-form | ''D0 = readSensor()'' | Enter a supported expression or call a function written in Arduino code | | Free-form | ''D0 = readSensor()'' | Enter a supported expression or call a function written in Arduino code |
  
-===== Calling an Arduino Code Function =====+===== 5. Call an Arduino Code Function =====
  
 The two screens below show the ''setMotor()'' function written in Arduino Code and a box function that calls the same function from ladder logic. The two screens below show the ''setMotor()'' function written in Arduino Code and a box function that calls the same function from ladder logic.
Line 122: Line 124:
  
 ===== Related Documentation ===== ===== Related Documentation =====
 +
 +  * [[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:ladder_editing|Phase 3 · Ladder Editing Basics]]   * [[en-us_products:mpino_studio2:ladder_editing|Phase 3 · Ladder Editing Basics]]
en-us_products/mpino_studio2/box_functions.1788969958.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki