Elmomc Multi-Axis Motion Controller-Maestro Instrukcja Użytkownika Strona 107

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 313
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 106
Maestro Software Manual MAXL Program Language
MAN-MASSW (Ver. Q)
The following code example compares how the Maestro Program Priority feature
affects program scheduling.
Entry point of Task1. Entry point of Task 2.
Program with Task Priority
Undefined
When Maestro User Program
Priorities are not defined for
the tasks, the results are
variable and unpredictable
because Tasks 1 and 2 run
simultaneously.
function run()
int i
stVar=0
Task2.run()
for i=1:1000
stVar = stVar + 1
end for
TRACE("t1 %", stVar)
wait(10)
end function
function run()
int i
for i=1:1000
stVar = stVar + 1
end for
wait(10)
end function
Program with Defined Task
Priority
When Maestro User Program
Priorities are defined for each
task, Task 2 does not run
until Task 1 is completed.
function run()
int i
stVar=0
priority(1)
Task2.run()
for i=1:1000
stVar = stVar + 1
end for
TRACE("t1 %", stVar)
wait(10)
end function
function run()
int i
priority(3)
for i=1:1000
stVar = stVar + 1
end for
wait(10)
end function
5-45
Przeglądanie stron 106
1 2 ... 102 103 104 105 106 107 108 109 110 111 112 ... 312 313

Komentarze do niniejszej Instrukcji

Brak uwag