Analog math error detection

image\block_analogmatherror_sn.gif

Short description

The analog math error detection block sets an output if an error has occurred in the referenced analog math function block.

 

Connection

Description

Input En

Enable the analog math error detection function block.

Input R

Reset the output.

Parameter

Referenced FB: block number of an analog math instruction

Error to detect: Zero division, Overflow, or Zero division OR Overflow.

Auto Reset: Reset the output when the failure condition clears.

Output Q

Q is set high if the error to detect occurred in the last execution of the referenced analog math function block.

 

image\0ba3_logo_sn.gif

0BA1- 0BA5: The analog math error detection function block did not exist prior to 0BA6.

 

Parameter Referenced FB

The value for the Referenced FB parameter references the block number of an already-programmed analog math function block.

Description of the function

The analog math error detection block sets the output when the referenced analog math function block has an error. You can program the function to set the output on a zero division error, an overflow error, or when either type of error occurs.

If you select the Automatically reset checkbox, the output is reset prior to the next execution of the function block. If not, the output retains its state until the analog math error detection block is reset with the R parameter.

In any scan cycle, if the referenced analog math function block executes before the analog math error detection function block, the error is detected in the same scan cycle. if the referenced analog math function block executes after the analog math error detection function block, the error is detected in the next scan cycle.

Analog math error detection logic table

In the table below, Error to Detect represents the parameter of the analog math error detection instruction that selects which type of error to detect. Zero represents the zero division bit set by the analog math instruction at the end of its execution: 1 if the error ocurred, 0 if not. OF represents the overflow bit set by the analog math instruction: 1 if the error occurred, 0 if not. Zero division OR Overflow represents the logical OR of the zero division bit and the overflow bit of the referenced analog math instruction. Output (Q) represents the output of the analog math error detection function. An “x” indicates that the bit can be either 0 or 1 with no influence on the output.

 

Error to Detect

Zero

OF

Output (Q)

Zero division

1

x

1

Zero division

0

x

0

Overflow

x

1

1

Overflow

x

0

0

Zero division OR Overflow

1

0

1

Zero division OR Overflow

0

1

1

Zero division OR Overflow

1

1

1

Zero division OR Overflow

0

0

0

 

If the Referenced Analog Math FB is null, then the output is always 0.