beautypg.com

3 exchanging data between tasks, Exchanging data between tasks, 2introduction – Lenze E94A User Manual

Page 36

background image

2

Introduction

2.8

Multitasking in the Servo Drive 9400

36

Lenze · 9400 function library · Reference manual · DMS 6.7 EN · 08/2014 · TD05

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

2.8.3

Exchanging data between tasks

There are two options to exchange data between tasks:

1. via global variables
2. via user codes

In order to e.g. transfer a value from the ApplicationTask to the UserTask, first a global variable or a

user code is defined. The value is assigned to this variable/code in the ApplicationTask and read

from the same variable/code in the UserTask and e.g. assigned to a block input.

Note!

When creating the FB interconnection please bear in mind that the value of a global va-

riable or user code may change while processing the lower-priority task when being in-

terrupted by a higher-priority task.
The FB Editor prevents that the same variable or user code can be written several times.

Thus, a variable or user code cannot be changed in different tasks.