Division

Division of two integer or real variables (the first divided by the second).
lrso_dv1
TIP: Fix all potential divide by zero instances in program organization units (POUs). A divide by zero error displays "Wait" instead of live data in the language editor when simulating an application.
Arguments
i1
SINT - USINT - BYTE - INT - UINT - WORD - DINT - UDINT - DWORD - LINT - ULINT - LWORD - REAL - LREAL
can be of any integer or real format (operand)
i2
SINT - USINT - BYTE - INT - UINT - WORD - DINT - UDINT - DWORD - LINT - ULINT - LWORD - REAL - LREAL
non-zero integer or real value (divisor)
o1
SINT - USINT - BYTE - INT - UINT - WORD - DINT - UDINT - DWORD - LINT - ULINT - LWORD - REAL - LREAL
integer or real division of i1 by i2
Example
(* FBD example with Division Operators *)
lrso_dv2
(* ST Equivalence: *)
ao10 := ai101 / ai102; ao5 := (ai5 / 2) / ai53;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal