TECHNICAL NOTE
MOTION APPLICATION ENGINEERING GROUP
Yaskawa Electric America - 2121 Norman Drive South – Waukegan IL 60085
(800) YASKAWA - Fax (847) 887-7280
11/23/2005 40 of 40 eng/05.055/MCD
Waterfall Technique
Because it is possible to write directly to the motion registers in a Yaskawa MP controller, it is
good programming practice to write values to the register in only one place to simplify monitoring
or debugging. This practice is accomplished using local registers as accumulators to interact
with logic and to finally store a value to the actual motion register in one place. This method is
referred to as the waterfall technique. Another benefit to this method is the ability to load a
default value if no conditions explicitly call for another value.
This coding technique is accomplished in three sections:
1. A default, initialization, or last scan value is stored to the accumulator register.
2. A conditional value is loaded to the accumulator based on interlocks with other logic
values. This action overwrites the default value.
3. The final store occurs when the accumulator is copied to the actual motion register.
In the following example, the motion command code is set for axis 1. The default value is first
stored to zero, or NOP as a safety so that no action will be taken if a fault happens in logic below.
Note that DW00026 register is used as an accumulator in the code below, this will be described
in more detail later.
If jogging, homing or production is required, the corresponding motion command code is loaded
to the accumulator word DW00026 in the conditional section.