EasyManuals Logo

Allen-Bradley Studio 5000 Logix Emulate User Manual

Allen-Bradley Studio 5000 Logix Emulate
676 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #674 background imageLoading...
Page #674 background image
Chapter 12
674 Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018
S:V
Overflow flag
The controller sets the overflow flag when:
• The result of a math operation results in an overflow.
For example, adding 1 to a SINT generates an overflow when the
value goes from 127 through -128.
• The destination tag is too small to hold the value.
For example, if you try to store the value 123456 to a SINT or INT
tag.
Use the overflow flag to verify the result of an operation is still in
range.
If the data being stored is a string type, S:V is set if the string is too
large to fit into the destination tag.
Tip: If applicable, set S:V with an OTE or OTL instruction.
Click Controller Properties > Advanced tab > Report Overflow
Faults to enable or disable reporting overflow faults.
If an overflow occurs while evaluating an array subscript, a minor
fault is generated and a major fault is generated to indicate the index
is out of range.
The controller sets the overflow flag when:
• The result of a math operation results in an overflow.
For example, adding 1 to a SINT generates an overflow when the value
goes from 127…-128.
• The destination tag is too small to hold the value.
For example, if you try to store the value 123456 to a SINT or INT tag.
Use the overflow flag to check that the result of an operation is still in range.
A minor fault is generated anytime an overflow flag is set.
Tip: If applicable,set S:V with an OTE or OTL instruction.
S:C
Carry flag
The controller sets the carry flag when the result of a math operation
resulted in the generation of a carry out of the most significant bit.
Only the ADD and SUB instructions, and not the + and – operators,
with integer values affect this flag.
The controller sets the carry flag when the result of a math operation
resulted in the generation of a carry out of the most significant bit.
S:MINOR
Minor fault flag
The controller sets the minor fault flag when there is at least one
minor program fault.
Use the minor fault tag to test if a minor fault occurred. This bit only
triggers by programming faults, such as overflow. It is not triggered
by a battery fault. The bit clears at the beginning of every scan.
Tip: If applicable, explicitly set S:MINOR with an OTE or OTL
instruction.
The controller sets the minor fault flag when there is at least one minor
program fault.
Use the minor fault flag to test if a minor fault occurred and take
appropriate action. This bit is triggered only by programming faults, such as
overflow. It is not triggered by a battery fault. The bit clears at the
beginning of every scan.
Tip: If applicable, explicitly set S:MINOR with an OTE or OTL instruction.
Important:
The math status flags are set based on the stored value. Instructions that normally do not affect math status flags might appear to affect math
status flags if type conversion occurs from mixed data types for the instruction parameters. The type conversion process sets the math status flags.
Expressions in Array Subscripts
Controllers Description
CompactLogix 5380,
CompactLogix 5480,
ControlLogix 5580,
Compact GuardLogix
5380, and GuardLogix
5580 controllers
Expressions do not set status flags based on the results of math operations. If expressions overflow:
• A minor fault generates if the controller is configured to generate minor faults.
• A major fault (type 4, code 20) generates because the resulting value is out of range.
CompactLogix 5370,
ControlLogix 5570,
Compact GuardLogix
5370, and GuardLogix
5570 controllers
Expressions set status flags based on the results of math operations. If an array subscript is an expression, the expression and the instruction could
generate minor faults.
Tip:
If an array subscript is too large (out of range), a major fault (type 4, code 20)
generates.

Table of Contents

Other manuals for Allen-Bradley Studio 5000 Logix Emulate

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Studio 5000 Logix Emulate and is the answer not in the manual?

Allen-Bradley Studio 5000 Logix Emulate Specifications

General IconGeneral
BrandAllen-Bradley
ModelStudio 5000 Logix Emulate
CategoryController
LanguageEnglish

Related product manuals