Program Structure; Tasks; Subroutines; Task Processing - Omron 3G3MX2 Series User Manual

Drive programming
Hide thumbs Also See for 3G3MX2 Series:
Table of Contents

Advertisement

3-3

Program Structure

In the Drive Programming for 3G3MX2/3G3RX Series Inverter, you can create a maximum of five tasks.
The created tasks are processed in parallel.
By dividing one application into several processes and allocating them to multiple tasks, you can adjust
execution condition, execution order, etc. for each process. Furthermore, parallel task processing can
provide shorter processing time.
3-3-1

Tasks

Task is a unit of program executed in the Drive Programming.
For 3G3MX2/3G3RX Series Inverter, you can create a program which consists of up to five tasks.
• All tasks are started simultaneously.
• In the order of task from 1 to 5, one command of each task (one line of the "program after compila-
tion") is executed in 2-ms processing time.
• All function variables such as user parameters are shared among the tasks. For transmission of infor-
mation between tasks, use the user parameters, internal user contacts, etc.
• At the end of 2-ms processing time, the operation result of each task is reflected to the inverter oper-
ation, external output, etc. At the same time, the status of the inverter and external input terminals,
etc. are read in.
• When the "end" command is executed, the task is completed and waits for the next start.
3-3-2

Subroutines

Subroutine is a separated program processing executed only when it is called.
Subroutines are useful to organize your program into parts that you can execute multiple times in the
same task or reuse in other programs.
In the Drive Programming, it is necessary to insert subroutines into each task. They cannot be shared
among the tasks.
It is possible to call a subroutine from another subroutine (nesting).
However, the maximum nesting of subroutines is eight levels.
3-3-3

Task Processing

UP to five tasks are started simultaneously, and one command of each task (one line of the "program
after compilation") is executed in 2-ms processing time. The following figure Programs After Compila-
tion (Example) shows the flow of the program processing.
• All tasks are started simultaneously.
• In the order of task from 1 to 5, one command of each task (one line of the "program after compila-
tion") is executed in 2-ms processing time.
• All function variables such as user parameters are shared among the tasks.
• At the end of 2-ms processing time, the operation result of each task is reflected to the inverter oper-
ation, external output, etc. At the same time, the status of the inverter and external input terminals,
etc. are read in.
• As shown in Task 1, if a subroutine is called by the "call" command, the statement of the subroutine
will be executed from the next step of processing.
Drive Programming User's Manual (I580-E2)
3 Operation Procedure for Drive Programming
3
3 - 13

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

3g3rx series3g3lx series

Table of Contents