Instruction Manual

Language Reference Reference 193
Publication 1398-PM601A-EN-P October 2000
WORDS
DHCMD
Define Home Command Home
Purpose When this write only flag is set to ON, the present commanded position will be set to
zero. This flag is used in function key programs to define a home position (DH is not
permitted in function key programs).
Syntax DHCMD = value
value The value may be a nonvolatile flag Bn, a volatile flag Fn, ON,
OFF, or another system flag.
Remarks
See Also DH, DP
Example
DHCMD = ON
DIF
Distance, Conditional Motion
Purpose Move the distance specified unless the condition is satisfied during the move. The
velocity for the move is that of the previous DV move. If the condition is met, the
action specified in the instruction is taken. If the condition is not met during the move,
the next program statement is executed when the move distance is reached. The DIF
statement may not be used as the final statement in a complex profile.
Syntax DIF = distance, condition, action
distance The incremental distance in user units to be moved, which may
be a number or a variable. The sign of the distance must be the
same as the sign of the preceding DV move. Distance may be a
nonvolatile variable Gn, a volatile variable Vn, a system vari-
able, or a constant.
condition The condition to be tested. The condition may be a comparison,
an input being ON or OFF, or a system or user flag being ON or
OFF.
Comparisons compare the values of two operands and deter-
mine if the condition is TRUE or FALSE. A comparison may be
greater than (>), less than (<), equal to ( = ), not equal to (<>),
less than or equal to (< = ), or greater than or equal to (> = ).
The operands of a comparison may be user variables, system
variables, analog input values (ADC), or constants.
I1 ON ;an input
F1 ON ;a user flag
G1 > G2 ;comparison user variable
G1 > POS1 ;comparison system variable
POS2 <= 7.00 ;comparison constant