User`s manual
12-10 Motion Mate™ DSM314 for Series 90™-30 PLCs User's Manual
–
January 2001 GFK-1742A
12
Operator /
Performs signed integer division of source1 by source2 and returns the quotient in
destination. A double precision (64-bit) parameter register may be used as the numerator.
Syntax 1
destination := source1 / source2;
Syntax 2
destination := double source1 / source2;
The / operator syntax has these parts:
Part Description
Destination Any writeable local logic variable except Dxx registers.
source1 Any readable local logic variable or numeric constant.
double source1 Any of the 64-bit local logic parameter variables (Dxx registers).
source2 Any readable local logic variable/constant except Dxx registers.
Overflow
– See
remarks
below.
Remarks
In case of a divide by zero, the Module_Status_Code is set to 16#2093. In case of a
divide overflow, the Module_Status_Code is set to 16#2094.
A divide overflow or divide by zero are Stop Fast errors. Local Logic is immediately
aborted and motion is aborted by setting the servo velocity command to zero.
A divide overflow occurs when the quotient of a divide operation cannot be correctly be
represented as a signed 32-bit value. This can only occur when using a double operand
(Dxx registers) as the numerator. A divide by zero occurs when the denominator of the
divide has a value of zero.