Synchronization in TwinCAT 3

h.kev07

Level-1
Beiträge
9
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
Hallo,

I have created several module instances of a main module. Each module instance has a different task context with same period.

CycleUpdate method implemented in main module is called by the tasks as per the period specified.

My question is, for all the module instances, execution of CycleUpdate method will start at the same time ? Synchronization is managed by TwinCAT in this case ?

Cheers.
--Himanshu
 
Hello!

First: I think u r talking about Tc3 C++?!

Concerning to your questions:
CycleUpdate will not start at the same time in every module instance. It work's like a line interpreter. You can set the sort order by using the column "sort order" (Instance->Context).

What kind of synchronization do you mean?
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Good morning,

Thank you for the post.

Yes, I am using C++.

I mean CycleUpdate method synchronization. So as per your answer, if I set "set order" 0 (which is default sort order) then CycleUpdate method will start at the same time, right ?
 
Hi,

it depents how you have configured your system. If you have multiple task with the same cycle time, which you have distributed to multiple cores with the same base time and nothing else is running on this cores (tasks with an higher priority, which can interrupt the execution), than the answer is yes. This tasks will be called exactly at the same time. If you are using only one core for all these tasks or if these modules will be called by the same task, than the answer is no. The will be called all in the same cycle, but one after another.
 
Zurück
Oben