Owner's manual

Chapter 30
Using a 9/Series Dual--processing System
3
0
-
9
Example 30.2
Incorrect Use of Simple Synchronization with Shared Paramacro
Parameters
Process 1 Comment Process 2 Comment
N17#7100=100; Paramacroparameter7100is setto100
N32M100; Processpauses waitingforM100 in
process 1. BlockN33 is setupinbuffer
prepared forexecution.
N18Z#7100;
N19#7100=25 Paramacroparameter7100 issetto 25
N20M100; Process 2is released frompause
N33X#7100; Destinationofthisblockisdependenton
whenthisblockwasread intothesetup
buffer. Ifthis blockwassetup before
process 1executedblockN19,Xmoves
to 100. Ifthis block wassetupafter
blockN19 is executed,Xmovesto 25.
Since there is no way to consistently tell when block N33 in Example 30.2
is set up, an inconsistent destination for the block can result. When block
N33 is set up depends on many factors, like what features you are currently
using, the speed of execution, and complexity of blocks in both processes
(see block lookahead in chapter 21 for details). To make certain that block
N33 is not set up until process 1 releases process 2, use one of the
synchronization-with-setup M-codes.
Example 30.3
Correct Use of Synchronization with Set up f or Shared Paramacro
Parameters
Process 1 Comment Process 2 Comment
N17#7100=100; Paramacroparameter7100 is setto 100
N32M151; Process pauses,waiting forM151in
process 1. BlockN33 is setup inbuffer
prepared forexecution.
N18Z#7100;
N19#7100=25 Paramacroparameter7100is setto25
N20M151; Process 2is releasedfrom pause andany setup
buffer read into process2 blocklookaheadis
purgedand setup again.
N33X#7100; X axis moves to25.
You can use synchronization-with-setup any time synchronization is
necessary, but it does have some cost to system efficiency and can slow
your system down. We recommend that you use M150 -- M199 only when
you change shared paramacro parameters. For most applications, simple
synchronization (M100-M149) is sufficient.