Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:sw:01-mervis:task-definition-hidden [2024/04/23 12:56] – avsetula | en:sw:01-mervis:task-definition-hidden [2024/04/23 15:07] (current) – [Task categories] avsetula | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| </ | </ | ||
| <WRAP half column 100%> | <WRAP half column 100%> | ||
| - | In the Mervis system, it is possible to define the tasks to be run in the PLC (RT). A task is a definition of conditions for running a selected / mapped program or several different programs in a specified order. | + | In the Mervis system, it is possible to define the tasks to be run in the controller |
| - | + | In the **simple mode** | |
| - | In the **simple mode**, one task is always defined, the task repeatedly executes the program | + | |
| ---- | ---- | ||
| - | This guide describes how and where to define tasks, what categories and types of tasks exist, including how to achieve | + | This guide describes how and where to define tasks, what categories and types of tasks exist, including how to optimized program execution, error handling, their logging and eventually self-repair. |
| </ | </ | ||
| </ | </ | ||
| - | |||
| - | ===== Defining a task ===== | ||
| - | |||
| - | After the solution is generated in **simplified mode**, a task is automatically created for the PLC with a mapped **main** program. When the solution is created in **full mode**, the task must be created and the program mapped. | ||
| - | |||
| - | To add a task, simply right click anywhere in the open window and then select **Add task** from the context menu. | ||
| - | |||
| - | {{ .: | ||
| - | |||
| - | Task creation and any modification must be confirmed by clicking **OK** in the red bar. | ||
| - | |||
| - | {{ : | ||
| - | |||
| - | <WRAP center round important 90%> | ||
| - | **Warning!** \\ | ||
| - | All changes to the task must **always** be confirmed by clicking OK in the red bar. | ||
| - | </ | ||
| ===== Task properties description ===== | ===== Task properties description ===== | ||
| - | Double-clicking the PLC name in the Solution | + | Double-clicking the controller |
| {{ .: | {{ .: | ||
| - | The default state of the PLC tasks list (creation | + | Default list of controller |
| {{ .: | {{ .: | ||
| Line 75: | Line 57: | ||
| ---- | ---- | ||
| - | **NormalOperationTask** - Normal operation, default option for every task. The task runs according to the specified type and parameters | + | **NormalOperationTask** - Normal operation, default option for each task. The task is executed |
| **ExecutionError** - Triggers in case of a critical // | **ExecutionError** - Triggers in case of a critical // | ||
| <WRAP center round info 90%> | <WRAP center round info 90%> | ||
| - | Mervis IDE allows you to create multiple NormalOperationTask categories, provided that the first one is of the Freewheeling type, | + | Mervis IDE allows you to create multiple NormalOperationTask categories, provided that the first one is of the Freewheeling type, or Cyclic and the other tasks in this category will be of type Event only. The task types are described in detail [[# |
| - | or Cyclic and the other tasks in this category will be of type Event only. The task types are described in detail [[# | + | </ |
| + | |||
| + | <WRAP center round important 90%> | ||
| + | If running the program continuously is a higher priority than running without errors and logging them, it is possible to disable the **Stop on Exception** option in the controller properties and never run a job of type ExecutionError: | ||
| + | |||
| + | {{.: | ||
| </ | </ | ||
| ==== Program mapping ==== | ==== Program mapping ==== | ||
| - | By clicking in the box under **Program Mapping** the table will be displayed: | + | By double-clicking in the box under **Program Mapping** the window |
| {{ .: | {{ .: | ||
| - | In this table, desired program is selected by clicking on it and added by clicking the **Add →** button. | + | In this window, the desired program is selected by clicking on it and added by clicking the **Add →** button. |
| {{ .: | {{ .: | ||
| Line 100: | Line 87: | ||
| ==== Task types ==== | ==== Task types ==== | ||
| - | Task type defines the way of its execution. | + | Task type defines |
| {{ .: | {{ .: | ||
| Line 106: | Line 93: | ||
| |< 100% 20% 80%>| | |< 100% 20% 80%>| | ||
| ^ Type ^ Meaning | ^ Type ^ Meaning | ||
| - | | Freewheeling | Normal execution, pause between cycles according to % setting | + | | Freewheeling | Normal execution, pause between cycles according to '' |
| - | | Cyclic | + | | Cyclic |
| | Event | The task is executed if the defined condition is met | | | Event | The task is executed if the defined condition is met | | ||
| Line 114: | Line 101: | ||
| < | < | ||
| - | Setting the Freewheeling type means that the selected | + | Setting the Freewheeling type means that the task will be executed over and over again, according to the controller's capabilities. |
| + | |||
| + | The **Sleep Ratio** parameter specifies the sleep time before | ||
| ---- | ---- | ||
| Line 120: | Line 109: | ||
| < | < | ||
| - | If the Cyclic type is set, the job will be executed every fixed period [ms]. For longer periods, it is convenient to use the ST syntax, for example, when setting | + | If the Cyclic type is set, the job will be executed every fixed period [ms]. |
| + | |||
| + | For longer periods, it is convenient to use the ST syntax, for example, when setting | ||
| ---- | ---- | ||
| Line 126: | Line 117: | ||
| < | < | ||
| - | The Event setting | + | The Event type setting |
| ^ Trigger condition | ^ Trigger condition | ||
| Line 136: | Line 127: | ||
| {{ .: | {{ .: | ||
| - | After expanding the **variable** parameter, a table with a list of variables appears, the desired variable can be added by selecting it and clicking the **Add** button. | + | After expanding the **variable** parameter, a window |
| {{ : | {{ : | ||
| <WRAP center round important 90%> | <WRAP center round important 90%> | ||
| - | If you want to use *commerror variables, you must use it in the main program | + | To run a task of the event type, it is necessary to select as the trigger variable a variable that is used in the main program. To use a variable in FBD, just connect it to itself: |
| {{ : | {{ : | ||
| + | |||
| + | The same rule applies to commerror and other attributes. | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ===== Defining a task ===== | ||
| + | After generating the solution in **simple mode**, a task with a mapped **main** program is automatically created for the controller. When the solution is created in **full mode**, the program and task must be created and mapped manually. | ||
| + | |||
| + | To add a task, simply right click anywhere in the open window and then select **Add task** from the context menu. | ||
| + | |||
| + | {{ .: | ||
| + | |||
| + | Task creation and any modification must be confirmed by clicking **OK** in the red bar. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <WRAP center round important 90%> | ||
| + | **Warning!** \\ | ||
| + | All changes to the task must **always** be confirmed by clicking **OK** in the red bar. | ||
| + | </ | ||
| + | |||
| ===== Example of use ===== | ===== Example of use ===== | ||
| Line 155: | Line 166: | ||
| < | < | ||
| - | The device operating the saw. When a program error occurs, the **NormalOperation** task is stopped and the **ExecutionError** task is started, which stops the saw blade and feed. This error condition treatment avoids potential injury to workers or saw damage. | + | The device operating the saw. When a program error occurs, the **NormalOperation** task is stopped and the **ExecutionError** task is started, which stops the saw blade and feeder. This error condition treatment avoids potential injury to workers or saw damage. |
| < | < | ||
| - | Equipment | + | A machine |