Installation manual
109
Programming
Examples:
Do While (TRUE)
Index.0.Initiate‘Incremetal,Dist=25.000in,Vel=25in/s
Dwell For Time 1.000‘Seconds
Loop
Do While (TRUE)
Index.0.Initiate‘Incremetal,Dist=25.000in,Vel=25in/s
Dwell For Time 1.000‘Seconds
Index.1.Initiate‘Incremental,Dist=15.000in,Vel=25in/s
Dwell For Time 0.500‘Seconds
Loop
Dwell for Master Dist
This motion instruction is used to pause program execution for a precise change in distance on the master encoder signal. This
is typically used in synchronized motion applications. This dwell does not begin until all other motion has completed. When
the dwell begins, program flow will wait until the specified master distance has passed. The units for the dwell value are
specified in the Master Units View.
Example:
Do While (TRUE)
Index.0.Initiate‘Synch,Incr,Dist=5.0 Inches,Vel=1 Inches/MstrInch
Dwell For MasterDist 12.00‘MstrInch
Loop
IndexInitiate by Expression:
This motion instruction is used to initiate a single index. The index is preset to include an acceleration up to speed, a run at
speed and a deceleration to a stop. IndexInitiate by expression is used to initiate different indexes with the same line of code
in a program.
One notable change from a standard Index.#.Initiate is that Wait for Index.AnyCommandComplete” line of code normally
inserted after the initiate will not be inserted after IndexInitiate by Expression. No comments will be added to this instruction
as the index selected can change anytime before the initiate command is encountered.
The following example will initiate index.0, wait for complete, initiate index.1, wait for complete, index.2... etc.
Example:
var.var0 = 0
a:
indexinitiate var.var0
Var.var0 = 1 + var.var0
wait for index.anycommandcomplete
goto a:
CompoundIndexInitiate by Expression:
This motion instruction is used to vary the index numbers making up a compound index. No comments will be added to this
instruction as the index selected can change anytime before the initiate command is encountered.
The following code will continuously compound initiate index.0 and index.1 in a loop.
Example:
a:
if var.var0 = 0 then
var.var0 = 1
else
var.var0 = 0
endif