12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Compute/Math <strong>Instructions</strong> (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) 269FBD_MATH StructureInput Parameter Data Type DescriptionEnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated.Default is set.Source A REAL Value of the dividend.Valid = any floatSource B REAL Value of the divisor.Valid = any floatOutput Parameter Data Type DescriptionEnableOut BOOL The instruction produced a valid result.Dest REAL Result of the math instruction. Arithmetic status flags are set for this output.Description:If Source B (the divisor) is zero:• a minor fault occurs:– Type 4: program fault– Code 4: arithmetic overflow• the destination is set as follows:If Source B Is Zero And And The Destination Is a And The Result Is Then The Destination Is Set Toall operands are integers (SINT, INT,or DINT)Source Aat least one operand is a REAL SINT, INT, or DINT positive -1negative 0REAL positive 1.$ (positive infinity)negative-1.$ (negative infinity)To detect a possible divide-by-zero, examine the minor fault bit(S:MINOR). See <strong>Logix5000</strong> <strong>Controllers</strong> Common Procedures,publication 1756-PM001.Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!