Instruction Manual
Language Reference • Reference 197
Publication 1398-PM601A-EN-P — October 2000
WORDS
condition The condition to be tested. The condition may be a comparison,
an input being ON or OFF, or a program flag being ON or OFF
Comparisons compare the values of two operands and determine
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 vari-
ables, analog input values (ADC), or constants.
I1 = ON ;an input
F1 = ON ;a user flag
INPOSN ON ;system flag
G1 > G2 ;comparison user variable
G1 > POS1 ;comparison system variable
POS2 <= 7.00 ;comparison constant
Remarks Unlike the WHILE statement, the loop body will always be executed at least once
because the DO/WHILE statement tests the condition AFTER the loop body is exe-
cuted.
See Also WHILE, IF
Example
DO
{
MOVD = G10
DWELL = 2.5
} WHILE (I11 = ON)
DP
Define Position Home
Purpose Redefine the present commanded position as a new position. The present commanded
position will become the specified position, the encoder position that is not the feed-
back encoder is set to zero, the Home Sequence Complete output (if assigned) and the
HSEQCPL system flag will be turned ON.
Syntax DP = position
position The position is specified in user units and can be a constant, a
nonvolatile variable Gn, a volatile variable Vn, or a system
variable. User units are defined by the SCALE parameter.
Remarks Use caution if you use this command while there is motion. The time delay caused by
execution speed will result in the zero position being defined at a position that is dif-
ferent than when the command was issued. The difference in position will be propor-
tional to the velocity of the motor when the command was issued.
Any following error that is present when this instruction is executed will be main-
tained (the feedback position will not be set equal to the commanded position).
The Home Sequence Complete output is assigned in the Parameter menu, Outputs dia-
log box.
See Also DH (Define Home), DPn, HOMECMD, HSEQCPL
Example
DP = -1.34 ;set the current commanded position to -1.34
DP = V3 ;set the current commanded position to the
; value of V3