Analog threshold trigger

Short description

The output is set or reset depending on two configurable thresholds (hysteresis).

LOGO! 9 and later versions support two data types: integer (16-bit) and float (32-bit).

Connection

Description

Input Ax

Input Ax is one of the following analog signals (integer or float):

  • AI 1:

    • LOGO! 9: AI1 to AI16 3

    • 0BA8: AI1 to AI8 4

  • AM 1:

    • LOGO! 9: AM1 to AM128

    • 0BA8: AM1 to AM64

    • 0BA7: AM1 to AM16

    • 0BA6: AM1 to AM6

  • NAI 1:

    • LOGO! 9: NAI1 to NAI128

    • 0BA7 or 0BA8: NAI1 to NAI32

  • AQ 1:

    • LOGO! 9: AQ1 to AQ16

    • 0BA8: AQ1 to AQ8

    • 0BA7: AQ1 and AQ2

  • NFAI 2:

    • LOGO! 9: NFAI1 to NFAI16

  • FAM 2:

    • LOGO! 9: FAM1 to FAM32

  • The block number of a function with analog output 1 2

Parameter

Range of values

Integer

Float

Gain

  • Analog resolution 0 - 1000: -10.00 to 10.00

  • Analog resolution 0 - 4095: -10.00 to 10.00

  • Analog resolution 0 - 10000: -10.00 to 10.00

-3.402823E38 to +3.402823E38

Offset

  • Analog resolution 0 - 1000: -10000 to 10000

  • Analog resolution 0 - 4095: -32768 to 32767

  • Analog resolution 0 - 10000: -32768 to 32767

On (On threshold)

  • Analog resolution 0 - 1000: -20000 to 20000

  • Analog resolution 0 - 4095: -32768 to 32767

  • Analog resolution 0 - 10000: -32768 to 32767

Off (Off threshold)

  • Analog resolution 0 - 1000: -20000 to 20000

  • Analog resolution 0 - 4095: -32768 to 32767

  • Analog resolution 0 - 10000: -32768 to 32767

p (Number of decimals)

0, 1, 2, 3

/

Output Q

Q is set or reset depending on the set thresholds.

1 If the data type of Ax is integer and the data type of this FB is configured as float, LSC will convert Ax into 32-bit receivable float data.

2 If the data type of Ax is float and the data type of this FB is configured as integer, LSC will cut off the decimal numbers of Ax and convert it into 16-bit receivable integer data.

3 AI1 to AI16: 0 to 10 V corresponds with 0 to 1000, 0 to 4095 or 0 to 10000 (internal value).

4 AI1 to AI8: 0 to 10 V corresponds with 0 to 1000 (internal value).

Parameters On and Off

The On and Off parameters can be provided by the actual value of another already-programmed function:

For the 0BA7 and later version devices, you can additionally use the actual values of the following already-programmed functions:

For the 0BA8 and later version devices, you can additionally use the actual values of the following already-programmed functions:

For the LOGO! 9 and later version devices, you can additionally use the actual values of the following already-programmed functions:

You select the required function by the block number.

0BA4:

A: Gain

Range of values 0.00 to 10.00

 

0BA2, 0BA3:

These parameters apply:
G: Gain in [%]
Range of values 0% to 1000%
O: Offset
Range of values -999 to 999
On: On threshold
Range of values 0 to 9999
Off: Off threshold
Range of values 0 to 9999

Parameter p (number of decimals)

Parameter p applies only to the display of On, Off and Ax values in a message text.

Parameter p does not apply to the comparison of On and Off values. (The compare function ignores the decimal point.)

Timing diagram

Description of the function

The function reads the value of the signal at the analog input Ax.

This value is multiplied by the value of parameter A (gain). Parameter B (offset) is added to the product, hence

(Ax * Gain) + Offset = Actual value Ax.

Output Q is set or reset depending on the set threshold values. See the following calculation rule.

0BA2, 0BA3:
The function is as follows:
The offset parameter is added to the read analog value. The sum is multiplied by the value of the gain parameter.
Value = (AI+offset)*gain
Output Q is set to 1 if the calculated value exceeds the on threshold (TH high).
Q is reset to 0 when the value reaches or drops below the off threshold (TH low).

Calculation rule

  • If threshold (On) ≥ threshold (Off), then:
    Q = 1, if the actual value Ax > On
    Q = 0, if the actual value Ax ≤ Off.

  • If threshold (On) < threshold (Off), then Q = 1, if
    On ≤ the actual value Ax < Off.

Particular characteristics to be noted when configuring

Refer to the help on analog block parameters in the Analog value processing section.

Note

The decimal point setting must be identical in the minimum and maximum range.