Seite 1 von 1

Example of process synchronization

Verfasst: 03 Dez 2019, 00:41
von vleeuwen
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

Re: Example of process synchronization

Verfasst: 04 Dez 2019, 00:16
von vleeuwen
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?

Re: Example of process synchronization

Verfasst: 04 Dez 2019, 19:02
von vleeuwen
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

Re: Example of process synchronization

Verfasst: 05 Dez 2019, 10:31
von Rei Vilo
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) 308 mal betrachtet

Re: Example of process synchronization

Verfasst: 05 Dez 2019, 15:53
von vleeuwen
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