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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compute/Math <strong>Instructions</strong> (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS) 265If 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 To:all 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.Arithmetic Status Flags:Arithmetic status flags are affected.Fault Conditions:A Minor Fault Occurs If Fault Type Fault Codethe divisor is zero 4 4Execution:Relay LadderConditionprescanrung-condition-in is falserung-condition-in is trueActionThe rung-condition-out is set to false.The rung-condition-out is set to false.Destination = Source A / Source BThe rung-condition-out is set to true.postscanThe rung-condition-out is set to false.Function BlockPublication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!