Example of process synchronization

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
vleeuwen
Beiträge: 1070
Registriert: 31 Okt 2010, 22:23

Example of process synchronization

Beitrag von vleeuwen » 03 Dez 2019, 00:41

Example for testing process synchronization and the use of logic in RoboPro.
See also
This will run in the simulation mode, so no controller needed to see what is happening.
Notice the different in behavior in cases of option 1 and 2!

RoboPro file
Bild

vleeuwen
Beiträge: 1070
Registriert: 31 Okt 2010, 22:23

Re: Example of process synchronization

Beitrag von vleeuwen » 04 Dez 2019, 00:16

The question is: Will the test always work well?
My guess is not always.

The problem is the logic after the "and" operator.
Take in mind that this is workflow programming and in fact this is a fundamental issues.
What is the condition under which the "wait for 0->1" will work?

vleeuwen
Beiträge: 1070
Registriert: 31 Okt 2010, 22:23

Re: Example of process synchronization

Beitrag von vleeuwen » 04 Dez 2019, 19:02

In part 1 we have see a first solution for 3 parallel processes.
But this solution knows some problems.
Hereby an improved solution and the RoboPro file (simulation mode, no controller needed):
Bild

Rei Vilo
Beiträge: 71
Registriert: 19 Dez 2015, 15:39

Re: Example of process synchronization

Beitrag von Rei Vilo » 05 Dez 2019, 10:31

I discussed a similar solution on the Parallel Processing page and used it on Very Large Model: Defining the Processes.

7072523_orig.jpg
7072523_orig.jpg (83.72 KiB) 171 mal betrachtet

vleeuwen
Beiträge: 1070
Registriert: 31 Okt 2010, 22:23

Re: Example of process synchronization

Beitrag von vleeuwen » 05 Dez 2019, 15:53

Hi Rei,
Thanks for your contribution.
I guess that your "O" is the same as the "Y"?

You assume that during the initialisation of this subroutine a "0" has been send to all the "AND" inputs.
Has this been documented in the RoboPro help?
Otherwise local variables (start value 0 will resolve this) between the assignment elements and the AND element can help.

I would like have preference for a wait-element in the most left part, this to avoid a race condition.

The link to Michael's feedback is not valid anymore.

Kind regards,
CvL

Antworten